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.
This commit is contained in:
jmallett 2002-06-06 18:04:46 +00:00
parent 8fe5b86833
commit 3afc0fe273

View File

@ -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;