search for: check_conversion

Displaying 9 results from an estimated 9 matches for "check_conversion".

2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Remove getintmax in printf
...8 +46,7 @@ static int getchr(void); #ifdef HAVE_STRTOD static double getdouble(void); #endif -static intmax_t getintmax(void); -static uintmax_t getuintmax(void); +static uintmax_t getuintmax(int); static char *getstr(void); static char *mklong(const char *, const char *); static void check_conversion(const char *, const char *); @@ -181,14 +180,14 @@ pc: /* skip to field width */ fmt += strspn(fmt, SKIP1); if (*fmt == '*') - *param++ = getintmax(); + *param++ = getuintmax(1); /* skip to possible '.', get following precision */ fmt += strspn(fmt, SKIP2...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Remove getintmax in printf
...8 +46,7 @@ static int getchr(void); #ifdef HAVE_STRTOD static double getdouble(void); #endif -static intmax_t getintmax(void); -static uintmax_t getuintmax(void); +static uintmax_t getuintmax(int); static char *getstr(void); static char *mklong(const char *, const char *); static void check_conversion(const char *, const char *); @@ -181,14 +180,14 @@ pc: /* skip to field width */ fmt += strspn(fmt, SKIP1); if (*fmt == '*') - *param++ = getintmax(); + *param++ = getuintmax(1); /* skip to possible '.', get following precision */ fmt += strspn(fmt, SKIP2...
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] Simplify echo command
....uk> --- usr/dash/bltin/printf.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 0e150d36..d4ae794d 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -448,33 +448,21 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { - int nonl = 0; - struct output *outs = out1; - - if (!*++argv) - goto end; - if (equal(*argv, "-n")) { - nonl = ~nonl; - if (!*++argv) - goto end; - } + int nonl; + + nonl = *++argv ? equal(*argv, "-n")...
2019 Jan 25
0
[klibc:update-dash] builtin: Move echo space/nl handling into print_escape_str
...sr/dash/bltin/printf.c @@ -105,6 +105,8 @@ static int print_escape_str(const char *f, int *param, int *array, char *s) len = q - p; total = len - 1; + q[-1] = (!!((f[1] - 's') | done) - 1) & f[2]; + total += !!q[-1]; if (f[1] == 's') goto easy; @@ -461,21 +463,22 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { + const char *lastfmt = snlfmt; int nonl; - nonl = *++argv ? equal(*argv, "-n") : 0; - argv += nonl; + if (*++argv && equal(*argv, "-n")) { + argv++; + lastfmt = "%s"; + } do { -...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Simplify echo command
....uk> --- usr/dash/bltin/printf.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 0e150d36..d4ae794d 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -448,33 +448,21 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { - int nonl = 0; - struct output *outs = out1; - - if (!*++argv) - goto end; - if (equal(*argv, "-n")) { - nonl = ~nonl; - if (!*++argv) - goto end; - } + int nonl; + + nonl = *++argv ? equal(*argv, "-n")...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Move echo space/nl handling into print_escape_str
...sr/dash/bltin/printf.c @@ -105,6 +105,8 @@ static int print_escape_str(const char *f, int *param, int *array, char *s) len = q - p; total = len - 1; + q[-1] = (!!((f[1] - 's') | done) - 1) & f[2]; + total += !!q[-1]; if (f[1] == 's') goto easy; @@ -461,21 +463,22 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { + const char *lastfmt = snlfmt; int nonl; - nonl = *++argv ? equal(*argv, "-n") : 0; - argv += nonl; + if (*++argv && equal(*argv, "-n")) { + argv++; + lastfmt = "%s"; + } do { -...
2019 Jan 25
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...); 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 void check_conversion(const char *, const char *); -#ifdef HAVE_STRTOD -static double getdouble(void); -#endif static int rval; static char **gargv; diff --git a/usr/dash/cd.c b/usr/dash/cd.c index 89c6c30c..2d9d4b52 100644 --- a/usr/dash/cd.c +++ b/usr/dash/cd.c @@ -254,13 +254,16 @@ getpwd() { #ifdef __GLIBC__...
2020 Mar 28
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...); 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 void check_conversion(const char *, const char *); -#ifdef HAVE_STRTOD -static double getdouble(void); -#endif static int rval; static char **gargv; diff --git a/usr/dash/cd.c b/usr/dash/cd.c index 89c6c30c..2d9d4b52 100644 --- a/usr/dash/cd.c +++ b/usr/dash/cd.c @@ -254,13 +254,16 @@ getpwd() { #ifdef __GLIBC__...