diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-06-06 18:04:46 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-06-06 18:04:46 +0000 |
commit | 3afc0fe27336608856ec5bc1ed9fd85395ad7816 (patch) | |
tree | eff6f2571648886834dc0f5a0b8526fae2d07324 /bin/ps | |
parent | 8fe5b868335261d735f7fa5deadb833e39c0af75 (diff) | |
download | FreeBSD-src-3afc0fe27336608856ec5bc1ed9fd85395ad7816.zip FreeBSD-src-3afc0fe27336608856ec5bc1ed9fd85395ad7816.tar.gz |
As per behaviour on SVR4 systems, to allow any desirable type of header in the
override, seperate by comma (',') only, rather than any type of whitespace
(the literal space character (' ') had already been removed from this list).
This allows things like:
miamivice# ps -opid='Process
> Identifier'
Process
Identifier
1350
1445
1450
To work.
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/keyword.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 8616757..729a7c4 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -235,14 +235,16 @@ parsefmt(const char *p) static struct varent *vtail; char *tempstr, *tempstr1; -#define FMTSEP "\t,\n" tempstr1 = tempstr = strdup(p); while (tempstr && *tempstr) { char *cp; VAR *v; struct varent *vent; - while ((cp = strsep(&tempstr, FMTSEP)) != NULL && *cp == '\0') + /* + * Seperate the format by commas. + */ + while ((cp = strsep(&tempstr, ",")) != NULL && *cp == '\0') /* void */; if (cp == NULL || !(v = findvar(cp))) continue; |