search for: gargv

Displaying 11 results from an estimated 11 matches for "gargv".

Did you mean: argv
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] Use error instead of warnx for fatal errors in printf
...tin/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); ch = *fmt; - if (!ch) { - warnx("missing format character"); - goto err; - } + if (!ch) + error("missing format character"); /* null terminate format string to we can use it as an...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Use error instead of warnx for fatal errors in printf
...tin/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); ch = *fmt; - if (!ch) { - warnx("missing format character"); - goto err; - } + if (!ch) + error("missing format character"); /* null terminate format string to we can use it as an...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Remove getintmax in printf
...f = mklong(start, fmt); - PF(f, p); + uintmax_t p = getuintmax(0); + start = mklong(start, fmt); + PF(start, p); break; } #ifdef HAVE_STRTOD @@ -408,30 +407,8 @@ getstr(void) return val; } -static intmax_t -getintmax(void) -{ - intmax_t val = 0; - char *cp, *ep; - - cp = *gargv; - if (cp == NULL) - goto out; - gargv++; - - val = (unsigned char) cp[1]; - if (*cp == '\"' || *cp == '\'') - goto out; - - errno = 0; - val = strtoimax(cp, &ep, 0); - check_conversion(cp, ep); -out: - return val; -} - static uintmax_t -getuintmax(void) +getuintmax(...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Remove getintmax in printf
...f = mklong(start, fmt); - PF(f, p); + uintmax_t p = getuintmax(0); + start = mklong(start, fmt); + PF(start, p); break; } #ifdef HAVE_STRTOD @@ -408,30 +407,8 @@ getstr(void) return val; } -static intmax_t -getintmax(void) -{ - intmax_t val = 0; - char *cp, *ep; - - cp = *gargv; - if (cp == NULL) - goto out; - gargv++; - - val = (unsigned char) cp[1]; - if (*cp == '\"' || *cp == '\'') - goto out; - - errno = 0; - val = strtoimax(cp, &ep, 0); - check_conversion(cp, ep); -out: - return val; -} - static uintmax_t -getuintmax(void) +getuintmax(...
2019 Jan 25
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...tmax_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__ char *dir = getcwd(0, 0); + if (dir) return dir; #else char buf[PATH_MAX]; - if(getcwd(buf, sizeof(buf))) + + if (getcwd(...
2020 Mar 28
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...tmax_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__ char *dir = getcwd(0, 0); + if (dir) return dir; #else char buf[PATH_MAX]; - if(getcwd(buf, sizeof(buf))) + + if (getcwd(...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...sh/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: \ + ret = xasprintf(sp, f, array[0], array[1], func); \ + break; \ + case sizeof(*param): \ + ret = xasprintf(sp, f, array[0], func); \ + break; \ + case 0: \ + ret = xasprintf(sp,...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...sh/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: \ + ret = xasprintf(sp, f, array[0], array[1], func); \ + break; \ + case sizeof(*param): \ + ret = xasprintf(sp, f, array[0], func); \ + break; \ + case 0: \ + ret = xasprintf(sp,...
2006 Jul 05
2
Procmail patch for dovecot delivery
...nst char*const lstfolder)), concon P((const int ch)), diff -Nur procmail-3.22-orig/src/procmail.c procmail-3.22/src/procmail.c --- procmail-3.22-orig/src/procmail.c 2001-09-11 06:59:14.000000000 +0200 +++ procmail-3.22/src/procmail.c 2006-07-04 20:12:35.000000000 +0200 @@ -306,7 +306,22 @@ } gargv=argv+argc; /* save it for nextrcfile() */ if(Deliverymode) /* try recipient without changing case first */ - { if(!(pass=auth_finduser(chp2,-1))) /* chp2 is the recipient */ + { + // GW + size_t str_len; + char* tmp; + +#define RECIPIENT "RECIPIENT&quot...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...(getstr()); + int done = conv_escape_str(getstr()); + char *p = stackblock(); *fmt = 's'; PF(start, p); /* escape if a \c was encountered */ - if (rval & 0x100) + if (done) goto out; *fmt = 'b'; break; @@ -212,7 +213,7 @@ pc: } while (gargv != argv && *gargv); out: - return (rval & ~0x100); + return rval; err: return 1; } @@ -222,7 +223,7 @@ err: * Print SysV echo(1) style escape string * Halts processing string if a \c escape is encountered. */ -static char * +static int conv_escape_str(char *str) { int c...