diff options
author | imp <imp@FreeBSD.org> | 2001-05-15 22:53:05 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-05-15 22:53:05 +0000 |
commit | 4d4667e40d820742bd59c18d446c968b693210f7 (patch) | |
tree | 949c73b53afb1763813b5bf7f375cbba06a108de /usr.sbin/kbdcontrol | |
parent | 1416b59ebce34ac2940538674c99014bcc6ffedc (diff) | |
download | FreeBSD-src-4d4667e40d820742bd59c18d446c968b693210f7.zip FreeBSD-src-4d4667e40d820742bd59c18d446c968b693210f7.tar.gz |
If PASTE isn't defined, define it as a transitional measure. This
allows me to complete make buildworld on my stable machine.
Also change termination case to be clearer what is going on while
searching for map files.
Diffstat (limited to 'usr.sbin/kbdcontrol')
-rw-r--r-- | usr.sbin/kbdcontrol/kbdcontrol.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c index 3a3d42f..14ff0f3 100644 --- a/usr.sbin/kbdcontrol/kbdcontrol.c +++ b/usr.sbin/kbdcontrol/kbdcontrol.c @@ -43,6 +43,14 @@ static const char rcsid[] = #include "path.h" #include "lex.h" +/* + * PASTE isn't defined in 4.x, but we need it to bridge to 5.0-current + * so define it here as a stop gap transition measure. + */ +#ifndef PASTE +#define PASTE 0xa3 /* paste from cut-paste buffer */ +#endif + char ctrl_names[32][4] = { "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", "bs ", "ht ", "nl ", "vt ", "ff ", "cr ", "so ", "si ", @@ -755,12 +763,13 @@ load_keymap(char *opt, int dumponly) if (cp != NULL) asprintf(&(prefix[0]), "%s/", cp); - for (i=0; prefix[i]; i++) - for (j=0; postfix[j]; j++) { + fd = NULL; + for (i=0; prefix[i] && fd == NULL; i++) { + for (j=0; postfix[j] && fd == NULL; j++) { name = mkfullname(prefix[i], opt, postfix[j]); - if ((fd = fopen(name, "r"))) - prefix[i + 1] = postfix[j + 1] = NULL; + fd = fopen(name, "r"); } + } if (fd == NULL) { warn("keymap file not found"); return; @@ -1128,5 +1137,3 @@ main(int argc, char **argv) usage(); exit(0); } - - |