diff options
author | 2016-04-11 19:54:53 +0000 | |
---|---|---|
committer | 2016-04-11 19:54:53 +0000 | |
commit | 5c93237dc61741a77e4aedea71fcbacffe8f97ad (patch) | |
tree | bc0e95ee0e85ecbc603cd014b3d6702559a8323f /lib/libedit/read.c | |
parent | - In isin(), quote $_b to ensure it's treated as string not as pattern. (diff) | |
download | wireguard-openbsd-5c93237dc61741a77e4aedea71fcbacffe8f97ad.tar.xz wireguard-openbsd-5c93237dc61741a77e4aedea71fcbacffe8f97ad.zip |
Move wrapper macros to the two files actually needing them:
FUNW, Strlen, Strdup, Strcmp, Strncmp, Strncpy, Strncat -> history.c
Strchr, tok_strdup -> tokenizer.c
FUN, TYPE, STR -> both of these files
OK martijn@
Also proofread by Christian Heckendorf <mbie at ulmus dot me>
who reported some whitespace issues in parse.c.
Diffstat (limited to 'lib/libedit/read.c')
-rw-r--r-- | lib/libedit/read.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libedit/read.c b/lib/libedit/read.c index 7353681b814..68d105f2098 100644 --- a/lib/libedit/read.c +++ b/lib/libedit/read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.32 2016/04/09 20:15:26 schwarze Exp $ */ +/* $OpenBSD: read.c,v 1.33 2016/04/11 19:54:54 schwarze Exp $ */ /* $NetBSD: read.c,v 1.88 2016/04/09 18:43:17 christos Exp $ */ /*- @@ -181,13 +181,13 @@ read__fixio(int fd __attribute__((__unused__)), int e) * Push a macro */ public void -FUN(el,push)(EditLine *el, const Char *str) +el_wpush(EditLine *el, const Char *str) { c_macro_t *ma = &el->el_chared.c_macro; if (str != NULL && ma->level + 1 < EL_MAXMACRO) { ma->level++; - if ((ma->macro[ma->level] = Strdup(str)) != NULL) + if ((ma->macro[ma->level] = wcsdup(str)) != NULL) return; ma->level--; } @@ -239,7 +239,7 @@ read_getcmd(EditLine *el, el_action_t *cmdnum, Char *ch) cmd = val.cmd; break; case XK_STR: - FUN(el,push)(el, val.str); + el_wpush(el, val.str); break; #ifdef notyet case XK_EXE: @@ -436,7 +436,7 @@ read_finish(EditLine *el) } public const Char * -FUN(el,gets)(EditLine *el, int *nread) +el_wgets(EditLine *el, int *nread) { int retval; el_action_t cmdnum = 0; |