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:
Juli Mallett 2002-06-06 18:04:46 +00:00
parent 4467cfa4b4
commit 40fea9c3a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97944

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;