Lines Matching +full:koi8 +full:- +full:r +full:- +full:8 +full:x8

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
85 if (!strcmp(km->keym, key)) in get_keymap()
115 if (!strcmp(keym, km->keym)) { in remove_keymap()
133 if (!strcmp(km->keym, keym)) { in add_keymap()
135 free(km->desc); in add_keymap()
136 km->desc = strdup(desc); in add_keymap()
137 km->mark = mark; in add_keymap()
143 km_new->desc = strdup(desc); in add_keymap()
144 km_new->keym = strdup(keym); in add_keymap()
145 km_new->mark = mark; in add_keymap()
228 FILE *fp = fopen(sysconfig, "r"); in get_font()
237 " font%dx%d = \"%20[-.0-9a-zA-Z_]", in get_font()
269 asprintf(&cmd, "vidcontrol -f %s", fnt); in vidcontrol()
278 p = strrchr(tmp, '-'); in vidcontrol()
292 asprintf(&cmd, "vidcontrol -f %s %s", p, fnt); in vidcontrol()
311 asprintf(&kbd_cmd, "kbdcontrol -l %s/%s", dir, km->keym); in do_kbdcontrol()
316 fprintf(stderr, "keymap=\"%s\"\n", km->keym); in do_kbdcontrol()
328 asprintf(&vid_cmd, "%s/%s", dir, km->keym); in do_vidfont()
332 tmp = strdup(km->keym); in do_vidfont()
333 p = strrchr(tmp, '-'); in do_vidfont()
339 printf("font%s=%s\n", p, km->keym); in do_vidfont()
372 * russian *need* a koi8 font in show_dialog()
384 listitems[i].name = km_sorted[i]->desc; in show_dialog()
458 return strcmp(km1->desc, km2->desc); in compare_keymap()
474 * Change '8x8' to '8x08' so qsort will put it before eg. '8x14'
483 char *km = km_sorted[i]->desc; in kludge_desc()
484 if ((p = strstr(km, "8x8")) != NULL) { in kludge_desc()
489 offset = p - km; in kludge_desc()
495 for (j=len; j!=offset+1; j--) in kludge_desc()
500 km_sorted[i]->desc = km; in kludge_desc()
506 * Reverse 'kludge_desc()' - change '8x08' back to '8x8'
515 char *km = km_sorted[i]->desc; in unkludge_desc()
516 if ((p = strstr(km, "8x08")) != NULL) { in unkludge_desc()
519 p[-1] = p[0]; in unkludge_desc()
521 km = realloc(km, p - km - 1); in unkludge_desc()
522 km_sorted[i]->desc = km; in unkludge_desc()
528 * Return 0 if file exists and is readable, else -1
535 if (access(keym, R_OK) == -1) { in check_file()
538 if (access(fn, R_OK) == -1) { in check_file()
541 status = -1; in check_file()
547 status = -1; in check_file()
577 /* en_US.ISO8859-1 -> en_..\.ISO8859-1 */ in menu_read()
585 /* en_US.ISO8859-1 -> en */ in menu_read()
594 fp = fopen(filename, "r"); in menu_read()
616 if (check_file(keym) == -1) in menu_read()
624 * might be in a comma-delimited list in menu_read()
632 delim[-1] = '\0'; in menu_read()
649 * 3) Long match eg. en_GB.ISO8859-1 is equal to in menu_read()
650 * en_..\.ISO8859-1 in menu_read()
663 mark = (km) ? km->mark : 0; in menu_read()
682 qsort(lang_list->sl_str, lang_list->sl_cur, sizeof(char*), in menu_read()
685 for (i=0; i< (int) lang_list->sl_cur; i++) in menu_read()
686 printf("%s ", lang_list->sl_str[i]); in menu_read()
694 title = strdup(km->desc); in menu_read()
698 menu = strdup(km->desc); in menu_read()
702 font = strdup(km->desc); in menu_read()
713 const char *ext = get_extension(dp->d_name); in menu_read()
717 !get_keymap(dp->d_name)) { in menu_read()
721 q = strdup(dp->d_name); in menu_read()
723 add_keymap(q, 0, dp->d_name); in menu_read()
729 dp->d_name); in menu_read()
748 /* Change '8x8' to '8x08' so sort works as we might expect... */ in menu_read()
758 printf("%s\n", km_sorted[i]->desc); in menu_read()
774 fprintf(stderr, "usage: %s\t[-K] [-V] [-d|-default] [-h|-help] " in usage()
775 "[-l|-lang language]\n\t\t[-p|-print] [-r|-restore] [-s|-show] " in usage()
776 "[-v|-verbose]\n", program); in usage()
786 if (argv[i][0] != '-') in parse_args()
788 else if (!strcmp(argv[i], "-help") || !strcmp(argv[i], "-h")) in parse_args()
790 else if (!strcmp(argv[i], "-verbose") || !strcmp(argv[i], "-v")) in parse_args()
792 else if (!strcmp(argv[i], "-lang") || !strcmp(argv[i], "-l")) in parse_args()
797 else if (!strcmp(argv[i], "-default") || !strcmp(argv[i], "-d")) in parse_args()
799 else if (!strcmp(argv[i], "-show") || !strcmp(argv[i], "-s")) in parse_args()
801 else if (!strcmp(argv[i], "-print") || !strcmp(argv[i], "-p")) in parse_args()
803 else if (!strcmp(argv[i], "-restore") || in parse_args()
804 !strcmp(argv[i], "-r")) { in parse_args()
807 } else if (!strcmp(argv[i], "-K")) in parse_args()
809 else if (!strcmp(argv[i], "-V")) in parse_args()
817 * A front-end for the 'vidfont' and 'kbdmap' programs.
823 x11 = system("kbdcontrol -d >/dev/null"); in main()
826 fprintf(stderr, "You are not on a virtual console - " in main()
827 "expect certain strange side-effects\n"); in main()