Add pancyrillic font
[platform/upstream/kbd.git] / src / setvesablank.c
1 /*
2  * setvesablank.c - aeb - 941230
3  *
4  * usage: setvesablank ON|on|off
5  */
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <sys/ioctl.h>
10 #include "getfd.h"
11 #include "nls.h"
12
13 int
14 main(int argc, char *argv[]) {
15         int fd;
16         struct { char ten, onoff; } arg;
17
18         setlocale(LC_ALL, "");
19         bindtextdomain(PACKAGE_NAME, LOCALEDIR);
20         textdomain(PACKAGE_NAME);
21
22         if (argc != 2) {
23                 fprintf(stderr, _("usage: %s\n"), "setvesablank ON|on|off");
24                 exit(1);
25         }
26         fd = getfd(NULL);
27         arg.ten = 10;
28         arg.onoff = 0;
29         if (!strcmp(argv[1], "on"))
30                 arg.onoff = 1;
31         else if (!strcmp(argv[1], "ON"))
32                 arg.onoff = 2;
33         if (ioctl(fd, TIOCLINUX, &arg)) {
34                 perror("setvesablank: TIOCLINUX");
35                 exit(1);
36         }
37         return 0;
38 }