Home | History | Annotate | Download | only in dev

Lines Matching refs:vs

159 } vs;
597 printf(": %s\n", vs.color ? "color" : "mono");
932 char *cp0 = (char *)crtat; *cp0++ = (c); *cp0 = (at); crtat++; vs.col++; \
991 vs.color = 0;
996 vs.color = 1;
1005 bios_display_info(&vs.col, &vs.row, &vs.ncol, &vs.nrow);
1006 vs.nchr = vs.ncol * vs.nrow;
1007 vs.col--;
1008 vs.row--;
1009 cursorat = vs.ncol * vs.row + vs.col;
1010 vs.at = FG_LIGHTGREY | BG_BLACK;
1015 if (vs.color == 0)
1016 vs.so_at = FG_BLACK | BG_LIGHTGREY;
1018 vs.so_at = FG_YELLOW | BG_BLACK;
1020 fillw((vs.at << 8) | ' ', crtat, vs.nchr - cursorat);
1029 if (vs.state >= VSS_ESCAPE) {
1030 wrtchar(c, vs.so_at);
1031 vs.state = 0;
1034 vs.state = VSS_ESCAPE;
1038 vs.cx = vs.cy = 0;
1039 vs.state = VSS_EBRACE;
1043 int inccol = 8 - (vs.col & 7);
1045 vs.col += inccol;
1048 if (vs.col >= vs.ncol) {
1049 vs.col -= vs.ncol;
1058 if (--vs.col < 0)
1059 vs.col += vs.ncol; /* non-destructive backspace */
1063 crtat -= vs.col;
1064 vs.col = 0;
1068 crtat += vs.ncol;
1073 switch (vs.state) {
1092 if (vs.so)
1093 wrtchar(c, vs.so_at);
1095 wrtchar(c, vs.at);
1096 if (vs.col >= vs.ncol) {
1097 vs.col = 0;
1110 vs.cx = vs.cy = 0;
1111 vs.state = VSS_EBRACE;
1114 fillw((vs.at << 8) | ' ',
1115 Crtat, vs.nchr);
1117 vs.col = 0;
1118 vs.state = 0;
1121 vs.offset = crtat - Crtat;
1122 vs.state = 0;
1125 crtat = Crtat + vs.offset;
1126 vs.row = vs.offset / vs.ncol;
1127 vs.col = vs.offset % vs.ncol;
1128 vs.state = 0;
1131 wrtchar(c, vs.so_at);
1132 vs.state = 0;
1141 if (!vs.cx)
1142 vs.so = 0;
1144 vs.so = 1;
1145 vs.state = 0;
1148 int cx = vs.cx;
1152 cx %= vs.nrow;
1154 pos -= vs.ncol * cx;
1156 pos += vs.nchr;
1158 vs.state = 0;
1162 int cx = vs.cx;
1166 cx %= vs.nrow;
1168 pos += vs.ncol * cx;
1169 if (pos >= vs.nchr)
1170 pos -= vs.nchr;
1172 vs.state = 0;
1176 int cx = vs.cx,
1177 col = vs.col;
1181 cx %= vs.ncol;
1185 if (col >= vs.ncol) {
1186 pos -= vs.ncol;
1187 col -= vs.ncol;
1189 vs.col = col;
1191 vs.state = 0;
1195 int cx = vs.cx,
1196 col = vs.col;
1200 cx %= vs.ncol;
1205 pos += vs.ncol;
1206 col += vs.ncol;
1208 vs.col = col;
1210 vs.state = 0;
1214 switch (vs.cx) {
1217 fillw((vs.at << 8) | ' ',
1219 Crtat + vs.nchr - crtat);
1223 fillw((vs.at << 8) | ' ',
1229 fillw((vs.at << 8) | ' ',
1231 vs.nchr);
1234 vs.state = 0;
1237 switch (vs.cx) {
1240 fillw((vs.at << 8) | ' ',
1242 vs.ncol - vs.col);
1246 fillw((vs.at << 8) | ' ',
1247 crtat - vs.col,
1248 vs.col + 1);
1252 fillw((vs.at << 8) | ' ',
1253 crtat - vs.col, vs.ncol);
1256 vs.state = 0;
1260 int cx = vs.cx,
1261 cy = vs.cy;
1264 vs.col = 0;
1266 if (cx > vs.nrow)
1267 cx = vs.nrow;
1268 if (cy > vs.ncol)
1269 cy = vs.ncol;
1271 (cx - 1) * vs.ncol + cy - 1;
1272 vs.col = cy - 1;
1274 vs.state = 0;
1278 u_short *crtAt = crtat - vs.col;
1279 int cx = vs.cx,
1280 row = (crtAt - Crtat) / vs.ncol,
1281 nrow = vs.nrow - row;
1288 wcopy(crtAt + vs.ncol * cx,
1289 crtAt, vs.ncol * (nrow -
1293 crtAt + vs.ncol * cx,
1294 vs.ncol * (nrow - cx) *
1297 fillw((vs.at << 8) | ' ',
1298 crtAt + vs.ncol * (nrow - cx),
1299 vs.ncol * cx);
1300 vs.state = 0;
1304 int cx = vs.cx;
1307 else if (cx > vs.nrow)
1308 cx = vs.nrow;
1309 if (cx < vs.nrow)
1311 wcopy(Crtat + vs.ncol * cx,
1312 Crtat, vs.ncol * (vs.nrow -
1316 Crtat + vs.ncol * cx,
1317 vs.ncol * (vs.nrow - cx) *
1320 fillw((vs.at << 8) | ' ',
1321 Crtat + vs.ncol * (vs.nrow - cx),
1322 vs.ncol * cx);
1323 /* crtat -= vs.ncol * cx; XXX */
1324 vs.state = 0;
1328 u_short *crtAt = crtat - vs.col;
1329 int cx = vs.cx,
1330 row = (crtAt - Crtat) / vs.ncol,
1331 nrow = vs.nrow - row;
1339 crtAt + vs.ncol * cx,
1340 vs.ncol * (nrow - cx) *
1343 memmove(crtAt + vs.ncol * cx,
1345 vs.ncol * (nrow - cx) *
1348 fillw((vs.at << 8) | ' ', crtAt,
1349 vs.ncol * cx);
1350 vs.state = 0;
1354 int cx = vs.cx;
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) *
1371 fillw((vs.at << 8) | ' ', Crtat,
1372 vs.ncol * cx);
1373 /* crtat += vs.ncol * cx; XXX */
1374 vs.state = 0;
1378 vs.state = VSS_EPARAM;
1381 vs.so_at = (vs.cx & FG_MASK) |
1382 ((vs.cy << 4) & BG_MASK);
1383 vs.state = 0;
1386 vs.offset = crtat - Crtat;
1387 vs.state = 0;
1390 crtat = Crtat + vs.offset;
1391 vs.row = vs.offset / vs.ncol;
1392 vs.col = vs.offset % vs.ncol;
1393 vs.state = 0;
1396 switch (vs.cx) {
1398 vs.at = FG_LIGHTGREY | BG_BLACK;
1402 if (!vs.color)
1404 vs.at &= FG_MASK;
1405 vs.at |= bgansitopc[vs.cy & 7];
1409 if (!vs.color)
1411 vs.at &= BG_MASK;
1412 vs.at |= fgansitopc[vs.cy & 7];
1416 if (vs.state >= VSS_EPARAM)
1417 vs.at = vs.cy;
1420 vs.state = 0;
1425 if (vs.state >= VSS_EPARAM) {
1426 vs.cy *= 10;
1427 vs.cy += c - '0';
1429 vs.cx *= 10;
1430 vs.cx += c - '0';
1433 vs.state = 0;
1442 if (crtat >= Crtat + vs.nchr) {
1451 wcopy(Crtat + vs.ncol, Crtat,
1452 (vs.nchr - vs.ncol) * CHR);
1454 memmove(Crtat, Crtat + vs.ncol,
1455 (vs.nchr - vs.ncol) * CHR);
1457 fillw((vs.at << 8) | ' ',
1458 Crtat + vs.nchr - vs.ncol,
1459 vs.ncol);
1460 crtat -= vs.ncol;