SCCS-vsn: usr.bin/more/prim.c 5.6
SCCS-vsn: usr.bin/more/more.1 5.10
.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.\" @(#)more.1 5.9 (Berkeley) %G%
+.\" @(#)more.1 5.10 (Berkeley) %G%
Followed by any lowercase letter, returns to the position which
was previously marked with that letter.
Followed by another single quote, returns to the postion at
Followed by any lowercase letter, returns to the position which
was previously marked with that letter.
Followed by another single quote, returns to the postion at
-which the last "large" movement command was executed.
+which the last "large" movement command was executed, or the
+beginning of the file if no such movements have occurred.
All marks are lost when a new file is examined.
.PP
.IP /pattern
All marks are lost when a new file is examined.
.PP
.IP /pattern
-static char sccsid[] = "@(#)prim.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)prim.c 5.6 (Berkeley) %G%";
- else if (badmark(c))
- return;
- else
+ if (pos == NULL_POSITION)
+ pos = 0;
+ }
+ else {
+ if (badmark(c))
+ return;
-
- if (pos == NULL_POSITION)
- error("mark not set");
- else
- jump_loc(pos);
+ if (pos == NULL_POSITION) {
+ error("mark not set");
+ return;
+ }
+ }
+ jump_loc(pos);