diff -arcN src.old/usr.sbin/vidcontrol/vidcontrol.c src/usr.sbin/vidcontrol/vidcontrol.c *** src.old/usr.sbin/vidcontrol/vidcontrol.c Wed Jun 3 10:36:01 1998 --- src/usr.sbin/vidcontrol/vidcontrol.c Wed Jun 3 10:35:54 1998 *************** *** 39,44 **** --- 39,45 ---- #include #include #include + #include #include "path.h" #include "decode.h" *************** *** 52,58 **** int number; char letter; struct vid_info info; ! static void usage() --- 53,59 ---- int number; char letter; struct vid_info info; ! static int ispc98; static void usage() *************** *** 260,283 **** int mode; if (*index < argc) { ! if (!strcmp(argv[*index], "VGA_40x25")) ! mode = SW_VGA_C40x25; ! else if (!strcmp(argv[*index], "VGA_80x25")) ! mode = SW_VGA_C80x25; ! else if (!strcmp(argv[*index], "VGA_80x30")) ! mode = SW_VGA_C80x30; ! else if (!strcmp(argv[*index], "VGA_80x50")) ! mode = SW_VGA_C80x50; ! else if (!strcmp(argv[*index], "VGA_80x60")) ! mode = SW_VGA_C80x60; ! else if (!strcmp(argv[*index], "VGA_320x200")) ! mode = SW_VGA_CG320; ! else if (!strcmp(argv[*index], "EGA_80x25")) ! mode = SW_ENH_C80x25; ! else if (!strcmp(argv[*index], "EGA_80x43")) ! mode = SW_ENH_C80x43; ! else ! return; if (ioctl(0, mode, NULL) < 0) warn("cannot set videomode"); (*index)++; --- 261,293 ---- int mode; if (*index < argc) { ! if (ispc98) { ! if (!strcmp(argv[*index], "80x25")) ! mode = SW_PC98_80x25; ! else if (!strcmp(argv[*index], "80x30")) ! mode = SW_PC98_80x30; ! else ! return; ! } else { ! if (!strcmp(argv[*index], "VGA_40x25")) ! mode = SW_VGA_C40x25; ! else if (!strcmp(argv[*index], "VGA_80x25")) ! mode = SW_VGA_C80x25; ! else if (!strcmp(argv[*index], "VGA_80x30")) ! mode = SW_VGA_C80x30; ! else if (!strcmp(argv[*index], "VGA_80x50")) ! mode = SW_VGA_C80x50; ! else if (!strcmp(argv[*index], "VGA_80x60")) ! mode = SW_VGA_C80x60; ! else if (!strcmp(argv[*index], "VGA_320x200")) ! mode = SW_VGA_CG320; ! else if (!strcmp(argv[*index], "EGA_80x25")) ! mode = SW_ENH_C80x25; ! else if (!strcmp(argv[*index], "EGA_80x43")) ! mode = SW_ENH_C80x43; ! else ! return; ! } if (ioctl(0, mode, NULL) < 0) warn("cannot set videomode"); (*index)++; *************** *** 396,402 **** main(int argc, char **argv) { int opt; ! info.size = sizeof(info); if (ioctl(0, CONS_GETINFO, &info) < 0) --- 406,425 ---- main(int argc, char **argv) { int opt; ! int mib[2]; ! size_t len; ! char *val; ! ! mib[0] = CTL_HW; ! mib[1] = HW_MACHINE_ARCH; ! sysctl(mib, 2, NULL, &len, NULL, 0); ! val = (char *)malloc(len); ! sysctl(mib, 2, val, &len, NULL, 0); ! if (strcmp(val, "pc-98") == 0) ! ispc98 = 1; ! else ! ispc98 = 0; ! free(val); info.size = sizeof(info); if (ioctl(0, CONS_GETINFO, &info) < 0)