Since I'm not ready to add the non-standard ADD_PS_LISTRESET feature,

remove the #ifdef for it for now.  I might add the feature for real at
some later date, there isn't much reason for the #ifdef for now.
This commit is contained in:
Garance A Drosehn 2004-06-01 19:00:42 +00:00
parent 251130839b
commit a9626fb3b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129953

View File

@ -807,35 +807,10 @@ add_list(struct listinfo *inf, const char *argp)
}
if (!toolong) {
*cp = '\0';
#ifndef ADD_PS_LISTRESET
/*
* This is how the standard expects lists to
* be handled.
* Add this single element to the given list.
*/
inf->addelem(inf, elemcopy);
#else
/*-
* This would add a simple non-standard-but-convienent
* feature.
*
* XXX - The first time I tried to add this check,
* it increased the total size of `ps' by 3940
* bytes on i386! That's 12% of the entire
* program! The `ps.o' file grew by only about
* 40 bytes, but the final (stripped) executable
* in /bin/ps grew by 12%. I have not had time
* to investigate, so skip the feature for now.
*/
/*
* We now have a single element. Add it to the
* list, unless the element is ":". In that case,
* reset the list so previous entries are ignored.
*/
if (strcmp(elemcopy, ":") == 0)
inf->count = 0;
else
inf->addelem(inf, elemcopy);
#endif
} else {
/*
* The string is too long to copy. Find the end