diff options
author | charnier <charnier@FreeBSD.org> | 1997-07-29 06:42:33 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-07-29 06:42:33 +0000 |
commit | fd6672a69f8208890f90e23cab3f3c0b33532ae0 (patch) | |
tree | 0a13cec139ccb5b3737a8eb8c504c3063e9cd147 /usr.bin/more | |
parent | 481c9916674d2cd9120779ba92d7e8530ed04abd (diff) | |
download | FreeBSD-src-fd6672a69f8208890f90e23cab3f3c0b33532ae0.zip FreeBSD-src-fd6672a69f8208890f90e23cab3f3c0b33532ae0.tar.gz |
Add usage().
Diffstat (limited to 'usr.bin/more')
-rw-r--r-- | usr.bin/more/more.1 | 24 | ||||
-rw-r--r-- | usr.bin/more/option.c | 18 |
2 files changed, 28 insertions, 14 deletions
diff --git a/usr.bin/more/more.1 b/usr.bin/more/more.1 index 3355c04..ff49910 100644 --- a/usr.bin/more/more.1 +++ b/usr.bin/more/more.1 @@ -39,7 +39,7 @@ .Nm more .Nd file perusal filter for crt viewing .Sh SYNOPSIS -.Nm more +.Nm .Op Fl ceinus .Op Fl t Ar tag .Op Fl x Ar tabs @@ -65,19 +65,21 @@ line options will override them. .Bl -tag -width flag .It Fl c Normally, -.Nm more +.Nm will repaint the screen by scrolling from the bottom of the screen. If the .Fl c option is set, when -.Nm more +.Nm needs to change the entire display, it will paint from the top line down. .It Fl e Normally, if displaying a single file, -.Nm more +.Nm exits as soon as it reaches end-of-file. The .Fl e -option tells more to +option tells +.Nm +to exit if it reaches end-of-file twice without an intervening operation. .It Fl i The @@ -89,7 +91,7 @@ The .Fl n flag suppresses line numbers. The default (to use line numbers) may cause -.Nm more +.Nm to run more slowly in some cases, especially with a very large input file. Suppressing line numbers with the .Fl n @@ -113,7 +115,7 @@ containing that tag. For more information, see the command. .It Fl u By default, -.Nm more +.Nm treats backspaces and .Dv CR-LF sequences specially. Backspaces which appear @@ -143,7 +145,7 @@ option specifies a string that will be searched for before each file is displayed. .Sh COMMANDS Interactive commands for -.Nm more +.Nm are based on .Xr vi 1 . Some commands may be preceded by a decimal number, called N in the @@ -187,7 +189,7 @@ Go to line N in the file, default the end of the file. .It Ic p No or Ic \&% Go to a position N percent into the file. N should be between 0 and 100. (This works if standard input is being read, but only if -.Nm more +.Nm has already read to the end of the file. It is always fast, but not always useful.) .It Ic r No or Ic \&^L @@ -255,7 +257,7 @@ These options print out the number of the file currently being displayed relative to the total number of files there are to display, the current line number, the current byte number and the total bytes to display, and what percentage of the file has been displayed. If -.Nm more +.Nm is reading from stdin, or the file is shorter than a single screen, some of these items may not be available. Note, all of these items reference the first byte of the last line displayed on the screen. @@ -295,6 +297,6 @@ This software is derived from software contributed to Berkeley by Mark Nudleman. .Sh HISTORY The -.Nm more +.Nm command appeared in .Bx 3.0 . diff --git a/usr.bin/more/option.c b/usr.bin/more/option.c index a95e700..fbce050 100644 --- a/usr.bin/more/option.c +++ b/usr.bin/more/option.c @@ -33,7 +33,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)option.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <stdio.h> @@ -52,6 +56,8 @@ int tagoption; char *firstsearch; extern int sc_height; +static void usage __P((void)); + option(argc, argv) int argc; char **argv; @@ -120,9 +126,15 @@ option(argc, argv) break; case '?': default: - fprintf(stderr, - "usage: more [-ceinus] [-t tag] [-x tabs] [-/ pattern] [-#] [file ...]\n"); - exit(1); + usage(); } return(optind); } + +static void +usage() +{ + fprintf(stderr, + "usage: more [-ceinus] [-t tag] [-x tabs] [-/ pattern] [-#] [file ...]\n"); + exit(1); +} |