Deleted Added
sdiff udiff text old ( 225736 ) new ( 238158 )
full compact
1/*-
2 * Copyright (c) 1994-1996 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Portions of this software are based in part on the work of
6 * Sascha Wildner <saw@online.de> contributed to The DragonFly Project
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $DragonFly: src/usr.sbin/vidcontrol/vidcontrol.c,v 1.10 2005/03/02 06:08:29 joerg Exp $
32 */
33
34#ifndef lint
35static const char rcsid[] =
36 "$FreeBSD: stable/9/usr.sbin/vidcontrol/vidcontrol.c 205855 2010-03-29 20:12:44Z jkim $";
37#endif /* not lint */
38
39#include <ctype.h>
40#include <err.h>
41#include <limits.h>
42#include <stdio.h>
43#include <stdlib.h>
44#include <string.h>

--- 1144 unchanged lines hidden (view full) ---

1189static void
1190set_terminal_mode(char *arg)
1191{
1192
1193 if (strcmp(arg, "xterm") == 0)
1194 fprintf(stderr, "\033[=T");
1195 else if (strcmp(arg, "cons25") == 0)
1196 fprintf(stderr, "\033[=1T");
1197 else
1198 usage();
1199}
1200
1201
1202int
1203main(int argc, char **argv)
1204{
1205 char *font, *type;
1206 int dumpmod, dumpopt, opt;
1207 int reterr;
1208
1209 init();
1210
1211 info.size = sizeof(info);
1212
1213 if (ioctl(0, CONS_GETINFO, &info) == -1)
1214 err(1, "must be on a virtual console");
1215 dumpmod = 0;
1216 dumpopt = DUMP_FBF;
1217 while ((opt = getopt(argc, argv,
1218 "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x")) != -1)
1219 switch(opt) {
1220 case 'b':
1221 set_border_color(optarg);
1222 break;
1223 case 'C':
1224 clear_history();

--- 55 unchanged lines hidden (view full) ---

1280 break;
1281 case 'S':
1282 set_lockswitch(optarg);
1283 break;
1284 case 's':
1285 set_console(optarg);
1286 break;
1287 case 'T':
1288 set_terminal_mode(optarg);
1289 break;
1290 case 't':
1291 set_screensaver_timeout(optarg);
1292 break;
1293 case 'x':
1294 hex = 1;
1295 break;
1296 default:

--- 6 unchanged lines hidden (view full) ---

1303 get_normal_colors(argc, argv, &optind);
1304
1305 if (optind < argc && !strcmp(argv[optind], "show")) {
1306 test_frame();
1307 optind++;
1308 }
1309
1310 video_mode(argc, argv, &optind);
1311
1312 get_normal_colors(argc, argv, &optind);
1313
1314 if (colors_changed || video_mode_changed) {
1315 if (!(new_mode_info.vi_flags & V_INFO_GRAPHICS)) {
1316 if ((normal_back_color < 8) && (revers_back_color < 8)) {
1317 set_colors();
1318 } else {

--- 13 unchanged lines hidden ---