search for: 72f89883

Displaying 4 results from an estimated 4 matches for "72f89883".

2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Use error instead of warnx for fatal errors in printf
...ff-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/bltin/printf.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index b439a3bb..72f89883 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -134,10 +134,8 @@ int printfcmd(int argc, char *argv[]) argv = argptr; format = *argv; - if (!format) { - warnx("usage: printf format [arg ...]"); - goto err; - } + if (!format) + error("usage: printf form...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Optimise handling of backslash octals in printf
...by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.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 a...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Use error instead of warnx for fatal errors in printf
...ff-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/bltin/printf.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index b439a3bb..72f89883 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -134,10 +134,8 @@ int printfcmd(int argc, char *argv[]) argv = argptr; format = *argv; - if (!format) { - warnx("usage: printf format [arg ...]"); - goto err; - } + if (!format) + error("usage: printf form...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Optimise handling of backslash octals in printf
...by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.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 a...