From: Sebastian Pipping Date: Mon, 9 Apr 2012 00:51:43 +0000 (+0200) Subject: Untar keymaps X-Git-Tag: v3.4.30~8^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a3cc35f0637ce568d0f67cf8d4107ac04ed664fa;p=genkernel.git Untar keymaps --- diff --git a/defaults/keymaps.tar.gz b/defaults/keymaps.tar.gz deleted file mode 100644 index a490fad..0000000 Binary files a/defaults/keymaps.tar.gz and /dev/null differ diff --git a/defaults/keymaps/1.map b/defaults/keymaps/1.map new file mode 120000 index 0000000..8c0f732 --- /dev/null +++ b/defaults/keymaps/1.map @@ -0,0 +1 @@ +azerty.map \ No newline at end of file diff --git a/defaults/keymaps/10.map b/defaults/keymaps/10.map new file mode 120000 index 0000000..9f72389 --- /dev/null +++ b/defaults/keymaps/10.map @@ -0,0 +1 @@ +de.map \ No newline at end of file diff --git a/defaults/keymaps/11.map b/defaults/keymaps/11.map new file mode 120000 index 0000000..bceb1bd --- /dev/null +++ b/defaults/keymaps/11.map @@ -0,0 +1 @@ +dk.map \ No newline at end of file diff --git a/defaults/keymaps/12.map b/defaults/keymaps/12.map new file mode 120000 index 0000000..451cc56 --- /dev/null +++ b/defaults/keymaps/12.map @@ -0,0 +1 @@ +dvorak.map \ No newline at end of file diff --git a/defaults/keymaps/13.map b/defaults/keymaps/13.map new file mode 120000 index 0000000..168fab9 --- /dev/null +++ b/defaults/keymaps/13.map @@ -0,0 +1 @@ +es.map \ No newline at end of file diff --git a/defaults/keymaps/14.map b/defaults/keymaps/14.map new file mode 120000 index 0000000..3d123bb --- /dev/null +++ b/defaults/keymaps/14.map @@ -0,0 +1 @@ +et.map \ No newline at end of file diff --git a/defaults/keymaps/15.map b/defaults/keymaps/15.map new file mode 120000 index 0000000..066af66 --- /dev/null +++ b/defaults/keymaps/15.map @@ -0,0 +1 @@ +fi.map \ No newline at end of file diff --git a/defaults/keymaps/16.map b/defaults/keymaps/16.map new file mode 120000 index 0000000..80c93fe --- /dev/null +++ b/defaults/keymaps/16.map @@ -0,0 +1 @@ +fr.map \ No newline at end of file diff --git a/defaults/keymaps/17.map b/defaults/keymaps/17.map new file mode 120000 index 0000000..8a051ab --- /dev/null +++ b/defaults/keymaps/17.map @@ -0,0 +1 @@ +gr.map \ No newline at end of file diff --git a/defaults/keymaps/18.map b/defaults/keymaps/18.map new file mode 120000 index 0000000..9474d62 --- /dev/null +++ b/defaults/keymaps/18.map @@ -0,0 +1 @@ +hu.map \ No newline at end of file diff --git a/defaults/keymaps/19.map b/defaults/keymaps/19.map new file mode 120000 index 0000000..d590003 --- /dev/null +++ b/defaults/keymaps/19.map @@ -0,0 +1 @@ +il.map \ No newline at end of file diff --git a/defaults/keymaps/2.map b/defaults/keymaps/2.map new file mode 120000 index 0000000..88b0b00 --- /dev/null +++ b/defaults/keymaps/2.map @@ -0,0 +1 @@ +be.map \ No newline at end of file diff --git a/defaults/keymaps/20.map b/defaults/keymaps/20.map new file mode 120000 index 0000000..7727bac --- /dev/null +++ b/defaults/keymaps/20.map @@ -0,0 +1 @@ +is.map \ No newline at end of file diff --git a/defaults/keymaps/21.map b/defaults/keymaps/21.map new file mode 120000 index 0000000..d678e48 --- /dev/null +++ b/defaults/keymaps/21.map @@ -0,0 +1 @@ +it.map \ No newline at end of file diff --git a/defaults/keymaps/22.map b/defaults/keymaps/22.map new file mode 120000 index 0000000..60e7d65 --- /dev/null +++ b/defaults/keymaps/22.map @@ -0,0 +1 @@ +jp.map \ No newline at end of file diff --git a/defaults/keymaps/23.map b/defaults/keymaps/23.map new file mode 120000 index 0000000..d1a9079 --- /dev/null +++ b/defaults/keymaps/23.map @@ -0,0 +1 @@ +la.map \ No newline at end of file diff --git a/defaults/keymaps/24.map b/defaults/keymaps/24.map new file mode 120000 index 0000000..fbb0b72 --- /dev/null +++ b/defaults/keymaps/24.map @@ -0,0 +1 @@ +lt.map \ No newline at end of file diff --git a/defaults/keymaps/25.map b/defaults/keymaps/25.map new file mode 120000 index 0000000..f2533fb --- /dev/null +++ b/defaults/keymaps/25.map @@ -0,0 +1 @@ +mk.map \ No newline at end of file diff --git a/defaults/keymaps/26.map b/defaults/keymaps/26.map new file mode 120000 index 0000000..2761f4d --- /dev/null +++ b/defaults/keymaps/26.map @@ -0,0 +1 @@ +nl.map \ No newline at end of file diff --git a/defaults/keymaps/27.map b/defaults/keymaps/27.map new file mode 120000 index 0000000..b035af9 --- /dev/null +++ b/defaults/keymaps/27.map @@ -0,0 +1 @@ +no.map \ No newline at end of file diff --git a/defaults/keymaps/28.map b/defaults/keymaps/28.map new file mode 120000 index 0000000..fbd6e21 --- /dev/null +++ b/defaults/keymaps/28.map @@ -0,0 +1 @@ +pl.map \ No newline at end of file diff --git a/defaults/keymaps/29.map b/defaults/keymaps/29.map new file mode 120000 index 0000000..7978523 --- /dev/null +++ b/defaults/keymaps/29.map @@ -0,0 +1 @@ +pt.map \ No newline at end of file diff --git a/defaults/keymaps/3.map b/defaults/keymaps/3.map new file mode 120000 index 0000000..63107de --- /dev/null +++ b/defaults/keymaps/3.map @@ -0,0 +1 @@ +bg.map \ No newline at end of file diff --git a/defaults/keymaps/30.map b/defaults/keymaps/30.map new file mode 120000 index 0000000..a51e4db --- /dev/null +++ b/defaults/keymaps/30.map @@ -0,0 +1 @@ +ro.map \ No newline at end of file diff --git a/defaults/keymaps/31.map b/defaults/keymaps/31.map new file mode 120000 index 0000000..c23004d --- /dev/null +++ b/defaults/keymaps/31.map @@ -0,0 +1 @@ +ru.map \ No newline at end of file diff --git a/defaults/keymaps/32.map b/defaults/keymaps/32.map new file mode 120000 index 0000000..7b5cb3f --- /dev/null +++ b/defaults/keymaps/32.map @@ -0,0 +1 @@ +se.map \ No newline at end of file diff --git a/defaults/keymaps/33.map b/defaults/keymaps/33.map new file mode 120000 index 0000000..b510287 --- /dev/null +++ b/defaults/keymaps/33.map @@ -0,0 +1 @@ +sg.map \ No newline at end of file diff --git a/defaults/keymaps/34.map b/defaults/keymaps/34.map new file mode 120000 index 0000000..f6cb818 --- /dev/null +++ b/defaults/keymaps/34.map @@ -0,0 +1 @@ +sk-y.map \ No newline at end of file diff --git a/defaults/keymaps/35.map b/defaults/keymaps/35.map new file mode 120000 index 0000000..d2429bb --- /dev/null +++ b/defaults/keymaps/35.map @@ -0,0 +1 @@ +sk-z.map \ No newline at end of file diff --git a/defaults/keymaps/36.map b/defaults/keymaps/36.map new file mode 120000 index 0000000..e8d5b5f --- /dev/null +++ b/defaults/keymaps/36.map @@ -0,0 +1 @@ +slovene.map \ No newline at end of file diff --git a/defaults/keymaps/37.map b/defaults/keymaps/37.map new file mode 120000 index 0000000..e76e565 --- /dev/null +++ b/defaults/keymaps/37.map @@ -0,0 +1 @@ +trf.map \ No newline at end of file diff --git a/defaults/keymaps/38.map b/defaults/keymaps/38.map new file mode 120000 index 0000000..8aa41ed --- /dev/null +++ b/defaults/keymaps/38.map @@ -0,0 +1 @@ +trq.map \ No newline at end of file diff --git a/defaults/keymaps/39.map b/defaults/keymaps/39.map new file mode 120000 index 0000000..3e8aa5b --- /dev/null +++ b/defaults/keymaps/39.map @@ -0,0 +1 @@ +ua.map \ No newline at end of file diff --git a/defaults/keymaps/4.map b/defaults/keymaps/4.map new file mode 120000 index 0000000..1c53a25 --- /dev/null +++ b/defaults/keymaps/4.map @@ -0,0 +1 @@ +br-a.map \ No newline at end of file diff --git a/defaults/keymaps/40.map b/defaults/keymaps/40.map new file mode 120000 index 0000000..0eca050 --- /dev/null +++ b/defaults/keymaps/40.map @@ -0,0 +1 @@ +uk.map \ No newline at end of file diff --git a/defaults/keymaps/41.map b/defaults/keymaps/41.map new file mode 120000 index 0000000..2a3add6 --- /dev/null +++ b/defaults/keymaps/41.map @@ -0,0 +1 @@ +us.map \ No newline at end of file diff --git a/defaults/keymaps/42.map b/defaults/keymaps/42.map new file mode 120000 index 0000000..c800071 --- /dev/null +++ b/defaults/keymaps/42.map @@ -0,0 +1 @@ +wangbe.map \ No newline at end of file diff --git a/defaults/keymaps/5.map b/defaults/keymaps/5.map new file mode 120000 index 0000000..171e281 --- /dev/null +++ b/defaults/keymaps/5.map @@ -0,0 +1 @@ +br-l.map \ No newline at end of file diff --git a/defaults/keymaps/6.map b/defaults/keymaps/6.map new file mode 120000 index 0000000..daaf368 --- /dev/null +++ b/defaults/keymaps/6.map @@ -0,0 +1 @@ +by.map \ No newline at end of file diff --git a/defaults/keymaps/7.map b/defaults/keymaps/7.map new file mode 120000 index 0000000..d233aed --- /dev/null +++ b/defaults/keymaps/7.map @@ -0,0 +1 @@ +cf.map \ No newline at end of file diff --git a/defaults/keymaps/8.map b/defaults/keymaps/8.map new file mode 120000 index 0000000..0da9af3 --- /dev/null +++ b/defaults/keymaps/8.map @@ -0,0 +1 @@ +croat.map \ No newline at end of file diff --git a/defaults/keymaps/9.map b/defaults/keymaps/9.map new file mode 120000 index 0000000..cc77cf9 --- /dev/null +++ b/defaults/keymaps/9.map @@ -0,0 +1 @@ +cz.map \ No newline at end of file diff --git a/defaults/keymaps/azerty.map b/defaults/keymaps/azerty.map new file mode 100755 index 0000000..582399d Binary files /dev/null and b/defaults/keymaps/azerty.map differ diff --git a/defaults/keymaps/be.map b/defaults/keymaps/be.map new file mode 100755 index 0000000..000baef Binary files /dev/null and b/defaults/keymaps/be.map differ diff --git a/defaults/keymaps/bg.map b/defaults/keymaps/bg.map new file mode 100755 index 0000000..8974c8e Binary files /dev/null and b/defaults/keymaps/bg.map differ diff --git a/defaults/keymaps/br-a.map b/defaults/keymaps/br-a.map new file mode 100755 index 0000000..e833967 Binary files /dev/null and b/defaults/keymaps/br-a.map differ diff --git a/defaults/keymaps/br-l.map b/defaults/keymaps/br-l.map new file mode 100755 index 0000000..04b4a16 Binary files /dev/null and b/defaults/keymaps/br-l.map differ diff --git a/defaults/keymaps/by.map b/defaults/keymaps/by.map new file mode 100755 index 0000000..51f398f Binary files /dev/null and b/defaults/keymaps/by.map differ diff --git a/defaults/keymaps/cf.map b/defaults/keymaps/cf.map new file mode 100755 index 0000000..7d5fe9d Binary files /dev/null and b/defaults/keymaps/cf.map differ diff --git a/defaults/keymaps/croat.map b/defaults/keymaps/croat.map new file mode 100755 index 0000000..897ce98 Binary files /dev/null and b/defaults/keymaps/croat.map differ diff --git a/defaults/keymaps/cz.map b/defaults/keymaps/cz.map new file mode 100755 index 0000000..aeff074 Binary files /dev/null and b/defaults/keymaps/cz.map differ diff --git a/defaults/keymaps/de.map b/defaults/keymaps/de.map new file mode 100755 index 0000000..74df67c Binary files /dev/null and b/defaults/keymaps/de.map differ diff --git a/defaults/keymaps/dk.map b/defaults/keymaps/dk.map new file mode 100755 index 0000000..cab1c2b Binary files /dev/null and b/defaults/keymaps/dk.map differ diff --git a/defaults/keymaps/dvorak.map b/defaults/keymaps/dvorak.map new file mode 100755 index 0000000..bba26ba Binary files /dev/null and b/defaults/keymaps/dvorak.map differ diff --git a/defaults/keymaps/es.map b/defaults/keymaps/es.map new file mode 100755 index 0000000..d07b60b Binary files /dev/null and b/defaults/keymaps/es.map differ diff --git a/defaults/keymaps/et.map b/defaults/keymaps/et.map new file mode 100755 index 0000000..0b32075 Binary files /dev/null and b/defaults/keymaps/et.map differ diff --git a/defaults/keymaps/fi.map b/defaults/keymaps/fi.map new file mode 100755 index 0000000..1b2192a Binary files /dev/null and b/defaults/keymaps/fi.map differ diff --git a/defaults/keymaps/fr.map b/defaults/keymaps/fr.map new file mode 100755 index 0000000..09cfa30 Binary files /dev/null and b/defaults/keymaps/fr.map differ diff --git a/defaults/keymaps/gr.map b/defaults/keymaps/gr.map new file mode 100755 index 0000000..caa4e9f Binary files /dev/null and b/defaults/keymaps/gr.map differ diff --git a/defaults/keymaps/hu.map b/defaults/keymaps/hu.map new file mode 100755 index 0000000..8a694e0 Binary files /dev/null and b/defaults/keymaps/hu.map differ diff --git a/defaults/keymaps/il.map b/defaults/keymaps/il.map new file mode 100755 index 0000000..963be10 Binary files /dev/null and b/defaults/keymaps/il.map differ diff --git a/defaults/keymaps/is.map b/defaults/keymaps/is.map new file mode 100755 index 0000000..d29db81 Binary files /dev/null and b/defaults/keymaps/is.map differ diff --git a/defaults/keymaps/it.map b/defaults/keymaps/it.map new file mode 100755 index 0000000..7ee7323 Binary files /dev/null and b/defaults/keymaps/it.map differ diff --git a/defaults/keymaps/jp.map b/defaults/keymaps/jp.map new file mode 100755 index 0000000..3734d19 Binary files /dev/null and b/defaults/keymaps/jp.map differ diff --git a/defaults/keymaps/keymapList b/defaults/keymaps/keymapList new file mode 100755 index 0000000..7396871 --- /dev/null +++ b/defaults/keymaps/keymapList @@ -0,0 +1,10 @@ +Please select a keymap from the following list by typing in the appropriate +name or number. Hit Enter for the default "us/41" US English keymap. + + 1 azerty 7 cf 13 es 19 il 25 mk 31 ru 37 trf + 2 be 8 croat 14 et 20 is 26 nl 32 se 38 trq + 3 bg 9 cz 15 fi 21 it 27 no 33 sg 39 ua + 4 br-a 10 de 16 fr 22 jp 28 pl 34 sk-y 40 uk + 5 br-l 11 dk 17 gr 23 la 29 pt 35 sk-z 41 us + 6 by 12 dvorak 18 hu 24 lt 30 ro 36 slovene 42 wangbe + diff --git a/defaults/keymaps/la.map b/defaults/keymaps/la.map new file mode 100755 index 0000000..bad2de2 Binary files /dev/null and b/defaults/keymaps/la.map differ diff --git a/defaults/keymaps/lt.map b/defaults/keymaps/lt.map new file mode 100755 index 0000000..bddf4c6 Binary files /dev/null and b/defaults/keymaps/lt.map differ diff --git a/defaults/keymaps/mk.map b/defaults/keymaps/mk.map new file mode 100755 index 0000000..5e97953 Binary files /dev/null and b/defaults/keymaps/mk.map differ diff --git a/defaults/keymaps/nl.map b/defaults/keymaps/nl.map new file mode 100755 index 0000000..c1c73ea Binary files /dev/null and b/defaults/keymaps/nl.map differ diff --git a/defaults/keymaps/no.map b/defaults/keymaps/no.map new file mode 100755 index 0000000..a5ae10e Binary files /dev/null and b/defaults/keymaps/no.map differ diff --git a/defaults/keymaps/pl.map b/defaults/keymaps/pl.map new file mode 100755 index 0000000..ec857d5 Binary files /dev/null and b/defaults/keymaps/pl.map differ diff --git a/defaults/keymaps/pt.map b/defaults/keymaps/pt.map new file mode 100755 index 0000000..553ab57 Binary files /dev/null and b/defaults/keymaps/pt.map differ diff --git a/defaults/keymaps/ro.map b/defaults/keymaps/ro.map new file mode 100755 index 0000000..e1e26a3 Binary files /dev/null and b/defaults/keymaps/ro.map differ diff --git a/defaults/keymaps/ru.map b/defaults/keymaps/ru.map new file mode 100755 index 0000000..50bde7a Binary files /dev/null and b/defaults/keymaps/ru.map differ diff --git a/defaults/keymaps/se.map b/defaults/keymaps/se.map new file mode 100755 index 0000000..66b700a Binary files /dev/null and b/defaults/keymaps/se.map differ diff --git a/defaults/keymaps/sg.map b/defaults/keymaps/sg.map new file mode 100755 index 0000000..db4e166 Binary files /dev/null and b/defaults/keymaps/sg.map differ diff --git a/defaults/keymaps/sk-y.map b/defaults/keymaps/sk-y.map new file mode 100755 index 0000000..ac1cf01 Binary files /dev/null and b/defaults/keymaps/sk-y.map differ diff --git a/defaults/keymaps/sk-z.map b/defaults/keymaps/sk-z.map new file mode 100755 index 0000000..e1f76eb Binary files /dev/null and b/defaults/keymaps/sk-z.map differ diff --git a/defaults/keymaps/slovene.map b/defaults/keymaps/slovene.map new file mode 100755 index 0000000..8a8c2e8 Binary files /dev/null and b/defaults/keymaps/slovene.map differ diff --git a/defaults/keymaps/trf.map b/defaults/keymaps/trf.map new file mode 100755 index 0000000..77908f6 Binary files /dev/null and b/defaults/keymaps/trf.map differ diff --git a/defaults/keymaps/trq.map b/defaults/keymaps/trq.map new file mode 100755 index 0000000..0cd72a0 --- /dev/null +++ b/defaults/keymaps/trq.map @@ -0,0 +1,390 @@ +/* + * test(1); version 7-like -- author Erik Baalbergen + * modified by Eric Gisin to be used as built-in. + * modified by Arnold Robbins to add SVR3 compatibility + * (-x -c -b -p -u -g -k) plus Korn's -L -nt -ot -ef and new -S (socket). + */ + +static char *RCSid = "$Id: c_test.c,v 3.3 89/03/27 15:47:25 egisin Exp $"; + +#include +/*#include */ +#include +#include +#include +#include +#include +#include "bltin.h" + +/* test(1) accepts the following grammar: +oexpr ::= aexpr | aexpr "-o" oexpr ; +aexpr ::= nexpr | nexpr "-a" aexpr ; +nexpr ::= primary ! "!" primary +primary ::= unary-operator operand + | operand binary-operator operand + | operand + | "(" oexpr ")" + ; +unary-operator ::= "-r"|"-w"|"-x"|"-f"|"-d"|"-c"|"-b"|"-p"| + "-u"|"-g"|"-k"|"-s"|"-t"|"-z"|"-n"|"-o"|"-O"|"-G"|"-L"|"-S"; + +binary-operator ::= "="|"!="|"-eq"|"-ne"|"-ge"|"-gt"|"-le"|"-lt"| + "-nt"|"-ot"|"-ef"; +operand ::= +*/ + +#define evaluate(x) getn(x) +#define errorf error + +#define EOI 0 +#define FILRD 1 +#define FILWR 2 +#define FILREG 3 +#define FILID 4 +#define FILGZ 5 +#define FILTT 6 +#define STZER 7 +#define STNZE 8 +#define STEQL 9 +#define STNEQ 10 +#define INTEQ 11 +#define INTNE 12 +#define INTGE 13 +#define INTGT 14 +#define INTLE 15 +#define INTLT 16 +#define UNOT 17 +#define BAND 18 +#define BOR 19 +#define LPAREN 20 +#define RPAREN 21 +#define OPERAND 22 +#define FILEX 23 +#define FILCDEV 24 +#define FILBDEV 25 +#define FILFIFO 26 +#define FILSETU 27 +#define FILSETG 28 +#define FILSTCK 29 +#define FILSYM 30 +#define FILNT 31 +#define FILOT 32 +#define FILEQ 33 +#define FILSOCK 34 +#define FILUID 35 +#define FILGID 36 +#define OPTION 37 + +#define UNOP 1 +#define BINOP 2 +#define BUNOP 3 +#define BBINOP 4 +#define PAREN 5 + +struct t_op { +char *op_text; +short op_num, op_type; +} const ops [] = { +{"-r", FILRD, UNOP}, +{"-w", FILWR, UNOP}, +{"-x", FILEX, UNOP}, +{"-f", FILREG, UNOP}, +{"-d", FILID, UNOP}, +{"-c", FILCDEV,UNOP}, +{"-b", FILBDEV,UNOP}, +{"-p", FILFIFO,UNOP}, +{"-u", FILSETU,UNOP}, +{"-g", FILSETG,UNOP}, +{"-k", FILSTCK,UNOP}, +{"-s", FILGZ, UNOP}, +{"-t", FILTT, UNOP}, +{"-z", STZER, UNOP}, +{"-n", STNZE, UNOP}, +#if 0 /* conficts with binary -o */ +{"-o", OPTION, UNOP}, +#endif +{"-U", FILUID, UNOP}, +{"-G", FILGID, UNOP}, +{"-L", FILSYM, UNOP}, +{"-S", FILSOCK,UNOP}, +{"=", STEQL, BINOP}, +{"!=", STNEQ, BINOP}, +{"-eq", INTEQ, BINOP}, +{"-ne", INTNE, BINOP}, +{"-ge", INTGE, BINOP}, +{"-gt", INTGT, BINOP}, +{"-le", INTLE, BINOP}, +{"-lt", INTLT, BINOP}, +{"-nt", FILNT, BINOP}, +{"-ot", FILOT, BINOP}, +{"-ef", FILEQ, BINOP}, +{"!", UNOT, BUNOP}, +{"-a", BAND, BBINOP}, +{"-o", BOR, BBINOP}, +{"(", LPAREN, PAREN}, +{")", RPAREN, PAREN}, +{0, 0, 0} +}; + +char **t_wp; +struct t_op const *t_wp_op; + +static void syntax(); + +int +testcmd(argc, wp) +char **wp; +{ +int res; + +t_wp = wp+1; +if (strcmp(wp[0], "[") == 0) { + while (*wp != NULL) + wp++; + if (strcmp(*--wp, "]") != 0) + errorf("[: missing ]"); + *wp = NULL; +} +res = *t_wp == NULL || !oexpr(t_lex(*t_wp)); + +if (*t_wp != NULL && *++t_wp != NULL) + syntax(*t_wp, "unknown operand"); + +return res; +} + +static void +syntax(op, msg) +char *op; +char *msg; +{ +if (op && *op) + errorf("%s: %s", op, msg); +else + errorf("%s", msg); +} + +oexpr(n) +{ +int res; + +res = aexpr(n); +if (t_lex(*++t_wp) == BOR) + return oexpr(t_lex(*++t_wp)) || res; +t_wp--; +return res; +} + +aexpr(n) +{ +int res; + +res = nexpr(n); +if (t_lex(*++t_wp) == BAND) + return aexpr(t_lex(*++t_wp)) && res; +t_wp--; +return res; +} + +nexpr(n) +int n; /* token */ +{ +if (n == UNOT) + return !nexpr(t_lex(*++t_wp)); +return primary(n); +} + +primary(n) +int n; /* token */ +{ +register char *opnd1, *opnd2; +int res; + +if (n == EOI) + syntax(NULL, "argument expected"); +if (n == LPAREN) { + res = oexpr(t_lex(*++t_wp)); + if (t_lex(*++t_wp) != RPAREN) + syntax(NULL, "closing paren expected"); + return res; +} +if (t_wp_op && t_wp_op->op_type == UNOP) { + /* unary expression */ + if (*++t_wp == NULL && n != FILTT) + syntax(t_wp_op->op_text, "argument expected"); + switch (n) { + /** + case OPTION: + return flag[option(*t_wp)]; + **/ + case STZER: + return strlen(*t_wp) == 0; + case STNZE: + return strlen(*t_wp) != 0; + case FILTT: + if (**t_wp < '0' || **t_wp > '9') + return filstat("0", n); + default: /* all other FIL* */ + return filstat(*t_wp, n); + } +} +opnd1 = *t_wp; +(void) t_lex(*++t_wp); +if (t_wp_op && t_wp_op->op_type == BINOP) { + struct t_op const *op = t_wp_op; + + if ((opnd2 = *++t_wp) == (char *)0) + syntax(op->op_text, "argument expected"); + + switch (op->op_num) { + case STEQL: + return strcmp(opnd1, opnd2) == 0; + case STNEQ: + return strcmp(opnd1, opnd2) != 0; + case INTEQ: + return evaluate(opnd1) == evaluate(opnd2); + case INTNE: + return evaluate(opnd1) != evaluate(opnd2); + case INTGE: + return evaluate(opnd1) >= evaluate(opnd2); + case INTGT: + return evaluate(opnd1) > evaluate(opnd2); + case INTLE: + return evaluate(opnd1) <= evaluate(opnd2); + case INTLT: + return evaluate(opnd1) < evaluate(opnd2); + case FILNT: + return newerf (opnd1, opnd2); + case FILOT: + return olderf (opnd1, opnd2); + case FILEQ: + return equalf (opnd1, opnd2); + } +} +t_wp--; +return strlen(opnd1) > 0; +} + +filstat(nm, mode) +char *nm; +{ +struct stat s; + +switch (mode) { +case FILRD: + return access(nm, 4) == 0; +case FILWR: + return access(nm, 2) == 0; +case FILEX: + return access(nm, 1) == 0; +case FILREG: + return stat(nm, &s) == 0 && (s.st_mode & S_IFMT) == S_IFREG; +case FILID: + return stat(nm, &s) == 0 && (s.st_mode & S_IFMT) == S_IFDIR; +case FILCDEV: + return stat(nm, &s) == 0 && (s.st_mode & S_IFMT) == S_IFCHR; +case FILBDEV: + return stat(nm, &s) == 0 && (s.st_mode & S_IFMT) == S_IFBLK; +case FILFIFO: +#ifdef S_IFIFO + return stat(nm, &s) == 0 && (s.st_mode & S_IFMT) == S_IFIFO; +#else + return 0; +#endif +case FILSETU: + return stat(nm, &s) == 0 && (s.st_mode & S_ISUID) == S_ISUID; +case FILSETG: + return stat(nm, &s) == 0 && (s.st_mode & S_ISGID) == S_ISGID; +case FILSTCK: + return stat(nm, &s) == 0 && (s.st_mode & S_ISVTX) == S_ISVTX; +case FILGZ: + return stat(nm, &s) == 0 && s.st_size > 0L; +case FILTT: + return isatty(getn(nm)); + case FILUID: + return stat(nm, &s) == 0 && s.st_uid == geteuid(); + case FILGID: + return stat(nm, &s) == 0 && s.st_gid == getegid(); +#ifdef S_IFLNK +case FILSYM: + return lstat(nm, &s) == 0 && (s.st_mode & S_IFMT) == S_IFLNK; +#endif +#ifdef S_IFSOCK +case FILSOCK: + return stat(nm, &s) == 0 && (s.st_mode & S_IFMT) == S_IFSOCK; +#endif + default: + return 1; +} +} + +int +t_lex(s) +register char *s; +{ +register struct t_op const *op = ops; + +if (s == 0) { + t_wp_op = (struct t_op *)0; + return EOI; +} +while (op->op_text) { + if (strcmp(s, op->op_text) == 0) { + t_wp_op = op; + return op->op_num; + } + op++; +} +t_wp_op = (struct t_op *)0; +return OPERAND; +} + +newerf (f1, f2) +char *f1, *f2; +{ +struct stat b1, b2; + +return (stat (f1, &b1) == 0 && + stat (f2, &b2) == 0 && + b1.st_mtime > b2.st_mtime); +} + +olderf (f1, f2) +char *f1, *f2; +{ +struct stat b1, b2; + +return (stat (f1, &b1) == 0 && + stat (f2, &b2) == 0 && + b1.st_mtime < b2.st_mtime); +} + +equalf (f1, f2) +char *f1, *f2; +{ +struct stat b1, b2; + +return (stat (f1, &b1) == 0 && + stat (f2, &b2) == 0 && + b1.st_dev == b2.st_dev && + b1.st_ino == b2.st_ino); +} + +/* atoi with error detection */ + +getn(as) +char *as; +{ +register char *s; +register int n; + +s = as; +if (*s == '-') + s++; +for (n = 0; *s >= '0' && *s <= '9'; s++) + n = (n*10) + (*s-'0'); +if (*s) + errorf("%s: bad number", as); +return (*as == '-') ? -n : n; +} + diff --git a/defaults/keymaps/ua.map b/defaults/keymaps/ua.map new file mode 100755 index 0000000..fe7150c Binary files /dev/null and b/defaults/keymaps/ua.map differ diff --git a/defaults/keymaps/uk.map b/defaults/keymaps/uk.map new file mode 100755 index 0000000..5b405f8 Binary files /dev/null and b/defaults/keymaps/uk.map differ diff --git a/defaults/keymaps/us.map b/defaults/keymaps/us.map new file mode 100755 index 0000000..9edb31e Binary files /dev/null and b/defaults/keymaps/us.map differ diff --git a/defaults/keymaps/wangbe.map b/defaults/keymaps/wangbe.map new file mode 100755 index 0000000..36adec9 Binary files /dev/null and b/defaults/keymaps/wangbe.map differ diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index 384d4f5..45c52b9 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -463,7 +463,7 @@ which the ramdisk scripts would recognize. *keymap*='MAP':: Set keymap to 'MAP', e.g. *keymap*=de. For valid values of 'MAP' please see - '/usr/share/genkernel/defaults/keymaps.tar.gz'. + '/usr/share/genkernel/defaults/keymaps/'. *dokeymap*:: Use keymap. Usage of *keymap*= implies this option, already. diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 4838234..f3c14c2 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -604,8 +604,10 @@ append_auxilary() { fi if isTrue $CMD_KEYMAP then - mkdir -p "${TEMP}/initramfs-aux-temp/lib/keymaps" - /bin/tar -C "${TEMP}/initramfs-aux-temp/lib/keymaps" -zxf "${GK_SHARE}/defaults/keymaps.tar.gz" + print_info 1 " >> Copying keymaps" + mkdir -p "${TEMP}/initramfs-aux-temp/lib/" + cp -R "${GK_SHARE}/defaults/keymaps" "${TEMP}/initramfs-aux-temp/lib/" \ + || gen_die "Error while copying keymaps" fi cd ${TEMP}/initramfs-aux-temp/sbin && ln -s ../init init