Lines Matching +full:one +full:- +full:shot
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 1994-1996 Søren Schmidt
107 if (ioctl(0, VT_GETACTIVE, &cur_info.active_vty) == -1) in init()
111 if (ioctl(0, CONS_GETINFO, &cur_info.console_info) == -1) in init()
116 ioctl(0, GIO_SCRNMAP, &cur_info.screen_map) == -1) in init()
119 if (ioctl(0, CONS_GET, &cur_info.video_mode_number) == -1) in init()
124 if (ioctl(0, CONS_MODEINFO, &cur_info.video_mode_info) == -1) in init()
155 _IO('V', cur_info.video_mode_number - M_VESA_BASE), in revert()
184 "usage: vidcontrol [-Cx] [-b color] [-c appearance] [-f [[size] file]]", in usage()
185 " [-g geometry] [-h size] [-i active | adapter | mode]", in usage()
186 " [-M char] [-m on | off]", in usage()
187 " [-r foreground background] [-S on | off] [-s number]", in usage()
188 " [-T xterm | cons25] [-t N | off] [mode]", in usage()
192 "usage: vidcontrol [-CdHLPpx] [-b color] [-c appearance] [-E emulator]", in usage()
193 " [-f [[size] file]] [-g geometry] [-h size]", in usage()
194 " [-i active | adapter | mode] [-l screen_map] [-M char]", in usage()
195 " [-m on | off] [-r foreground background] [-S on | off]", in usage()
196 " [-s number] [-T xterm | cons25] [-t N | off] [mode]", in usage()
215 * more than one argument).
226 errx(1, "option requires two arguments -- %c", oc); in nextarg()
300 if (ioctl(0, PIO_SCRNMAP, &scrnmap) == -1) { in load_scrnmap()
322 if (ioctl(0, PIO_SCRNMAP, &scrnmap) == -1) { in load_default_scrnmap()
339 if (ioctl(0, GIO_SCRNMAP, &map) == -1) { in print_scrnmap()
369 return -1; in fsize()
408 if (ioctl(0, PIO_VFONT_DEFAULT) == -1) { in load_default_vt4font()
453 if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) in load_vt4font()
492 if (ioctl(0, CONS_GETINFO, &info) == -1) { in load_font()
497 snprintf(size_sufx, sizeof(size_sufx), "-8x%d", info.font_size); in load_font()
575 if (ioctl(0, io, fontmap) == -1) { in load_font()
605 if (ioctl(0, CONS_BLANKTIME, &nsec) == -1) { in set_screensaver_timeout()
618 type = shape->shape[0]; in parse_cursor_params()
637 shape->shape[1] = strtol(word + 5, NULL, 0); in parse_cursor_params()
639 shape->shape[2] = strtol(word + 7, NULL, 0); in parse_cursor_params()
654 type, shape->shape[1], shape->shape[2]); in parse_cursor_params()
658 "invalid parameters for -c starting at '%s%s%s'", in parse_cursor_params()
664 shape->shape[0] = type; in parse_cursor_params()
679 shape.shape[1] = -1; in set_cursor_type()
680 shape.shape[2] = -1; in set_cursor_type()
786 if (ioctl(0, CONS_MODEINFO, &new_mode_info) == -1) { in video_mode()
793 mode = _IO('V', new_mode_num - M_VESA_BASE); in video_mode()
802 if (ioctl(0, mode, NULL) == -1) { in video_mode()
846 _IO('V', cur_mode - M_VESA_BASE), in video_mode()
880 return -1; in get_color_number()
893 if (*_index < argc && (color = get_color_number(argv[*_index])) != -1) { in set_normal_colors()
897 && (color = get_color_number(argv[*_index])) != -1) { in set_normal_colors()
914 if ((color = get_color_number(argv[*(_index)-1])) != -1) { in set_reverse_colors()
917 && (color = get_color_number(argv[*_index])) != -1) { in set_reverse_colors()
944 } else if (ioctl(0, VT_ACTIVATE, n) == -1) { in set_console()
961 if (color == -1) { in set_border_color()
979 if ((l < 0) || (l > UCHAR_MAX - 3)) { in set_mouse_char()
981 warnx("argument to -M must be 0 through %d", UCHAR_MAX - 3); in set_mouse_char()
988 if (ioctl(0, CONS_MOUSECTL, &mouse) == -1) { in set_mouse_char()
1010 errx(1, "argument to -m must be either on or off"); in set_mouse()
1013 if (ioctl(0, CONS_MOUSECTL, &mouse) == -1) { in set_mouse()
1032 errx(1, "argument to -S must be either on or off"); in set_lockswitch()
1035 if (ioctl(0, VT_LOCKSWITCH, &data) == -1) { in set_lockswitch()
1060 { -1, "Unknown" }, in adapter_name()
1065 for (i = 0; names[i].type != -1; ++i) in adapter_name()
1095 if (ioctl(0, CONS_ADPINFO, &ad) == -1) { in show_adapter_info()
1132 printf("---------------------------------------" in show_mode_info()
1133 "---------------------------------------\n"); in show_mode_info()
1187 printf(" %c %-15s", c, buf); in show_mode_info()
1190 printf(" %-5s", buf); in show_mode_info()
1212 errx(1, "argument to -i must be active, adapter, or mode"); in show_info()
1225 if (ioctl(0, CONS_GETINFO, &info) == -1) in test_frame()
1240 "\033[=%dF\033[=0G%2d \033[=%dF%-7s%s" in test_frame()
1241 "\033[=%dF\033[=0G%2d \033[=%dF%-12s%s" in test_frame()
1265 scrshot_t shot; in dump_screen() local
1269 if (ioctl(0, CONS_GETINFO, &info) == -1) { in dump_screen()
1274 shot.x = shot.y = 0; in dump_screen()
1275 shot.xsize = info.mv_csz; in dump_screen()
1276 shot.ysize = info.mv_rsz; in dump_screen()
1278 shot.ysize += info.mv_hsz; in dump_screen()
1280 shot.buf = alloca(shot.xsize * shot.ysize * sizeof(u_int16_t)); in dump_screen()
1281 if (shot.buf == NULL) { in dump_screen()
1286 if (ioctl(0, CONS_SCRSHOT, &shot) == -1) { in dump_screen()
1293 shot.xsize, shot.ysize); in dump_screen()
1297 write(STDOUT_FILENO, shot.buf, in dump_screen()
1298 shot.xsize * shot.ysize * sizeof(u_int16_t)); in dump_screen()
1304 line = alloca(shot.xsize + 1); in dump_screen()
1311 for (y = 0; y < shot.ysize; y++) { in dump_screen()
1312 for (x = 0; x < shot.xsize; x++) { in dump_screen()
1313 ch = shot.buf[x + (y * shot.xsize)]; in dump_screen()
1325 line[x--] = '\0'; in dump_screen()
1352 if (ioctl(0, CONS_HISTORY, &size) == -1) { in set_history()
1366 if (ioctl(0, CONS_CLRHIST) == -1) { in clear_history()
1375 tip->ti_index = i; in get_terminal_emulator()
1378 strlcpy((char *)tip->ti_name, "unknown", sizeof(tip->ti_name)); in get_terminal_emulator()
1379 strlcpy((char *)tip->ti_desc, "unknown", sizeof(tip->ti_desc)); in get_terminal_emulator()
1407 printf("%s (%s) -> %s (%s)\n", old_ti.ti_name, old_ti.ti_desc, in set_terminal_emulator()
1441 while ((opt = getopt(argc, argv, opts)) != -1) in main()