Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0103/6

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Man page and usage updates.
 [rsc] --rw-rw-r-- M 208511 glenda sys 735 Jan  4 07:37 sys/man/1/freq
	/n/sourcesdump/2006/0104/plan9/sys/man/1/freq:4,10 - 
	/n/sources/plan9/sys/man/1/freq:4,10
	  .SH SYNOPSIS
	  .B freq
	  [
	- .B -dxocr
	+ .B -cdorx
	  ]
	  [
	  .I file ...
 [rsc] --rw-rw-r-- M 208511 glenda sys 2257 Jan  4 07:37 sys/man/1/grep
	/n/sourcesdump/2006/0104/plan9/sys/man/1/grep:4,12 - 
	/n/sources/plan9/sys/man/1/grep:4,18
	  .SH SYNOPSIS
	  .B grep
	  [
	- .I option ...
	+ .B -bchiLlnsv
	  ]
	+ [
	+ .B -e
	  .I pattern
	+ [
	+ .B -f
	+ .I patternfile
	+ ]
	  [
	  .I file ...
	  ]
 [rsc] --rw-rw-r-- M 208511 presotto sys 4361 Jan  4 07:37 sys/man/1/gview
	/n/sourcesdump/2006/0104/plan9/sys/man/1/gview:4,17 - 
	/n/sources/plan9/sys/man/1/gview:4,14
	  .SH SYNOPSIS
	  .B gview
	  [
	- .B -l
	- .I logfile
	+ .B -mp
	  ]
	  [
	- .B -m
	- ]
	- [
	- .B -p
	+ .B -l
	+ .I logfile
	  ]
	  [
	  .I files
 [rsc] --rw-rw-r-- M 208511 glenda sys 2357 Jan  4 07:37 sys/man/1/hoc
	/n/sourcesdump/2006/0104/plan9/sys/man/1/hoc:4,14 - 
	/n/sources/plan9/sys/man/1/hoc:4,14
	  .SH SYNOPSIS
	  .B hoc
	  [
	- .I file ...
	- ]
	- [
	  .B -e
	  .I expression
	+ ]
	+ [
	+ .I file ...
	  ]
	  .SH DESCRIPTION
	  .I Hoc
 [rsc] --rw-rw-r-- M 208511 glenda sys 6098 Jan  4 07:37 sys/src/cmd/history.c
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/history.c:12,17 - 
	/n/sources/plan9/sys/src/cmd/history.c:12,18
	  int	diffb;
	  char*	sflag;
	  
	+ void	usage(void);
	  void	ysearch(char*, char*);
	  long	starttime(char*);
	  void	lastbefore(ulong, char*, char*, char*);
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/history.c:26,32 - 
	/n/sources/plan9/sys/src/cmd/history.c:27,33
	  	ndump = nil;
	  	ARGBEGIN {
	  	default:
	- 		goto usage;
	+ 		usage();
	  	case 'v':
	  		verb = 1;
	  		break;
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/history.c:50,64 - 
	/n/sources/plan9/sys/src/cmd/history.c:51,69
	  		break;
	  	} ARGEND
	  
	- 	if(argc == 0) {
	- 	usage:
	- 		fprint(2, "usage: history [-bDfuv] [-d 9fsname] [-s yyyymmdd] files\n");
	- 		exits(0);
	- 	}
	+ 	if(argc == 0)
	+ 		usage();
	  
	  	for(i=0; i<argc; i++)
	  		ysearch(argv[i], ndump);
	  	exits(0);
	+ }
	+ 
	+ void
	+ usage(void)
	+ {
	+ 	fprint(2, "usage: history [-bDfuv] [-d dumpfilesystem] [-s yyyymmdd] files\n");
	+ 	exits("usage");
	  }
	  
	  void
 [rsc] --rw-rw-r-- M 208511 glenda sys 1728 Jan  4 07:37 sys/src/cmd/freq.c
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/freq.c:5,10 - 
	/n/sources/plan9/sys/src/cmd/freq.c:5,11
	  long	count[1<<16];
	  Biobuf	bout;
	  
	+ void	usage(void);
	  void	freq(int, char*);
	  long	flag;
	  enum
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/freq.c:24,32 - 
	/n/sources/plan9/sys/src/cmd/freq.c:25,30
	  	flag = 0;
	  	Binit(&bout, 1, OWRITE);
	  	ARGBEGIN{
	- 	default:
	- 		fprint(2, "freq: unknown option %c\n", ARGC());
	- 		exits("usage");
	  	case 'd':
	  		flag |= Fdec;
	  		break;
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/freq.c:42,47 - 
	/n/sources/plan9/sys/src/cmd/freq.c:40,47
	  	case 'r':
	  		flag |= Frune;
	  		break;
	+ 	default:
	+ 		usage();
	  	}ARGEND
	  	if((flag&(Fdec|Fhex|Foct|Fchar)) == 0)
	  		flag |= Fdec | Fhex | Foct | Fchar;
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/freq.c:52,58 - 
	/n/sources/plan9/sys/src/cmd/freq.c:52,58
	  	for(i=0; i<argc; i++) {
	  		f = open(argv[i], 0);
	  		if(f < 0) {
	- 			fprint(2, "cannot open %s\n", argv[i]);
	+ 			fprint(2, "open %s: %r\n", argv[i]);
	  			continue;
	  		}
	  		freq(f, argv[i]);
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/freq.c:59,64 - 
	/n/sources/plan9/sys/src/cmd/freq.c:59,71
	  		close(f);
	  	}
	  	exits(0);
	+ }
	+ 
	+ void
	+ usage(void)
	+ {
	+ 	fprint(2, "usage: freq [-cdorx] [file ...]\n");
	+ 	exits("usage");
	  }
	  
	  void
 [rsc] --rw-rw-r-- M 208511 glenda sys 4686 Jan  4 07:37 sys/src/cmd/grep/main.c
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/grep/main.c:1,11 - 
	/n/sources/plan9/sys/src/cmd/grep/main.c:1,11
	  #define	EXTERN
	  #include	"grep.h"
	  
	- char *validflags = "1bchiLlnsv";
	+ char *validflags = "bchiLlnsv";
	  void
	  usage(void)
	  {
	- 	fprint(2, "usage: grep [-%s] [-f file] [-e expr] [file ...]\n", validflags);
	+ 	fprint(2, "usage: grep [-%s] [-e pattern] [-f patternfile] [file ...]\n", validflags);
	  	exits("usage");
	  }
	  
 [rsc] --rw-rw-r-- M 208511 presotto sys 50883 Jan  4 07:37 sys/src/cmd/gview.c
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/gview.c:1960,1966 - 
	/n/sources/plan9/sys/src/cmd/gview.c:1960,1966
	  	int i;
	  	fprintf(stderr,"Usage %s [options] [infile]\n", argv0);
	  	fprintf(stderr,
	- "option ::= -l logfile | -m\n"
	+ "option ::= -l logfile | -m | -p\n"
	  "\n"
	  "Read a polygonal line graph in an ASCII format (one x y pair per line, delimited\n"
	  "by spaces with a label after each polyline), and view it interactively.  Use\n"
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/gview.c:1968,1973 - 
	/n/sources/plan9/sys/src/cmd/gview.c:1968,1974
	  "Option -l specifies a file in which to log the coordinates of each point selected.\n"
	  "(Clicking a point with button one selects it and displays its coordinates and\n"
	  "the label of its polylone.)  Option -m allows polylines to be moved and rotated.\n"
	+ "The -p option plots only the vertices of the polygons.\n"
	  "The polyline labels can use the following color names:"
	  	);
	  	for (i=0; clrtab[i].c!=DNofill; i++)
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/gview.c:1981,1995 - 
	/n/sources/plan9/sys/src/cmd/gview.c:1982,1999
	  	int e;
	  
	  	ARGBEGIN {
	- 	case 'm': cantmv=0;
	+ 	case 'm':
	+ 		cantmv=0;
	  		break;
	- 	case 'l': logfil = fopen(ARGF(),"w");
	+ 	case 'l':
	+ 		logfil = fopen(ARGF(),"w");
	  		break;
	  	case 'p':
	  		plotdots++;
	  		break;
	- 	default: usage();
	- 	} ARGEND
	+ 	default:
	+ 		usage();
	+ 	} ARGEND;
	  
	  	if(initdraw(0, 0, "gview") < 0)
	  		exits("initdraw");

	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/gview.c:1960,1966 - 
	/n/sources/plan9/sys/src/cmd/gview.c:1960,1966
	  	int i;
	  	fprintf(stderr,"Usage %s [options] [infile]\n", argv0);
	  	fprintf(stderr,
	- "option ::= -l logfile | -m\n"
	+ "option ::= -l logfile | -m | -p\n"
	  "\n"
	  "Read a polygonal line graph in an ASCII format (one x y pair per line, delimited\n"
	  "by spaces with a label after each polyline), and view it interactively.  Use\n"
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/gview.c:1968,1973 - 
	/n/sources/plan9/sys/src/cmd/gview.c:1968,1974
	  "Option -l specifies a file in which to log the coordinates of each point selected.\n"
	  "(Clicking a point with button one selects it and displays its coordinates and\n"
	  "the label of its polylone.)  Option -m allows polylines to be moved and rotated.\n"
	+ "The -p option plots only the vertices of the polygons.\n"
	  "The polyline labels can use the following color names:"
	  	);
	  	for (i=0; clrtab[i].c!=DNofill; i++)
	/n/sourcesdump/2006/0104/plan9/sys/src/cmd/gview.c:1981,1995 - 
	/n/sources/plan9/sys/src/cmd/gview.c:1982,1999
	  	int e;
	  
	  	ARGBEGIN {
	- 	case 'm': cantmv=0;
	+ 	case 'm':
	+ 		cantmv=0;
	  		break;
	- 	case 'l': logfil = fopen(ARGF(),"w");
	+ 	case 'l':
	+ 		logfil = fopen(ARGF(),"w");
	  		break;
	  	case 'p':
	  		plotdots++;
	  		break;
	- 	default: usage();
	- 	} ARGEND
	+ 	default:
	+ 		usage();
	+ 	} ARGEND;
	  
	  	if(initdraw(0, 0, "gview") < 0)
	  		exits("initdraw");


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.