diff options
author | Xin LI <delphij@FreeBSD.org> | 2017-04-25 03:42:16 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2017-04-25 03:42:16 +0000 |
commit | 9c83c2751d26fe2e059d6956f0398b56ed919a6a (patch) | |
tree | b75ed451f9f8336fb4958dbae186b6bd98aa65c0 /mark.c | |
parent | 1cabeb1f0c93e44ebc8a1d3a78100a962ac3f047 (diff) |
Notes
Diffstat (limited to 'mark.c')
-rw-r--r-- | mark.c | 35 |
1 files changed, 21 insertions, 14 deletions
@@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2016 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -27,7 +27,7 @@ static struct mark marks[NMARKS]; * Initialize the mark table to show no marks are set. */ public void -init_mark(void) +init_mark() { int i; @@ -39,7 +39,8 @@ init_mark(void) * See if a mark letter is valid (between a and z). */ static struct mark * -getumark(int c) +getumark(c) + int c; { if (c >= 'a' && c <= 'z') return (&marks[c-'a']); @@ -57,9 +58,10 @@ getumark(int c) * or may be constructed on the fly for certain characters like ^, $. */ static struct mark * -getmark(int c) +getmark(c) + int c; { - struct mark *m; + register struct mark *m; static struct mark sm; switch (c) @@ -122,7 +124,8 @@ getmark(int c) * Is a mark letter is invalid? */ public int -badmark(int c) +badmark(c) + int c; { return (getmark(c) == NULL); } @@ -131,9 +134,10 @@ badmark(int c) * Set a user-defined mark. */ public void -setmark(int c) +setmark(c) + int c; { - struct mark *m; + register struct mark *m; struct scrpos scrpos; m = getumark(c); @@ -148,7 +152,7 @@ setmark(int c) * Set lmark (the mark named by the apostrophe). */ public void -lastmark(void) +lastmark() { struct scrpos scrpos; @@ -165,9 +169,10 @@ lastmark(void) * Go to a mark. */ public void -gomark(int c) +gomark(c) + int c; { - struct mark *m; + register struct mark *m; struct scrpos scrpos; m = getmark(c); @@ -212,9 +217,10 @@ gomark(int c) * because it's always the first non-blank line on the screen. */ public POSITION -markpos(int c) +markpos(c) + int c; { - struct mark *m; + register struct mark *m; m = getmark(c); if (m == NULL) @@ -232,7 +238,8 @@ markpos(int c) * Clear the marks associated with a specified ifile. */ public void -unmark(IFILE ifile) +unmark(ifile) + IFILE ifile; { int i; |