AC_CONFIG_SRCDIR([src/loadkeys.y])
AC_CONFIG_HEADERS(config.h)
-AC_CHECK_KLIBC
-
# Checks for programs.
AC_PROG_YACC
AC_PROG_CC
+++ /dev/null
-# klibc.m4 serial 99
-## Copyright (C) 1995-2003 Free Software Foundation, Inc.
-## This file is free software, distributed under the terms of the GNU
-## General Public License. As a special exception to the GNU General
-## Public License, this file may be distributed as part of a program
-## that contains a configuration script generated by Autoconf, under
-## the same distribution terms as the rest of that program.
-##
-## This file can can be used in projects which are not available under
-## the GNU General Public License or the GNU Library General Public
-## License but which still want to provide support for the GNU gettext
-## functionality.
-## Please note that the actual code of the KLIBC Library is partly covered
-## by the GNU Library General Public License, and party copyrighted by the
-## Regents of The University of California, and the rest is covered by a
-## MIT style license.
-
-# Authors:
-# Martin Schlemmer <azarah@nosferatu.za.org>, 2005.
-
-
-# AC_CHECK_KLIBC
-# --------------
-# Check if the user wants KLIBC support enabled. If so, set KLIBC=yes and
-# fill in KLIBC_PREFIX, KLIBC_BINDIR, KLIBC_SBINDIR, KLIBC_LIBDIR and
-# KLIBC_INCLUDEDIR. CC is also set to the proper klcc executable.
-# NOTE: This should be called before AC_PROG_CC, and before header, function
-# or type checks.
-AC_DEFUN([AC_CHECK_KLIBC],
-[AC_BEFORE([$0], [AC_PROG_CC])
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_ARG_ENABLE([klibc],
- [AS_HELP_STRING([--enable-klibc],
- [Enable linking to klibc [no]. You need at
- least klibc-1.0 or later for this. Set KLCC
- to the absolute file name of klcc if not in
- the PATH])],
- [KLIBC=$enableval], [KLIBC=no])
-AC_ARG_ENABLE([klibc-layout],
- [AS_HELP_STRING([--enable-klibc-layout],
- [Enable installing binaries, libraries and
- headers into the klibc prefix [yes] ])],
- [if test "X$KLIBC" != Xno; then
- KLIBC_LAYOUT=$enableval
- else
- KLIBC_LAYOUT=no
- fi],
- [if test "X$KLIBC" != Xno; then
- KLIBC_LAYOUT=yes
- else
- KLIBC_LAYOUT=no
- fi])
-
-if test "X$KLIBC" != Xno; then
- # Basic cross compiling support. I do not think it is wise to use
- # AC_CHECK_TOOL, because if we are cross compiling, we do not want
- # just 'klcc' to be returned ...
- if test "${host_alias}" != "${build_alias}"; then
- AC_CHECK_PROGS([KLCC], [${host_alias}-klcc], [no])
- else
- AC_CHECK_PROGS([KLCC], [klcc], [no])
- fi
- if test "X$KLCC" = Xno; then
- AC_MSG_ERROR([cannot find klibc frontend 'klcc'!])
- fi
-
- CC="$KLCC"
- CFLAGS="-Os -D__klibc__"
- #AC_DEFINE(__klibc__, 1, [Enable linking to klibc])
-
- KLIBC_KCROSS="$($KLCC -print-klibc-kcross 2>/dev/null)"
- KLIBC_PREFIX="$($KLCC -print-klibc-prefix 2>/dev/null)"
- KLIBC_BIN_DIR="$($KLCC -print-klibc-bindir 2>/dev/null)"
- KLIBC_SBIN_DIR="${KLIBC_PREFIX}/${KLIBC_KCROSS}sbin"
- KLIBC_LIB_DIR="$($KLCC -print-klibc-libdir 2>/dev/null)"
- KLIBC_INCLUDE_DIR="$($KLCC -print-klibc-includedir 2>/dev/null)"
-
- if test "X$KLIBC_LAYOUT" != Xno; then
- prefix="$KLIBC_PREFIX"
- bindir="$KLIBC_BIN_DIR"
- sbindir="$KLIBC_SBIN_DIR"
- libdir="$KLIBC_LIB_DIR"
- includedir="$KLIBC_INCLUDE_DIR"
- fi
-
- # At least KLIBC_LIB_DIR should be valid, else klibc is too old or
- # something went wrong
- if test ! -d "$KLIBC_LIB_DIR"; then
- AC_MSG_ERROR([your klibc installation is too old or not functional!])
- fi
-fi
-
-AC_SUBST(KLIBC)
-AM_CONDITIONAL(KLIBC, test "$KLIBC" != "no")
-])# AC_CHECK_KLIBC
-
OLDPROGS = mapscrn loadunimap
PROGS = \
dumpkeys loadkeys showkey setfont showconsolefont \
- setleds setmetamode kbd_mode psfxtable fgconsole
-
-if !KLIBC
-PROGS += kbdrate chvt deallocvt openvt
-endif
+ setleds setmetamode kbd_mode psfxtable fgconsole \
+ kbdrate chvt deallocvt openvt
if KEYCODES_PROGS
PROGS += getkeycodes setkeycodes
if OPTIONAL_PROGS
PROGS += \
- setlogcons setvesablank getunimap clrunimap outpsfheader setpalette
-
-if !KLIBC
-PROGS += screendump spawn_console spawn_login
-endif
+ setlogcons setvesablank getunimap clrunimap outpsfheader setpalette \
+ screendump spawn_console spawn_login
endif
dist_bin_SCRIPTS = unicode_start unicode_stop
UTF8_S = utf8.c utf8.h
XMAL_S = xmalloc.c xmalloc.h
-if KLIBC
-KLIBC_S = klibc_compat.c klibc_compat.h
-endif
-
chvt_SOURCES = $(ALL_S) chvt.c $(GETFD_S)
clrunimap_SOURCES = $(ALL_S) clrunimap.c $(GETFD_S) $(KDMA_S)
deallocvt_SOURCES = $(ALL_S) deallocvt.c $(GETFD_S)
getkeycodes_SOURCES = $(ALL_S) getkeycodes.c $(GETFD_S)
getunimap_SOURCES = $(ALL_S) getunimap.c $(GETFD_S) $(KDMA_S)
kbd_mode_SOURCES = $(ALL_S) kbd_mode.c $(GETFD_S)
-loadkeys_SOURCES = $(ALL_S) loadkeys.y $(GETFD_S) $(KSYMS_S) $(XMAL_S) $(FIND_S) $(KLIBC_S)
-loadunimap_SOURCES = $(ALL_S) loadunimap.c $(FIND_S) $(PSF_S) $(UTF8_S) $(XMAL_S) $(GETFD_S) $(KDMA_S) $(KLIBC_S)
+loadkeys_SOURCES = $(ALL_S) loadkeys.y $(GETFD_S) $(KSYMS_S) $(XMAL_S) $(FIND_S)
+loadunimap_SOURCES = $(ALL_S) loadunimap.c $(FIND_S) $(PSF_S) $(UTF8_S) $(XMAL_S) $(GETFD_S) $(KDMA_S)
mapscrn_SOURCES = $(ALL_S) mapscrn.c $(FIND_S) $(UTF8_S) $(XMAL_S) $(GETFD_S) $(KDMA_S)
openvt_SOURCES = $(ALL_S) openvt.c openvt.h $(GETFD_S)
-psfxtable_SOURCES = $(ALL_S) psfxtable.c $(PSF_S) $(XMAL_S) $(UTF8_S) $(GETFD_S) $(KLIBC_S)
+psfxtable_SOURCES = $(ALL_S) psfxtable.c $(PSF_S) $(XMAL_S) $(UTF8_S) $(GETFD_S)
resizecons_SOURCES = $(ALL_S) resizecons.c $(GETFD_S) $(FIND_S) $(XMAL_S)
screendump_SOURCES = $(ALL_S) screendump.c $(XMAL_S)
-setfont_SOURCES = $(ALL_S) setfont.c $(FIND_S) $(XMAL_S) $(GETFD_S) mapscrn.c $(KDMA_S) $(PSF_S) $(UTF8_S) kdfontop.c kdfontop.h $(UNIM_S) $(KLIBC_S)
+setfont_SOURCES = $(ALL_S) setfont.c $(FIND_S) $(XMAL_S) $(GETFD_S) mapscrn.c $(KDMA_S) $(PSF_S) $(UTF8_S) kdfontop.c kdfontop.h $(UNIM_S)
setkeycodes_SOURCES = $(ALL_S) setkeycodes.c $(GETFD_S)
setlogcons_SOURCES = $(ALL_S) setlogcons.c $(GETFD_S)
setpalette_SOURCES = $(ALL_S) setpalette.c $(GETFD_S)
setvesablank_SOURCES = $(ALL_S) setvesablank.c $(GETFD_S)
showconsolefont_SOURCES = $(ALL_S) showconsolefont.c $(GETFD_S) $(XMAL_S) $(KDMA_S) kdfontop.c kdfontop.h
-showkey_SOURCES = $(ALL_S) showkey.c $(GETFD_S) $(KLIBC_S)
+showkey_SOURCES = $(ALL_S) showkey.c $(GETFD_S)
mapscrn_CFLAGS = -DMAIN
loadunimap_CFLAGS = -DMAIN
#include "ksyms.h"
#include "kbd.h"
#include "xmalloc.h"
-#ifdef __klibc__
-#include "klibc_compat.h"
-#endif
extern int line_nr;
int yylval;
#include "ksyms.h"
#include "kbd.h"
#include "xmalloc.h"
-#ifdef __klibc__
-#include "klibc_compat.h"
-#endif
extern int line_nr;
int yylval;
int fd;
char *console = NULL;
-#ifndef __klibc__
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc >= 3 && !strcmp(argv[1], "-C"))
console = argv[2];
char diac_only = 0;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
while ((c = getopt_long(argc, argv,
short_opts, long_opts, NULL)) != -1) {
{ "next-available", no_argument, NULL, 'n' },
{ NULL, 0, NULL, 0 } };
-#ifndef __klibc__
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
set_progname(argv[0]);
while (( c = getopt_long (argc, argv, "Vhn", long_opts, NULL)) != EOF) {
static int ispipe;
void fpclose(FILE *fp) {
-#ifndef __klibc__
if (ispipe)
pclose(fp);
else
-#endif /* __klibc__ */
fclose(fp);
}
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
-#ifndef __klibc__
static struct decompressor {
char *ext; /* starts with `.', has no other dots */
char *cmd;
fprintf(stderr, _("error executing %s\n"), pipe_cmd);
return fp;
}
-#endif /* __klibc__ */
/* If a file PATHNAME exists, then open it.
If is has a `compressed' extension, then open a pipe reading it */
static FILE *
maybe_pipe_open(void) {
FILE *fp;
-#ifndef __klibc__
char *t;
struct decompressor *dc;
}
}
}
-#else
- fp = fopen(pathname, "r");
-#endif /* __klibc__ */
return fp;
}
DIR *d;
struct dirent *de;
char *ff, *fdir, *p, *q, **sp;
-#ifndef __klibc__
struct decompressor *dc;
-#endif /* __klibc__ */
int secondpass = 0;
ispipe = 0;
/* Does tail consist of a known suffix and possibly
a compression suffix? */
for(sp = suf; *sp; sp++) {
-#ifndef __klibc__
int l;
-#endif /* __klibc__ */
if (!strcmp(p, *sp))
return maybe_pipe_open();
-#ifndef __klibc__
l = strlen(*sp);
if (strncmp(p,*sp,l) == 0) {
for (dc = &decompressors[0]; dc->cmd; dc++)
if (strcmp(p+l, dc->ext) == 0)
return pipe_open(dc);
}
-#endif /* __klibc__ */
}
}
closedir(d);
char **dp, *dir, **sp;
FILE *fp;
int dl, recdepth;
-#ifndef __klibc__
struct decompressor *dc;
-#endif /* __klibc__ */
if (strlen(fnam) >= sizeof(pathname))
return NULL;
return fp;
}
-#ifndef __klibc__
for (sp = suffixes; *sp; sp++) {
for (dc = &decompressors[0]; dc->cmd; dc++) {
if (strlen(fnam) + strlen(*sp)
}
}
}
-#endif /* __klibc__ */
return NULL;
}
int old_kernel = 0;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && !strcmp(argv[1], "-V"))
print_version_and_exit();
struct unimapdesc ud;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 &&
(!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")))
char *console = NULL;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && !strcmp(argv[1], "-V"))
print_version_and_exit();
+++ /dev/null
-#include <stdio.h>
-#include <errno.h>
-#include "kbd.h"
-#include "klibc_compat.h"
-
-void clearerr(attr_unused FILE *stream) {
- errno = 0;
-}
-
-void rewind(FILE *stream) {
- (void)fseek(stream, 0L, SEEK_SET);
- clearerr(stream);
-}
-
-int feof(attr_unused FILE *stream) {
- return (errno == EOF);
-}
-
-int ferror(attr_unused FILE *stream) {
- return (errno != 0 && errno != EOF);
-}
-
-int ungetc(int c, FILE *stream) {
- if (fseek(stream, -1, SEEK_CUR) < 0)
- return EOF;
- else
- return c;
-}
+++ /dev/null
-#ifdef __klibc__
-#ifndef _KLIBC_COMPAT_H
-#define _KLIBC_COMPAT_H
-
-#include <malloc.h>
-
-#define signal sysv_signal
-
-extern void clearerr(FILE *stream);
-extern void rewind(FILE *stream);
-extern int feof(FILE *stream);
-extern int ferror(FILE *stream);
-extern int ungetc(int c, FILE *stream);
-
-#endif
-#endif /* __klibc__ */
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Line 189 of yacc.c */
-#line 167 "loadkeys.c"
+#line 166 "loadkeys.c"
/* Enabling traces. */
#ifndef YYDEBUG
/* Line 264 of yacc.c */
-#line 279 "loadkeys.c"
+#line 278 "loadkeys.c"
#ifdef short
# undef short
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
{
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 121 "loadkeys.y"
{
set_charset((char *) kbs_buf.kb_string);
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 126 "loadkeys.y"
{
alt_is_meta = 1;
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 131 "loadkeys.y"
{
strings_as_usual();
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 136 "loadkeys.y"
{
compose_as_usual((char *) kbs_buf.kb_string);
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 140 "loadkeys.y"
{
compose_as_usual(0);
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 145 "loadkeys.y"
{
keymaps_line_seen = 1;
case 22:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 153 "loadkeys.y"
{
int i;
case 23:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 159 "loadkeys.y"
{
addmap((yyvsp[(1) - (1)]),1);
case 24:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 164 "loadkeys.y"
{
if (KTYP((yyvsp[(2) - (5)])) != KT_FN)
case 25:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 173 "loadkeys.y"
{
compose((yyvsp[(2) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(5) - (6)]));
case 26:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 177 "loadkeys.y"
{
compose((yyvsp[(2) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(5) - (6)]));
case 27:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 182 "loadkeys.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 28:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 184 "loadkeys.y"
{ (yyval) = (yyvsp[(1) - (1)]) ^ 0xf000; }
break;
case 29:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 186 "loadkeys.y"
{ mod = 0; }
break;
case 30:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 188 "loadkeys.y"
{
addkey((yyvsp[(4) - (7)]), mod, (yyvsp[(6) - (7)]));
case 31:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 192 "loadkeys.y"
{
addkey((yyvsp[(3) - (6)]), 0, (yyvsp[(5) - (6)]));
case 34:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 199 "loadkeys.y"
{ mod |= M_SHIFT; }
break;
case 35:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 200 "loadkeys.y"
{ mod |= M_CTRL; }
break;
case 36:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 201 "loadkeys.y"
{ mod |= M_ALT; }
break;
case 37:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 202 "loadkeys.y"
{ mod |= M_ALTGR; }
break;
case 38:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 203 "loadkeys.y"
{ mod |= M_SHIFTL; }
break;
case 39:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 204 "loadkeys.y"
{ mod |= M_SHIFTR; }
break;
case 40:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 205 "loadkeys.y"
{ mod |= M_CTRLL; }
break;
case 41:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 206 "loadkeys.y"
{ mod |= M_CTRLR; }
break;
case 42:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 207 "loadkeys.y"
{ mod |= M_CAPSSHIFT; }
break;
case 43:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 210 "loadkeys.y"
{
int i, j;
case 46:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 246 "loadkeys.y"
{
if (rvalct >= MAX_NR_KEYMAPS)
case 47:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 253 "loadkeys.y"
{(yyval)=convert_code((yyvsp[(1) - (1)]), TO_AUTO);}
break;
case 48:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 255 "loadkeys.y"
{(yyval)=add_capslock((yyvsp[(2) - (2)]));}
break;
case 49:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 257 "loadkeys.y"
{(yyval)=convert_code((yyvsp[(1) - (1)])^0xf000, TO_AUTO);}
break;
case 50:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 259 "loadkeys.y"
{(yyval)=add_capslock((yyvsp[(2) - (2)])^0xf000);}
break;
case 51:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 261 "loadkeys.y"
{(yyval)=(yyvsp[(1) - (1)]);}
break;
case 52:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 263 "loadkeys.y"
{(yyval)=add_capslock((yyvsp[(2) - (2)]));}
break;
-/* Line 1455 of yacc.c */
-#line 1848 "loadkeys.c"
+/* Line 1464 of yacc.c */
+#line 1856 "loadkeys.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-/* Line 1675 of yacc.c */
+/* Line 1684 of yacc.c */
#line 265 "loadkeys.y"
char *console = NULL;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
while ((c = getopt_long(argc, argv,
short_opts, long_opts, NULL)) != -1) {
}
}
+ if (optu && opta) {
+ fprintf(stderr, _("%s: Options --unicode and --ascii are mutually exclusive\n"),
+ progname);
+ exit(1);
+ }
+
prefer_unicode = optu;
if (!optm && !optb) {
/* check whether the keyboard is in Unicode mode */
exit(1);
} else {
struct ccc {
- char c1, c2, c3;
+ unsigned char c1, c2, c3;
} def_latin1_composes[68] = {
{ '`', 'A', 0300 }, { '`', 'a', 0340 },
{ '\'', 'A', 0301 }, { '\'', 'a', 0341 },
char *console = NULL;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
while ((c = getopt_long(argc, argv,
short_opts, long_opts, NULL)) != -1) {
char *infnam = "def.uni";
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 &&
(!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")))
#include <stdio.h>
#include <stdlib.h>
-#ifndef __klibc__
#include <memory.h>
-#endif
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
int fd;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && !strcmp(argv[1], "-V"))
print_version_and_exit();
#define LOCALEDIR "/usr/share/locale"
#endif
-#ifndef __klibc__
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
-#endif
#ifdef ENABLE_NLS
# include <libintl.h>
#include "utf8.h"
#include "paths.h"
-#ifdef __klibc__
-#include "klibc_compat.h"
-#endif
-
extern char *progname;
static void
int inbuflth, fontbuflth;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && !strcmp(argv[1], "-V"))
print_version_and_exit();
char *defaultfont;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc < 2)
usage();
*/
#include <stdio.h>
-#ifndef __klibc__
#include <memory.h>
-#endif
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
int restore = 0;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
ifiles[0] = mfil = ufil = Ofil = ofil = omfil = oufil = NULL;
iunit = hwunit = 0;
struct kbkeycode a;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && !strcmp(argv[1], "-V"))
print_version_and_exit();
struct led *lp;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && (!strcmp("-V", argv[1]) || !strcmp("--version", argv[1])))
print_version_and_exit();
int fd, cons;
struct { char fn, subarg; } arg;
-#ifndef __klibc__
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2)
cons = atoi(argv[1]);
struct meta *mp;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && !strcmp(argv[1], "-V"))
print_version_and_exit();
int fd;
struct { char ten, onoff; } arg;
-#ifndef __klibc__
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc != 2) {
fprintf(stderr, _("usage: %s\n"), "setvesablank ON|on|off");
int list[64], lth, info = 0, verbose = 0;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 &&
(!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")))
#include <unistd.h>
#include <getopt.h>
#include <fcntl.h>
+#include <signal.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <linux/kd.h>
#include "nls.h"
#include "version.h"
-#ifndef __klibc__
- #include <signal.h>
-#else
- #include "klibc_compat.h"
-#endif
-
int tmp; /* for debugging */
int fd;
int i, n;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
while ((c = getopt_long(argc, argv,
short_opts, long_opts, NULL)) != -1) {
int fd, num;
set_progname(argv[0]);
-#ifndef __klibc__
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
-#endif
if (argc == 2 && !strcmp(argv[1], "-V"))
print_version_and_exit();
#include "kbd.h"
#include "../config.h"
-#ifdef __klibc__
-#include "klibc_compat.h"
-#endif
#include <string.h>
#include <stdlib.h>
#include "nls.h"
#include "xmalloc.h"
-#ifdef __klibc__
-#include "klibc_compat.h"
-#endif
-
extern char *progname;
static void attr_noreturn