Lines Matching defs:cx
147 int cx, cy; /* escape parameters */
1038 vs.cx = vs.cy = 0;
1110 vs.cx = vs.cy = 0;
1141 if (!vs.cx)
1147 case 'A': { /* back cx rows */
1148 int cx = vs.cx;
1149 if (cx <= 0)
1150 cx = 1;
1152 cx %= vs.nrow;
1154 pos -= vs.ncol * cx;
1161 case 'B': { /* down cx rows */
1162 int cx = vs.cx;
1163 if (cx <= 0)
1164 cx = 1;
1166 cx %= vs.nrow;
1168 pos += vs.ncol * cx;
1176 int cx = vs.cx,
1178 if (cx <= 0)
1179 cx = 1;
1181 cx %= vs.ncol;
1183 pos += cx;
1184 col += cx;
1195 int cx = vs.cx,
1197 if (cx <= 0)
1198 cx = 1;
1200 cx %= vs.ncol;
1202 pos -= cx;
1203 col -= cx;
1214 switch (vs.cx) {
1237 switch (vs.cx) {
1260 int cx = vs.cx,
1262 if (!cx || !cy) {
1266 if (cx > vs.nrow)
1267 cx = vs.nrow;
1271 (cx - 1) * vs.ncol + cy - 1;
1277 case 'M': { /* delete cx rows */
1279 int cx = vs.cx,
1282 if (cx <= 0)
1283 cx = 1;
1284 else if (cx > nrow)
1285 cx = nrow;
1286 if (cx < nrow)
1288 wcopy(crtAt + vs.ncol * cx,
1290 cx) * CHR);
1293 crtAt + vs.ncol * cx,
1294 vs.ncol * (nrow - cx) *
1298 crtAt + vs.ncol * (nrow - cx),
1299 vs.ncol * cx);
1303 case 'S': { /* scroll up cx lines */
1304 int cx = vs.cx;
1305 if (cx <= 0)
1306 cx = 1;
1307 else if (cx > vs.nrow)
1308 cx = vs.nrow;
1309 if (cx < vs.nrow)
1311 wcopy(Crtat + vs.ncol * cx,
1313 cx) * CHR);
1316 Crtat + vs.ncol * cx,
1317 vs.ncol * (vs.nrow - cx) *
1321 Crtat + vs.ncol * (vs.nrow - cx),
1322 vs.ncol * cx);
1323 /* crtat -= vs.ncol * cx; XXX */
1327 case 'L': { /* insert cx rows */
1329 int cx = vs.cx,
1332 if (cx <= 0)
1333 cx = 1;
1334 else if (cx > nrow)
1335 cx = nrow;
1336 if (cx < nrow)
1339 crtAt + vs.ncol * cx,
1340 vs.ncol * (nrow - cx) *
1343 memmove(crtAt + vs.ncol * cx,
1345 vs.ncol * (nrow - cx) *
1349 vs.ncol * cx);
1353 case 'T': { /* scroll down cx lines */
1354 int cx = vs.cx;
1355 if (cx <= 0)
1356 cx = 1;
1357 else if (cx > vs.nrow)
1358 cx = vs.nrow;
1359 if (cx < vs.nrow)
1362 Crtat + vs.ncol * cx,
1363 vs.ncol * (vs.nrow - cx) *
1366 memmove(Crtat + vs.ncol * cx,
1368 vs.ncol * (vs.nrow - cx) *
1372 vs.ncol * cx);
1373 /* crtat += vs.ncol * cx; XXX */
1381 vs.so_at = (vs.cx & FG_MASK) |
1396 switch (vs.cx) {
1429 vs.cx *= 10;
1430 vs.cx += c - '0';