summaryrefslogtreecommitdiffstats
path: root/bin/ps/keyword.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-06-06 18:04:46 +0000
committerjmallett <jmallett@FreeBSD.org>2002-06-06 18:04:46 +0000
commit3afc0fe27336608856ec5bc1ed9fd85395ad7816 (patch)
treeeff6f2571648886834dc0f5a0b8526fae2d07324 /bin/ps/keyword.c
parent8fe5b868335261d735f7fa5deadb833e39c0af75 (diff)
downloadFreeBSD-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/keyword.c')
-rw-r--r--bin/ps/keyword.c6
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;
OpenPOWER on IntegriCloud