|
Lines 61-68
Link Here
|
| 61 |
fprintf(stderr, "%s\n%s\n%s\n%s\n", |
61 |
fprintf(stderr, "%s\n%s\n%s\n%s\n", |
| 62 |
"usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]", |
62 |
"usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]", |
| 63 |
" [-i adapter | mode] [-L] [-M char] [-m on|off]", |
63 |
" [-i adapter | mode] [-L] [-M char] [-m on|off]", |
| 64 |
" [-f size file] [-s number] [-t N|off] [-x] [mode]", |
64 |
" [-h lines] [-f size file] [-s number] [-t N|off] [-x]", |
| 65 |
" [fgcol [bgcol]] [show]"); |
65 |
" [mode] [fgcol [bgcol]] [show]"); |
| 66 |
exit(1); |
66 |
exit(1); |
| 67 |
} |
67 |
} |
| 68 |
|
68 |
|
|
Lines 547-552
Link Here
|
| 547 |
} |
547 |
} |
| 548 |
|
548 |
|
| 549 |
void |
549 |
void |
|
|
550 |
set_history_size(char *arg) |
| 551 |
{ |
| 552 |
int l; |
| 553 |
|
| 554 |
l = (int)strtol(arg, NULL, 0); |
| 555 |
if (l < 0) { |
| 556 |
warnx("argument to -h must be greater than 0"); |
| 557 |
return; |
| 558 |
} |
| 559 |
if (ioctl(0, CONS_HISTORY, &l) < 0) |
| 560 |
warn("cannot set history size"); |
| 561 |
} |
| 562 |
|
| 563 |
void |
| 550 |
test_frame() |
564 |
test_frame() |
| 551 |
{ |
565 |
{ |
| 552 |
int i; |
566 |
int i; |
|
Lines 573-579
Link Here
|
| 573 |
info.size = sizeof(info); |
587 |
info.size = sizeof(info); |
| 574 |
if (ioctl(0, CONS_GETINFO, &info) < 0) |
588 |
if (ioctl(0, CONS_GETINFO, &info) < 0) |
| 575 |
err(1, "must be on a virtual console"); |
589 |
err(1, "must be on a virtual console"); |
| 576 |
while((opt = getopt(argc, argv, "b:c:df:i:l:LM:m:r:s:t:x")) != -1) |
590 |
while((opt = getopt(argc, argv, "b:c:df:h:i:l:LM:m:r:s:t:x")) != -1) |
| 577 |
switch(opt) { |
591 |
switch(opt) { |
| 578 |
case 'b': |
592 |
case 'b': |
| 579 |
set_border_color(optarg); |
593 |
set_border_color(optarg); |
|
Lines 587-592
Link Here
|
| 587 |
case 'f': |
601 |
case 'f': |
| 588 |
load_font(optarg, |
602 |
load_font(optarg, |
| 589 |
nextarg(argc, argv, &optind, 'f')); |
603 |
nextarg(argc, argv, &optind, 'f')); |
|
|
604 |
break; |
| 605 |
case 'h': |
| 606 |
set_history_size(optarg); |
| 590 |
break; |
607 |
break; |
| 591 |
case 'i': |
608 |
case 'i': |
| 592 |
show_info(optarg); |
609 |
show_info(optarg); |