diff -Nru kbd-1.08/po/Makefile kbd-1.08c/po/Makefile --- kbd-1.08/po/Makefile 2002-10-13 03:20:50.000000000 +0400 +++ kbd-1.08c/po/Makefile 2003-08-09 06:43:52.742047120 +0400 @@ -14,11 +14,9 @@ FOREIGN= SHELL = /bin/sh -prefix = ${DESTDIR} -datadir = $(prefix)/share -localedir = $(datadir)/locale -gnulocaledir = $(prefix)/share/locale -gettextsrcdir = $(prefix)/share/gettext/po +localedir = $(DATADIR)/locale +gnulocaledir = $(DATADIR)/locale +gettextsrcdir = $(DATADIR)/gettext/po INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 @@ -88,7 +86,7 @@ install: install-data-$(HAVE_XGETTEXT) install-data-no: all install-data-yes: all - ../mkinstalldirs $(datadir); + ../mkinstalldirs $(DATADIR); @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ case "$$cat" in \ diff -Nru kbd-1.08/src/getfd.c kbd-1.08c/src/getfd.c --- kbd-1.08/src/getfd.c 2002-10-12 19:53:44.000000000 +0400 +++ kbd-1.08c/src/getfd.c 2003-08-09 06:38:39.606650936 +0400 @@ -68,3 +68,19 @@ _("Couldnt get a file descriptor referring to the console\n")); exit(1); /* total failure */ } + +int getfd_name(char *name) { + int fd; + + if (name) { + fd = open_a_console(name); + if (fd >= 0) + return fd; + } + + fprintf(stderr, + _("Couldnt get a file descriptor referring to the console %s\n"), + name); + exit(1); +} + diff -Nru kbd-1.08/src/getfd.h kbd-1.08c/src/getfd.h --- kbd-1.08/src/getfd.h 2002-10-11 15:09:01.000000000 +0400 +++ kbd-1.08c/src/getfd.h 2003-08-09 06:25:36.822652192 +0400 @@ -1 +1,3 @@ extern int getfd(void); +extern int getfd_name(char *name); + diff -Nru kbd-1.08/src/setfont.c kbd-1.08c/src/setfont.c --- kbd-1.08/src/setfont.c 2002-10-11 15:09:00.000000000 +0400 +++ kbd-1.08c/src/setfont.c 2003-08-09 06:48:03.909863808 +0400 @@ -71,27 +71,29 @@ { fprintf(stderr, _( "Usage: setfont [write-options] [-] [newfont..] [-m consolemap] [-u unicodemap]\n" -" write-options (take place before file loading):\n" -" -o Write current font to \n" -" -O Write current font and unicode map to \n" -" -om Write current consolemap to \n" -" -ou Write current unicodemap to \n" -"If no newfont and no -[o|O|om|ou|m|u] option is given,\n" -"a default font is loaded:\n" -" setfont Load font \"default[.gz]\"\n" -" setfont - Load font \"default8x[.gz]\"\n" -"The - option selects a font from a codepage that contains three fonts:\n" -" setfont -{8|14|16} codepage.cp[.gz] Load 8x font from codepage.cp\n" -"Explicitly (with -m or -u) or implicitly (in the fontfile) given mappings\n" -"will be loaded and, in the case of consolemaps, activated.\n" -" -h (no space) Override font height.\n" -" -m Load console screen map.\n" -" -u Load font unicode map.\n" -" -m none Suppress loading and activation of a screen map.\n" -" -u none Suppress loading of a unicode map.\n" -" -v Be verbose.\n" -" -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +" Write-options (take place before file loading):\n" +" -o Write current font to \n" +" -O Write current font and unicode map to \n" +" -om Write current consolemap to \n" +" -ou Write current unicodemap to \n" +" If no newfont and no -[o|O|om|ou|m|u] option is given,\n" +" a default font is loaded:\n" +" setfont Load font \"default[.gz]\"\n" +" setfont - Load font \"default8x[.gz]\"\n" +" The - option selects a font from a codepage that contains three fonts:\n" +" -{8|14|16} codepage.cp[.gz] Load 8x font from codepage.cp\n" +" Explicitly (with -m or -u) or implicitly (in the fontfile) given mappings\n" +" will be loaded and, in the case of consolemaps, activated.\n" +" -c Select a console (like /dev/tty1 or /dev/vc/3)\n" +" default is foreground console\n" +" -h (no space) Override font height.\n" +" -m Load console screen map.\n" +" -u Load font unicode map.\n" +" -m none Suppress loading and activation of a screen map.\n" +" -u none Suppress loading of a unicode map.\n" +" -v Be verbose.\n" +" -V Print version and exit.\n" +" Files are loaded from the current directory or /usr/lib/kbd/*/.\n" )); exit(EX_USAGE); } @@ -160,6 +162,11 @@ hwunit = atoi(argv[i]+2); if (hwunit <= 0 || hwunit > 32) usage(); + } else if (!strcmp(argv[i], "-c")) { + if (++i == argc) + usage(); + else + fd = getfd_name(argv[i]); } else if (argv[i][0] == '-') { iunit = atoi(argv[i]+1); if(iunit <= 0 || iunit > 32)