hiding from w(1)?

rfd at ARDC.ARPA rfd at ARDC.ARPA
Tue Jun 26 09:48:58 AEST 1984


From:      "Robert F. Donnelly" (MISD-WAD) <rfd at ARDC.ARPA>

	The simplest way to fix w and ps from telling too much is to search the
command line and stop printing after you reach the first blank. Included is the
diff's from old code to new code.

... Bob 

First w

20a21
> #include <strings.h>
118c119
< 	char *cp;
---
> 	char *cp, *index();
120a122
> 	register char *pt_blank;
271a274,275
> 				if( (pt_blank = index(pr[i].w_args,' ')) != 0 )
> 					*pt_blank = '\0';
318a323,324
> 	register char *pt_blank;
> 	char *index();
349a356,357
> 	if( (pt_blank = index(doing, ' ')) != 0 )
> 		*pt_blank = '\0';

and now ps

22a23
> #include <strings.h>
149a151
> 	char *pt_blank, *index();
292c294,296
< 		else
---
> 		else {
> 			if( (pt_blank = index(sp->ap->a_cmdp,' ')) != 0)
> 				*pt_blank = '\0';
293a298
> 		}



More information about the Comp.unix.wizards mailing list