search for: conv_escape_str

Displaying 10 results from an estimated 10 matches for "conv_escape_str".

2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...++ 3 files changed, 118 insertions(+), 47 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index a1c1e918..d49d4454 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -40,7 +40,7 @@ #include <string.h> #include <unistd.h> -static int conv_escape_str(char *); +static int conv_escape_str(char *, char **); static char *conv_escape(char *, int *); static int getchr(void); #ifdef HAVE_STRTOD @@ -75,6 +75,53 @@ static char **gargv; } \ } +#define ASPF(sp, f, func) ({ \ + int ret; \ + switch ((char *)param - (char *)array) { \ + default: \...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...++ 3 files changed, 118 insertions(+), 47 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index a1c1e918..d49d4454 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -40,7 +40,7 @@ #include <string.h> #include <unistd.h> -static int conv_escape_str(char *); +static int conv_escape_str(char *, char **); static char *conv_escape(char *, int *); static int getchr(void); #ifdef HAVE_STRTOD @@ -75,6 +75,53 @@ static char **gargv; } \ } +#define ASPF(sp, f, func) ({ \ + int ret; \ + switch ((char *)param - (char *)array) { \ + default: \...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
hello hpa, please pull for the dash update git pull git://brane.itp.tuwien.ac.at/~mattems/klibc.git maks with this changes: Alexey Gladkov (1): Check return code for getgroups and fwrite Herbert Xu (17): Remove unnecessary truncation in _STPUTC Always call conv_escape_str in echocmd Fix \c spillage across echo commands Release 0.5.3. Make eval with empty arguments return 0 Fixed inverted char class matching Fixed command -v segmentation fault Fix mkbuiltin sort order Fix typo in comment Remove unnecessary inclusion of...
2004 Aug 13
1
[PATCH] make spotless update
make spotless leaves 2 generated files. diff -purN klibc-0.159.orig/klibc/Makefile klibc-0.159/klibc/Makefile --- klibc-0.159.orig/klibc/Makefile 2004-08-03 23:07:05.000000000 +0200 +++ klibc-0.159/klibc/Makefile 2004-08-13 22:23:35.696699671 +0200 @@ -156,6 +156,7 @@ clean: archclean rm -f sha1hash errlist.c spotless: clean + rm -f include/klibc/havesyscall.h syscalls.nrs find . \( -name
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Optimise handling of backslash octals in printf
....uk> --- usr/dash/bltin/printf.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 72f89883..0e150d36 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -276,8 +276,8 @@ conv_escape_str(char *str, char **sp) if (ch != '\\') continue; - ch = *str++; - if (ch == 'c') { + c = *str++; + if (c == 'c') { /* \c as in SYSV echo - abort all processing.... */ c = ch = 0x100; continue; @@ -288,24 +288,11 @@ conv_escape_str(char *str, char **sp...
2019 Jan 25
0
[klibc:update-dash] builtin: Fix echo performance regression
...--git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 1f1fbde7..fe055fd2 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -100,20 +100,25 @@ static int print_escape_str(const char *f, int *param, int *array, char *s) int total; setstackmark(&smark); - done = conv_escape_str(s, &p); - q = stackblock(); - len = p - q; + done = conv_escape_str(s, &q); + p = stackblock(); + len = q - p; + total = len - 1; + + if (f[1] == 's') + goto easy; - p = makestrspace(len, p); - memset(p, 'X', len - 1); - p[len - 1] = 0; + p = makestrspace(len, q); + memse...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Optimise handling of backslash octals in printf
....uk> --- usr/dash/bltin/printf.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 72f89883..0e150d36 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -276,8 +276,8 @@ conv_escape_str(char *str, char **sp) if (ch != '\\') continue; - ch = *str++; - if (ch == 'c') { + c = *str++; + if (c == 'c') { /* \c as in SYSV echo - abort all processing.... */ c = ch = 0x100; continue; @@ -288,24 +288,11 @@ conv_escape_str(char *str, char **sp...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Fix echo performance regression
...--git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 1f1fbde7..fe055fd2 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -100,20 +100,25 @@ static int print_escape_str(const char *f, int *param, int *array, char *s) int total; setstackmark(&smark); - done = conv_escape_str(s, &p); - q = stackblock(); - len = p - q; + done = conv_escape_str(s, &q); + p = stackblock(); + len = q - p; + total = len - 1; + + if (f[1] == 's') + goto easy; - p = makestrspace(len, p); - memset(p, 'X', len - 1); - p[len - 1] = 0; + p = makestrspace(len, q); + memse...
2019 Jan 25
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...rap.c | 39 ++++++++++++++++++--------------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index b32b54f8..dcff0992 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -43,14 +43,14 @@ static int conv_escape_str(char *); static char *conv_escape(char *, int *); static int getchr(void); +#ifdef HAVE_STRTOD +static double getdouble(void); +#endif static intmax_t getintmax(void); static uintmax_t getuintmax(void); static char *getstr(void); static char *mklong(const char *, const char *); static voi...
2020 Mar 28
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...rap.c | 39 ++++++++++++++++++--------------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index b32b54f8..dcff0992 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -43,14 +43,14 @@ static int conv_escape_str(char *); static char *conv_escape(char *, int *); static int getchr(void); +#ifdef HAVE_STRTOD +static double getdouble(void); +#endif static intmax_t getintmax(void); static uintmax_t getuintmax(void); static char *getstr(void); static char *mklong(const char *, const char *); static voi...