search for: printfcmd

Displaying 6 results from an estimated 6 matches for "printfcmd".

Did you mean: printcmd
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Use error instead of warnx for fatal errors in printf
...dent.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 format [arg ...]"); gargv = ++argv; @@ -192,10 +190,8 @@ pc: fmt += strspn(fmt, SKIP2);...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Use error instead of warnx for fatal errors in printf
...dent.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 format [arg ...]"); gargv = ++argv; @@ -192,10 +190,8 @@ pc: fmt += strspn(fmt, SKIP2);...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Mark more regular built-ins
...ash/builtins.def.in index e1169632..e65749fd 100644 --- a/usr/dash/builtins.def.in +++ b/usr/dash/builtins.def.in @@ -69,25 +69,25 @@ exitcmd -s exit exportcmd -as export -as readonly falsecmd -u false getoptscmd -u getopts -hashcmd hash +hashcmd -u hash jobscmd -u jobs localcmd -as local printfcmd printf -pwdcmd pwd +pwdcmd -u pwd readcmd -u read returncmd -s return setcmd -s set shiftcmd -s shift trapcmd -s trap truecmd -s : -u true -typecmd type +typecmd -u type umaskcmd -u umask unaliascmd -u unalias unsetcmd -s unset waitcmd -u wait aliascmd -au alias #ifdef HAVE_GET...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...n, p); + memset(p, 'X', len - 1); + p[len - 1] = 0; + + q = stackblock(); + total = ASPF(&p, f, p); + + len = strchrnul(p, 'X') - p; + memcpy(p + len, q, strchrnul(p + len, ' ') - (p + len)); + + out1mem(p, total); + + popstackmark(&smark); + return done; +} + + int printfcmd(int argc, char *argv[]) { char *fmt; @@ -156,17 +203,14 @@ pc: fmt[1] = 0; switch (ch) { - case 'b': { - int done = conv_escape_str(getstr()); - char *p = stackblock(); + case 'b': *fmt = 's'; - PF(start, p); /* escape if a \c was encounte...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...n, p); + memset(p, 'X', len - 1); + p[len - 1] = 0; + + q = stackblock(); + total = ASPF(&p, f, p); + + len = strchrnul(p, 'X') - p; + memcpy(p + len, q, strchrnul(p + len, ' ') - (p + len)); + + out1mem(p, total); + + popstackmark(&smark); + return done; +} + + int printfcmd(int argc, char *argv[]) { char *fmt; @@ -156,17 +203,14 @@ pc: fmt[1] = 0; switch (ch) { - case 'b': { - int done = conv_escape_str(getstr()); - char *p = stackblock(); + case 'b': *fmt = 's'; - PF(start, p); /* escape if a \c was encounte...
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