aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2010-02-27 12:38:22 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-27 16:17:44 -0800
commit74ffb9e254fc69e3228395c71c681ec2dccad9e2 (patch)
tree64cdf9ca06fe54c24680ff8b8f95c818f6b1bfef
parent8a3292cd0d95be2f9319770049a308754eb02ab4 (diff)
downloaduemacs-74ffb9e254fc69e3228395c71c681ec2dccad9e2.tar.gz
uemacs: remove use of 'register' keyword
Lets welcome uEmacs/PK to the year 2010! As expected, the patch has no effect on the generated code: text data bss dec hex filename 106002 8864 18616 133482 2096a em 106002 8864 18616 133482 2096a em.new Cc: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--ansi.c6
-rw-r--r--basic.c28
-rw-r--r--bind.c50
-rw-r--r--buffer.c60
-rw-r--r--crypt.c4
-rw-r--r--display.c106
-rw-r--r--eval.c56
-rw-r--r--exec.c48
-rw-r--r--file.c76
-rw-r--r--fileio.c10
-rw-r--r--input.c18
-rw-r--r--isearch.c20
-rw-r--r--line.c82
-rw-r--r--lock.c16
-rw-r--r--main.c36
-rw-r--r--random.c152
-rw-r--r--region.c28
-rw-r--r--search.c46
-rw-r--r--spawn.c16
-rw-r--r--vmsvt.c10
-rw-r--r--vt52.c2
-rw-r--r--window.c60
-rw-r--r--word.c64
23 files changed, 497 insertions, 497 deletions
diff --git a/ansi.c b/ansi.c
index cba553b..1d3eee0 100644
--- a/ansi.c
+++ b/ansi.c
@@ -190,9 +190,9 @@ ansibeep()
}
ansiparm(n)
-register int n;
+int n;
{
- register int q, r;
+ int q, r;
q = n / 10;
if (q != 0) {
@@ -208,7 +208,7 @@ register int n;
ansiopen()
{
#if V7 | USG | BSD
- register char *cp;
+ char *cp;
if ((cp = getenv("TERM")) == NULL) {
puts("Shell variable TERM not defined!");
diff --git a/basic.c b/basic.c
index 4f13c8c..35fa56d 100644
--- a/basic.c
+++ b/basic.c
@@ -33,7 +33,7 @@ int gotobol(int f, int n)
*/
int backchar(int f, int n)
{
- register LINE *lp;
+ LINE *lp;
if (n < 0)
return (forwchar(f, -n));
@@ -90,7 +90,7 @@ int forwchar(int f, int n)
*/
int gotoline(int f, int n)
{
- register int status; /* status return */
+ int status; /* status return */
char arg[NSTRING]; /* buffer to hold argument */
/* get an argument if one doesnt exist */
@@ -146,7 +146,7 @@ int gotoeob(int f, int n)
*/
int forwline(int f, int n)
{
- register LINE *dlp;
+ LINE *dlp;
if (n < 0)
return (backline(f, -n));
@@ -183,7 +183,7 @@ int forwline(int f, int n)
*/
int backline(int f, int n)
{
- register LINE *dlp;
+ LINE *dlp;
if (n < 0)
return (forwline(f, -n));
@@ -223,7 +223,7 @@ int backline(int f, int n)
*/
int gotobop(int f, int n)
{
- register int suc; /* success of last backchar */
+ int suc; /* success of last backchar */
if (n < 0) /* the other way... */
return (gotoeop(f, -n));
@@ -270,7 +270,7 @@ int gotobop(int f, int n)
*/
int gotoeop(int f, int n)
{
- register int suc; /* success of last backchar */
+ int suc; /* success of last backchar */
if (n < 0) /* the other way... */
return (gotobop(f, -n));
@@ -321,10 +321,10 @@ int gotoeop(int f, int n)
*/
int getgoal(LINE *dlp)
{
- register int c;
- register int col;
- register int newcol;
- register int dbo;
+ int c;
+ int col;
+ int newcol;
+ int dbo;
col = 0;
dbo = 0;
@@ -352,7 +352,7 @@ int getgoal(LINE *dlp)
*/
int forwpage(int f, int n)
{
- register LINE *lp;
+ LINE *lp;
if (f == FALSE) {
#if SCROLLCODE
@@ -394,7 +394,7 @@ int forwpage(int f, int n)
*/
int backpage(int f, int n)
{
- register LINE *lp;
+ LINE *lp;
if (f == FALSE) {
#if SCROLLCODE
@@ -448,8 +448,8 @@ int setmark(int f, int n)
*/
int swapmark(int f, int n)
{
- register LINE *odotp;
- register int odoto;
+ LINE *odotp;
+ int odoto;
if (curwp->w_markp == NULL) {
mlwrite("No mark in this window");
diff --git a/bind.c b/bind.c
index 5f5ff84..e7b5265 100644
--- a/bind.c
+++ b/bind.c
@@ -17,8 +17,8 @@ int help(int f, int n)
{ /* give me some help!!!!
bring up a fake buffer and read the help file
into it with view mode */
- register window_t *wp; /* scaning pointer to windows */
- register struct buffer *bp; /* buffer pointer to help */
+ window_t *wp; /* scaning pointer to windows */
+ struct buffer *bp; /* buffer pointer to help */
char *fname = NULL; /* ptr to file returned by flook() */
/* first check if we are already here */
@@ -56,8 +56,8 @@ int help(int f, int n)
int deskey(int f, int n)
{ /* describe the command for a certain key */
- register int c; /* key to describe */
- register char *ptr; /* string pointer to scan output strings */
+ int c; /* key to describe */
+ char *ptr; /* string pointer to scan output strings */
char outseq[NSTRING]; /* output buffer for command sequence */
/* prompt the user to type us a key to describe */
@@ -88,10 +88,10 @@ int deskey(int f, int n)
*/
int bindtokey(int f, int n)
{
- register unsigned int c; /* command key to bind */
- register fn_t kfunc; /* ptr to the requested function to bind to */
- register KEYTAB *ktp; /* pointer into the command table */
- register int found; /* matched command flag */
+ unsigned int c; /* command key to bind */
+ fn_t kfunc; /* ptr to the requested function to bind to */
+ KEYTAB *ktp; /* pointer into the command table */
+ int found; /* matched command flag */
char outseq[80]; /* output buffer for keystroke sequence */
/* prompt the user to type in a key to bind */
@@ -176,7 +176,7 @@ int bindtokey(int f, int n)
*/
int unbindkey(int f, int n)
{
- register int c; /* command key to unbind */
+ int c; /* command key to unbind */
char outseq[80]; /* output buffer for keystroke sequence */
/* prompt the user to type in a key to unbind */
@@ -207,9 +207,9 @@ int unbindkey(int f, int n)
*/
int unbindchar(int c)
{
- register KEYTAB *ktp; /* pointer into the command table */
- register KEYTAB *sktp; /* saved pointer into the command table */
- register int found; /* matched command flag */
+ KEYTAB *ktp; /* pointer into the command table */
+ KEYTAB *sktp; /* saved pointer into the command table */
+ int found; /* matched command flag */
/* search the table to see if the key exists */
ktp = &keytab[0];
@@ -274,10 +274,10 @@ int apro(int f, int n)
int buildlist(int type, char *mstring)
#endif
{
- register window_t *wp; /* scanning pointer to windows */
- register KEYTAB *ktp; /* pointer into the command table */
- register NBIND *nptr; /* pointer into the name binding table */
- register struct buffer *bp; /* buffer to put binding list into */
+ window_t *wp; /* scanning pointer to windows */
+ KEYTAB *ktp; /* pointer into the command table */
+ NBIND *nptr; /* pointer into the name binding table */
+ struct buffer *bp; /* buffer to put binding list into */
int cpos; /* current position to use in outseq */
char outseq[80]; /* output buffer for keystroke sequence */
@@ -423,7 +423,7 @@ int strinc(char *source, char *sub)
*/
unsigned int getckey(int mflag)
{
- register unsigned int c; /* character fetched */
+ unsigned int c; /* character fetched */
char tok[NSTRING]; /* command incoming */
/* check to see if we are executing a command line */
@@ -473,10 +473,10 @@ int startup(char *sfname)
*/
char *flook(char *fname, int hflag)
{
- register char *home; /* path to home directory */
- register char *path; /* environmental PATH variable */
- register char *sp; /* pointer into path spec */
- register int i; /* index */
+ char *home; /* path to home directory */
+ char *path; /* environmental PATH variable */
+ char *sp; /* pointer into path spec */
+ int i; /* index */
static char fspec[NSTRING]; /* full path spec to search */
#if ENVFUNC
@@ -595,7 +595,7 @@ void cmdstr(int c, char *seq)
*/
int (*getbind(int c))(int, int)
{
- register KEYTAB *ktp;
+ KEYTAB *ktp;
ktp = &keytab[0]; /* Look in key table. */
while (ktp->k_fp != NULL) {
@@ -615,7 +615,7 @@ int (*getbind(int c))(int, int)
*/
char *getfname(fn_t func)
{
- register NBIND *nptr; /* pointer into the name binding table */
+ NBIND *nptr; /* pointer into the name binding table */
/* skim through the table, looking for a match */
nptr = &names[0];
@@ -635,7 +635,7 @@ char *getfname(fn_t func)
*/
int (*fncmatch(char *fname)) (int, int)
{
- register NBIND *ffp; /* pointer to entry in name binding table */
+ NBIND *ffp; /* pointer to entry in name binding table */
/* scan through the table, returning any match */
ffp = &names[0];
@@ -655,7 +655,7 @@ int (*fncmatch(char *fname)) (int, int)
*/
unsigned int stock(char *keyname)
{
- register unsigned int c; /* key sequence to return */
+ unsigned int c; /* key sequence to return */
/* parse it up */
c = 0;
diff --git a/buffer.c b/buffer.c
index a41ca23..6049c84 100644
--- a/buffer.c
+++ b/buffer.c
@@ -22,8 +22,8 @@
*/
int usebuffer(int f, int n)
{
- register struct buffer *bp;
- register int s;
+ struct buffer *bp;
+ int s;
char bufn[NBUFN];
if ((s = mlreply("Use buffer: ", bufn, NBUFN)) != TRUE)
@@ -40,8 +40,8 @@ int usebuffer(int f, int n)
*/
int nextbuffer(int f, int n)
{
- register struct buffer *bp; /* eligable buffer to switch to */
- register struct buffer *bbp; /* eligable buffer to switch to */
+ struct buffer *bp; /* eligable buffer to switch to */
+ struct buffer *bbp; /* eligable buffer to switch to */
/* make sure the arg is legit */
if (f == FALSE)
@@ -78,7 +78,7 @@ int nextbuffer(int f, int n)
*/
int swbuffer(struct buffer *bp)
{
- register window_t *wp;
+ window_t *wp;
if (--curbp->b_nwnd == 0) { /* Last use. */
curbp->b_dotp = curwp->w_dotp;
@@ -131,8 +131,8 @@ int swbuffer(struct buffer *bp)
*/
int killbuffer(int f, int n)
{
- register struct buffer *bp;
- register int s;
+ struct buffer *bp;
+ int s;
char bufn[NBUFN];
if ((s = mlreply("Kill buffer: ", bufn, NBUFN)) != TRUE)
@@ -149,9 +149,9 @@ int killbuffer(int f, int n)
*/
int zotbuf(struct buffer *bp)
{
- register struct buffer *bp1;
- register struct buffer *bp2;
- register int s;
+ struct buffer *bp1;
+ struct buffer *bp2;
+ int s;
if (bp->b_nwnd != 0) { /* Error if on screen. */
mlwrite("Buffer is being displayed");
@@ -182,7 +182,7 @@ int zotbuf(struct buffer *bp)
*/
int namebuffer(int f, int n)
{
- register struct buffer *bp; /* pointer to scan through all buffers */
+ struct buffer *bp; /* pointer to scan through all buffers */
char bufn[NBUFN]; /* buffer to hold buffer name */
/* prompt for and get the new buffer name */
@@ -219,9 +219,9 @@ int namebuffer(int f, int n)
*/
int listbuffers(int f, int n)
{
- register window_t *wp;
- register struct buffer *bp;
- register int s;
+ window_t *wp;
+ struct buffer *bp;
+ int s;
if ((s = makelist(f)) != TRUE)
return (s);
@@ -267,13 +267,13 @@ int listbuffers(int f, int n)
#define MAXLINE MAXCOL
int makelist(int iflag)
{
- register char *cp1;
- register char *cp2;
- register int c;
- register struct buffer *bp;
- register LINE *lp;
- register int s;
- register int i;
+ char *cp1;
+ char *cp2;
+ int c;
+ struct buffer *bp;
+ LINE *lp;
+ int s;
+ int i;
long nbytes; /* # of bytes in current buffer */
char b[7 + 1];
char line[MAXLINE];
@@ -394,9 +394,9 @@ void ltoa(char *buf, int width, long num)
*/
int addline(char *text)
{
- register LINE *lp;
- register int i;
- register int ntext;
+ LINE *lp;
+ int i;
+ int ntext;
ntext = strlen(text);
if ((lp = lalloc(ntext)) == NULL)
@@ -424,7 +424,7 @@ int addline(char *text)
*/
int anycb(void)
{
- register struct buffer *bp;
+ struct buffer *bp;
bp = bheadp;
while (bp != NULL) {
@@ -445,9 +445,9 @@ int anycb(void)
*/
struct buffer *bfind(char *bname, int cflag, int bflag)
{
- register struct buffer *bp;
- register struct buffer *sb; /* buffer to insert after */
- register LINE *lp;
+ struct buffer *bp;
+ struct buffer *sb; /* buffer to insert after */
+ LINE *lp;
bp = bheadp;
while (bp != NULL) {
@@ -513,8 +513,8 @@ struct buffer *bfind(char *bname, int cflag, int bflag)
*/
int bclear(struct buffer *bp)
{
- register LINE *lp;
- register int s;
+ LINE *lp;
+ int s;
if ((bp->b_flag & BFINVS) == 0 /* Not scratch buffer. */
&& (bp->b_flag & BFCHG) != 0 /* Something changed */
diff --git a/crypt.c b/crypt.c
index 5a09f4b..89c3a25 100644
--- a/crypt.c
+++ b/crypt.c
@@ -22,7 +22,7 @@ static int mod95(int);
*/
int set_encryption_key(int f, int n)
{
- register int status; /* return status */
+ int status; /* return status */
int odisinp; /* original vlaue of disinp */
char key[NPAT]; /* new encryption string */
@@ -145,7 +145,7 @@ int set_encryption_key(int f, int n)
void myencrypt(char *bptr, unsigned len)
{
- register int cc; /* current character being considered */
+ int cc; /* current character being considered */
static long key = 0; /* 29 bit encipherment key */
static int salt = 0; /* salt to spice up key with */
diff --git a/display.c b/display.c
index 7062f57..d239431 100644
--- a/display.c
+++ b/display.c
@@ -76,8 +76,8 @@ static void putline(int row, int col, char *buf);
*/
void vtinit(void)
{
- register int i;
- register VIDEO *vp;
+ int i;
+ VIDEO *vp;
TTopen(); /* open the screen */
TTkopen(); /* open the keyboard */
@@ -176,7 +176,7 @@ void vtmove(int row, int col)
*/
static void vtputc(unsigned char c)
{
- register VIDEO *vp; /* ptr to line being updated */
+ VIDEO *vp; /* ptr to line being updated */
vp = vscreen[vtrow];
@@ -224,8 +224,8 @@ static void vtputc(unsigned char c)
*/
static void vteeol(void)
{
-/* register VIDEO *vp; */
- register char *vcp = vscreen[vtrow]->v_text;
+/* VIDEO *vp; */
+ char *vcp = vscreen[vtrow]->v_text;
/* vp = vscreen[vtrow]; */
while (vtcol < term.t_ncol)
@@ -259,7 +259,7 @@ static int scrflags;
*/
int update(int force)
{
- register window_t *wp;
+ window_t *wp;
#if TYPEAH && ! PKCODE
if (force == FALSE && typahead())
@@ -281,7 +281,7 @@ int update(int force)
if (wp->w_flag & WFMODE) {
if (wp->w_bufp->b_nwnd > 1) {
/* make sure all previous windows have this */
- register window_t *owp;
+ window_t *owp;
owp = wheadp;
while (owp != NULL) {
if (owp->w_bufp == wp->w_bufp)
@@ -361,8 +361,8 @@ int update(int force)
*/
static int reframe(window_t *wp)
{
- register LINE *lp, *lp0;
- register int i = 0;
+ LINE *lp, *lp0;
+ int i = 0;
/* if not a requested reframe, check for a needed one */
if ((wp->w_flag & WFFORCE) == 0) {
@@ -451,9 +451,9 @@ static int reframe(window_t *wp)
*/
static void updone(window_t *wp)
{
- register LINE *lp; /* line to update */
- register int sline; /* physical screen line to update */
- register int i;
+ LINE *lp; /* line to update */
+ int sline; /* physical screen line to update */
+ int i;
/* search down the line we want */
lp = wp->w_linep;
@@ -484,9 +484,9 @@ static void updone(window_t *wp)
*/
static void updall(window_t *wp)
{
- register LINE *lp; /* line to update */
- register int sline; /* physical screen line to update */
- register int i;
+ LINE *lp; /* line to update */
+ int sline; /* physical screen line to update */
+ int i;
/* search down the lines, updating them */
lp = wp->w_linep;
@@ -522,9 +522,9 @@ static void updall(window_t *wp)
*/
void updpos(void)
{
- register LINE *lp;
- register int c;
- register int i;
+ LINE *lp;
+ int c;
+ int i;
/* find the current row */
lp = curwp->w_linep;
@@ -563,9 +563,9 @@ void updpos(void)
*/
void upddex(void)
{
- register window_t *wp;
- register LINE *lp;
- register int i, j;
+ window_t *wp;
+ LINE *lp;
+ int i, j;
wp = wheadp;
@@ -602,8 +602,8 @@ void upddex(void)
*/
void updgar(void)
{
- register char *txt;
- register int i, j;
+ char *txt;
+ int i, j;
for (i = 0; i < term.t_nrow; ++i) {
vscreen[i]->v_flag |= VFCHG;
@@ -638,8 +638,8 @@ void updgar(void)
*/
int updupd(int force)
{
- register VIDEO *vp1;
- register int i;
+ VIDEO *vp1;
+ int i;
#if SCROLLCODE
if (scrflags & WFKILLS)
@@ -852,9 +852,9 @@ static int endofline(char *s, int n)
*/
static void updext(void)
{
- register int rcursor; /* real cursor location */
- register LINE *lp; /* pointer to current line */
- register int j; /* index into line */
+ int rcursor; /* real cursor location */
+ LINE *lp; /* pointer to current line */
+ int j; /* index into line */
/* calculate what column the real cursor will end up in */
rcursor = ((curcol - term.t_ncol) % term.t_scrsiz) + term.t_margin;
@@ -887,9 +887,9 @@ static void updext(void)
static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
{
#if SCROLLCODE
- register char *cp1;
- register char *cp2;
- register int nch;
+ char *cp1;
+ char *cp2;
+ int nch;
cp1 = &vp1->v_text[0];
cp2 = &vp2->v_text[0];
@@ -929,9 +929,9 @@ static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
#if RAINBOW
/* UPDATELINE specific code for the DEC rainbow 100 micro */
- register char *cp1;
- register char *cp2;
- register int nch;
+ char *cp1;
+ char *cp2;
+ int nch;
/* since we don't know how to make the rainbow do this, turn it off */
flags &= (~VFREV & ~VFREQ);
@@ -951,12 +951,12 @@ static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
#else
/* UPDATELINE code for all other versions */
- register char *cp1;
- register char *cp2;
- register char *cp3;
- register char *cp4;
- register char *cp5;
- register int nbflag; /* non-blanks to the right flag? */
+ char *cp1;
+ char *cp2;
+ char *cp3;
+ char *cp4;
+ char *cp5;
+ int nbflag; /* non-blanks to the right flag? */
int rev; /* reverse video flag */
int req; /* reverse video request flag */
@@ -1086,13 +1086,13 @@ static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
*/
static void modeline(window_t *wp)
{
- register char *cp;
- register int c;
- register int n; /* cursor position count */
- register struct buffer *bp;
- register int i; /* loop index */
- register int lchar; /* character to draw line in buffer with */
- register int firstm; /* is this the first mode? */
+ char *cp;
+ int c;
+ int n; /* cursor position count */
+ struct buffer *bp;
+ int i; /* loop index */
+ int lchar; /* character to draw line in buffer with */
+ int firstm; /* is this the first mode? */
char tline[NLINE]; /* buffer for part of mode line */
n = wp->w_toprow + wp->w_ntrows; /* Location. */
@@ -1276,7 +1276,7 @@ static void modeline(window_t *wp)
void upmode(void)
{ /* update all the mode lines */
- register window_t *wp;
+ window_t *wp;
wp = wheadp;
while (wp != NULL) {
@@ -1339,7 +1339,7 @@ void mlerase(void)
*/
void mlwrite(const char *fmt, ...)
{
- register int c; /* current char in format string */
+ int c; /* current char in format string */
va_list ap;
/* if we are not currently echoing on the command line, abort this */
@@ -1416,7 +1416,7 @@ void mlwrite(const char *fmt, ...)
*/
void mlforce(char *s)
{
- register int oldcmd; /* original command display flag */
+ int oldcmd; /* original command display flag */
oldcmd = discmd; /* save the discmd value */
discmd = TRUE; /* and turn display on */
@@ -1431,7 +1431,7 @@ void mlforce(char *s)
*/
void mlputs(char *s)
{
- register int c;
+ int c;
while ((c = *s++) != 0) {
TTputc(c);
@@ -1445,7 +1445,7 @@ void mlputs(char *s)
*/
static void mlputi(int i, int r)
{
- register int q;
+ int q;
static char hexdigits[] = "0123456789ABCDEF";
if (i < 0) {
@@ -1467,7 +1467,7 @@ static void mlputi(int i, int r)
*/
static void mlputli(long l, int r)
{
- register long q;
+ long q;
if (l < 0) {
l = -l;
diff --git a/eval.c b/eval.c
index 76dab56..1ab2b64 100644
--- a/eval.c
+++ b/eval.c
@@ -14,7 +14,7 @@
void varinit(void)
{ /* initialize the user variable list */
- register int i;
+ int i;
for (i = 0; i < MAXVARS; i++)
uv[i].u_name[0] = 0;
@@ -27,9 +27,9 @@ void varinit(void)
*/
char *gtfun(char *fname)
{
- register int fnum; /* index to function to eval */
- register int status; /* return status */
- register char *tsp; /* temporary string pointer */
+ int fnum; /* index to function to eval */
+ int status; /* return status */
+ char *tsp; /* temporary string pointer */
char arg1[NSTRING]; /* value of first argument */
char arg2[NSTRING]; /* value of second argument */
char arg3[NSTRING]; /* value of third argument */
@@ -170,7 +170,7 @@ char *gtfun(char *fname)
char *gtusr(char *vname)
{
- register int vnum; /* ordinal number of user var */
+ int vnum; /* ordinal number of user var */
/* scan the list looking for the user var name */
for (vnum = 0; vnum < MAXVARS; vnum++) {
@@ -192,7 +192,7 @@ char *gtusr(char *vname)
*/
char *gtenv(char *vname)
{
- register int vnum; /* ordinal number of var refrenced */
+ int vnum; /* ordinal number of var refrenced */
char *getkill();
/* scan the list, looking for the referenced name */
@@ -320,7 +320,7 @@ char *gtenv(char *vname)
*/
char *getkill(void)
{
- register int size; /* max number of chars to return */
+ int size; /* max number of chars to return */
static char value[NSTRING]; /* temp buffer for value */
if (kbufh == NULL)
@@ -347,10 +347,10 @@ char *getkill(void)
*/
int setvar(int f, int n)
{
- register int status; /* status return */
+ int status; /* status return */
#if DEBUGM
- register char *sp; /* temp string pointer */
- register char *ep; /* ptr to end of outline */
+ char *sp; /* temp string pointer */
+ char *ep; /* ptr to end of outline */
#endif
VDESC vd; /* variable num/type */
char var[NVSIZE + 1]; /* name of variable to fetch */
@@ -448,8 +448,8 @@ int setvar(int f, int n)
*/
void findvar(char *var, VDESC *vd, int size)
{
- register int vnum; /* subscript in variable arrays */
- register int vtype; /* type to return */
+ int vnum; /* subscript in variable arrays */
+ int vtype; /* type to return */
vnum = -1;
fvar:
@@ -506,11 +506,11 @@ fvar:
*/
int svar(VDESC *var, char *value)
{
- register int vnum; /* ordinal number of var refrenced */
- register int vtype; /* type of variable to set */
- register int status; /* status return */
- register int c; /* translated character */
- register char *sp; /* scratch string pointer */
+ int vnum; /* ordinal number of var refrenced */
+ int vtype; /* type of variable to set */
+ int status; /* status return */
+ int c; /* translated character */
+ char *sp; /* scratch string pointer */
/* simplify the vd structure (we are gonna look at it a lot) */
vnum = var->v_num;
@@ -682,9 +682,9 @@ int svar(VDESC *var, char *value)
*/
char *itoa(int i)
{
- register int digit; /* current digit being used */
- register char *sp; /* pointer into result */
- register int sign; /* sign of resulting number */
+ int digit; /* current digit being used */
+ char *sp; /* pointer into result */
+ int sign; /* sign of resulting number */
static char result[INTWIDTH + 1]; /* resulting string */
/* record the sign... */
@@ -718,7 +718,7 @@ char *itoa(int i)
*/
int gettyp(char *token)
{
- register char c; /* first char in token */
+ char c; /* first char in token */
/* grab the first char (this is all we need) */
c = *token;
@@ -762,10 +762,10 @@ int gettyp(char *token)
*/
char *getval(char *token)
{
- register int status; /* error return */
- register struct buffer *bp; /* temp buffer pointer */
- register int blen; /* length of buffer argument */
- register int distmp; /* temporary discmd flag */
+ int status; /* error return */
+ struct buffer *bp; /* temp buffer pointer */
+ int blen; /* length of buffer argument */
+ int distmp; /* temporary discmd flag */
static char buf[NSTRING]; /* string buffer for some returns */
switch (gettyp(token)) {
@@ -969,9 +969,9 @@ int sindex(char *source, char *pattern)
*/
char *xlat(char *source, char *lookup, char *trans)
{
- register char *sp; /* pointer into source table */
- register char *lp; /* pointer into lookup table */
- register char *rp; /* pointer into result */
+ char *sp; /* pointer into source table */
+ char *lp; /* pointer into lookup table */
+ char *rp; /* pointer into result */
static char result[NSTRING]; /* temporary result */
/* scan source string */
diff --git a/exec.c b/exec.c
index aa516c5..8c5fa9e 100644
--- a/exec.c
+++ b/exec.c
@@ -20,7 +20,7 @@
*/
int namedcmd(int f, int n)
{
- register fn_t kfunc; /* ptr to the requexted function to bind to */
+ fn_t kfunc; /* ptr to the requexted function to bind to */
/* prompt the user to type a named command */
mlwrite(": ");
@@ -45,7 +45,7 @@ int namedcmd(int f, int n)
*/
int execcmd(int f, int n)
{
- register int status; /* status return */
+ int status; /* status return */
char cmdstr[NSTRING]; /* string holding command to execute */
/* get the line wanted */
@@ -71,8 +71,8 @@ int execcmd(int f, int n)
*/
int docmd(char *cline)
{
- register int f; /* default argument flag */
- register int n; /* numeric repeat value */
+ int f; /* default argument flag */
+ int n; /* numeric repeat value */
fn_t fnc; /* function to execute */
int status; /* return status of function */
int oldcle; /* old contents of clexec flag */
@@ -137,8 +137,8 @@ int docmd(char *cline)
*/
char *token(char *src, char *tok, int size)
{
- register int quotef; /* is the current string quoted? */
- register char c; /* temporary character */
+ int quotef; /* is the current string quoted? */
+ char c; /* temporary character */
/* first scan past any whitespace in the source string */
while (*src == ' ' || *src == '\t')
@@ -252,7 +252,7 @@ int nextarg(char *prompt, char *buffer, int size, int terminator)
*/
int storemac(int f, int n)
{
- register struct buffer *bp; /* pointer to macro buffer */
+ struct buffer *bp; /* pointer to macro buffer */
char bname[NBUFN]; /* name of buffer to use */
/* must have a numeric argument to this function */
@@ -298,8 +298,8 @@ int storemac(int f, int n)
*/
int storeproc(int f, int n)
{
- register struct buffer *bp; /* pointer to macro buffer */
- register int status; /* return status */
+ struct buffer *bp; /* pointer to macro buffer */
+ int status; /* return status */
char bname[NBUFN]; /* name of buffer to use */
/* a numeric argument means its a numbered macro */
@@ -338,8 +338,8 @@ int storeproc(int f, int n)
*/
int execproc(int f, int n)
{
- register struct buffer *bp; /* ptr to buffer to execute */
- register int status; /* status return */
+ struct buffer *bp; /* ptr to buffer to execute */
+ int status; /* status return */
char bufn[NBUFN + 2]; /* name of buffer to execute */
/* find out what buffer the user wants to execute */
@@ -373,8 +373,8 @@ int execproc(int f, int n)
*/
int execbuf(int f, int n)
{
- register struct buffer *bp; /* ptr to buffer to execute */
- register int status; /* status return */
+ struct buffer *bp; /* ptr to buffer to execute */
+ int status; /* status return */
char bufn[NSTRING]; /* name of buffer to execute */
/* find out what buffer the user wants to execute */
@@ -419,10 +419,10 @@ int execbuf(int f, int n)
*/
int dobuf(struct buffer *bp)
{
- register int status; /* status return */
- register LINE *lp; /* pointer to line to execute */
- register LINE *hlp; /* pointer to line header */
- register LINE *glp; /* line to goto */
+ int status; /* status return */
+ LINE *lp; /* pointer to line to execute */
+ LINE *hlp; /* pointer to line header */
+ LINE *glp; /* line to goto */
LINE *mp; /* Macro line storage temp */
int dirnum; /* directive index */
int linlen; /* length of line to execute */
@@ -439,7 +439,7 @@ int dobuf(struct buffer *bp)
#if DEBUGM
char *sp; /* temp for building debug string */
- register char *ep; /* ptr to end of outline */
+ char *ep; /* ptr to end of outline */
#endif
/* clear IF level flags/while ptr */
@@ -850,7 +850,7 @@ void freewhile(WHBLOCK *wp)
*/
int execfile(int f, int n)
{
- register int status; /* return status of name query */
+ int status; /* return status of name query */
char fname[NSTRING]; /* name of file to execute */
char *fspec; /* full file spec */
@@ -884,9 +884,9 @@ int execfile(int f, int n)
*/
int dofile(char *fname)
{
- register struct buffer *bp; /* buffer to place file to exeute */
- register struct buffer *cb; /* temp to hold current buf while we read */
- register int status; /* results of various calls */
+ struct buffer *bp; /* buffer to place file to exeute */
+ struct buffer *cb; /* temp to hold current buf while we read */
+ int status; /* results of various calls */
char bname[NBUFN]; /* name of buffer */
makename(bname, fname); /* derive the name of the buffer */
@@ -923,8 +923,8 @@ int dofile(char *fname)
*/
int cbuf(int f, int n, int bufnum)
{
- register struct buffer *bp; /* ptr to buffer to execute */
- register int status; /* status return */
+ struct buffer *bp; /* ptr to buffer to execute */
+ int status; /* status return */
static char bufname[] = "*Macro xx*";
/* make the buffer name */
diff --git a/file.c b/file.c
index ca578cc..c2fe823 100644
--- a/file.c
+++ b/file.c
@@ -22,7 +22,7 @@
*/
int fileread(int f, int n)
{
- register int s;
+ int s;
char fname[NFILEN];
if (restflag) /* don't allow this command if restricted */
@@ -41,7 +41,7 @@ int fileread(int f, int n)
*/
int insfile(int f, int n)
{
- register int s;
+ int s;
char fname[NFILEN];
if (restflag) /* don't allow this command if restricted */
@@ -67,7 +67,7 @@ int insfile(int f, int n)
int filefind(int f, int n)
{
char fname[NFILEN]; /* file user wishes to find */
- register int s; /* status return */
+ int s; /* status return */
if (restflag) /* don't allow this command if restricted */
return (resterr());
@@ -79,8 +79,8 @@ int filefind(int f, int n)
int viewfile(int f, int n)
{ /* visit a file in VIEW mode */
char fname[NFILEN]; /* file user wishes to find */
- register int s; /* status return */
- register window_t *wp; /* scan for windows that need updating */
+ int s; /* status return */
+ window_t *wp; /* scan for windows that need updating */
if (restflag) /* don't allow this command if restricted */
return (resterr());
@@ -103,7 +103,7 @@ int viewfile(int f, int n)
#if CRYPT
static int resetkey(void)
{ /* reset the encryption key if needed */
- register int s; /* return status */
+ int s; /* return status */
/* turn off the encryption flag */
cryptflag = FALSE;
@@ -141,10 +141,10 @@ static int resetkey(void)
*/
int getfile(char *fname, int lockfl)
{
- register struct buffer *bp;
- register LINE *lp;
- register int i;
- register int s;
+ struct buffer *bp;
+ LINE *lp;
+ int i;
+ int s;
char bname[NBUFN]; /* buffer name to put file */
#if MSDOS
@@ -207,14 +207,14 @@ int getfile(char *fname, int lockfl)
*/
int readin(char *fname, int lockfl)
{
- register LINE *lp1;
- register LINE *lp2;
- register int i;
- register window_t *wp;
- register struct buffer *bp;
- register int s;
- register int nbytes;
- register int nline;
+ LINE *lp1;
+ LINE *lp2;
+ int i;
+ window_t *wp;
+ struct buffer *bp;
+ int s;
+ int nbytes;
+ int nline;
int lflag; /* any lines longer than allowed? */
char mesg[NSTRING];
@@ -327,8 +327,8 @@ int readin(char *fname, int lockfl)
*/
void makename(char *bname, char *fname)
{
- register char *cp1;
- register char *cp2;
+ char *cp1;
+ char *cp2;
cp1 = &fname[0];
while (*cp1 != 0)
@@ -365,7 +365,7 @@ void makename(char *bname, char *fname)
*/
void unqname(char *name)
{
- register char *sp;
+ char *sp;
/* check to see if it is in the buffer list */
while (bfind(name, 0, FALSE) != NULL) {
@@ -393,8 +393,8 @@ void unqname(char *name)
*/
int filewrite(int f, int n)
{
- register window_t *wp;
- register int s;
+ window_t *wp;
+ int s;
char fname[NFILEN];
if (restflag) /* don't allow this command if restricted */
@@ -424,8 +424,8 @@ int filewrite(int f, int n)
*/
int filesave(int f, int n)
{
- register window_t *wp;
- register int s;
+ window_t *wp;
+ int s;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -466,9 +466,9 @@ int filesave(int f, int n)
*/
int writeout(char *fn)
{
- register int s;
- register LINE *lp;
- register int nline;
+ int s;
+ LINE *lp;
+ int nline;
#if CRYPT
s = resetkey();
@@ -518,8 +518,8 @@ int writeout(char *fn)
*/
int filename(int f, int n)
{
- register window_t *wp;
- register int s;
+ window_t *wp;
+ int s;
char fname[NFILEN];
if (restflag) /* don't allow this command if restricted */
@@ -547,14 +547,14 @@ int filename(int f, int n)
*/
int ifile(char *fname)
{
- register LINE *lp0;
- register LINE *lp1;
- register LINE *lp2;
- register int i;
- register struct buffer *bp;
- register int s;
- register int nbytes;
- register int nline;
+ LINE *lp0;
+ LINE *lp1;
+ LINE *lp2;
+ int i;
+ struct buffer *bp;
+ int s;
+ int nbytes;
+ int nline;
int lflag; /* any lines longer than allowed? */
char mesg[NSTRING];
diff --git a/fileio.c b/fileio.c
index 6860585..52b63b2 100644
--- a/fileio.c
+++ b/fileio.c
@@ -32,7 +32,7 @@ int ffropen(char *fn)
int ffwopen(char *fn)
{
#if VMS
- register int fd;
+ int fd;
if ((fd = creat(fn, 0666, "rfm=var", "rat=cr")) < 0
|| (ffp = fdopen(fd, "w")) == NULL) {
@@ -80,7 +80,7 @@ int ffclose(void)
*/
int ffputline(char *buf, int nbuf)
{
- register int i;
+ int i;
#if CRYPT
char c; /* character to translate */
@@ -116,9 +116,9 @@ int ffputline(char *buf, int nbuf)
*/
int ffgetline(void)
{
- register int c; /* current character read */
- register int i; /* current index into fline */
- register char *tmpline; /* temp storage for expanding line */
+ int c; /* current character read */
+ int i; /* current index into fline */
+ char *tmpline; /* temp storage for expanding line */
/* if we are at the end...return it */
if (eofflag)
diff --git a/input.c b/input.c
index 2df7155..c04db11 100644
--- a/input.c
+++ b/input.c
@@ -105,12 +105,12 @@ int ctoec(int c)
*/
fn_t getname(void)
{
- register int cpos; /* current column on screen output */
- register int c;
- register char *sp; /* pointer to string for output */
- register NBIND *ffp; /* first ptr to entry in name binding table */
- register NBIND *cffp; /* current ptr to entry in name binding table */
- register NBIND *lffp; /* last ptr to entry in name binding table */
+ int cpos; /* current column on screen output */
+ int c;
+ char *sp; /* pointer to string for output */
+ NBIND *ffp; /* first ptr to entry in name binding table */
+ NBIND *cffp; /* current ptr to entry in name binding table */
+ NBIND *lffp; /* last ptr to entry in name binding table */
char buf[NSTRING]; /* buffer to hold tentative command name */
/* starting at the beginning of the string buffer */
@@ -438,9 +438,9 @@ handle_CSI:
*/
int getstring(char *prompt, char *buf, int nbuf, int eolchar)
{
- register int cpos; /* current character position in string */
- register int c;
- register int quotef; /* are we quoting the next char? */
+ int cpos; /* current character position in string */
+ int c;
+ int quotef; /* are we quoting the next char? */
#if COMPLC
int ffile, ocpos, nskip = 0, didtry = 0;
#if MSDOS
diff --git a/isearch.c b/isearch.c
index 43b5e07..fdfbfc2 100644
--- a/isearch.c
+++ b/isearch.c
@@ -140,9 +140,9 @@ int isearch(int f, int n)
{
int status; /* Search status */
int col; /* prompt column */
- register int cpos; /* character number in search string */
- register int c; /* current input character */
- register int expc; /* function expanded input char */
+ int cpos; /* character number in search string */
+ int c; /* current input character */
+ int expc; /* function expanded input char */
char pat_save[NPAT]; /* Saved copy of the old pattern str */
LINE *curline; /* Current line on entry */
int curoff; /* Current offset on entry */
@@ -278,9 +278,9 @@ int isearch(int f, int n)
*/
int checknext(char chr, char *patrn, int dir) /* Check next character in search string */
{
- register LINE *curline; /* current line during scan */
- register int curoff; /* position within current line */
- register int buffchar; /* character at current position */
+ LINE *curline; /* current line during scan */
+ int curoff; /* position within current line */
+ int buffchar; /* character at current position */
int status; /* how well things go */
@@ -351,10 +351,10 @@ int scanmore(char *patrn, int dir) /* search forward or back for a pattern
*/
int match_pat(char *patrn) /* See if the pattern string matches string at "." */
{
- register int i; /* Generic loop index/offset */
- register int buffchar; /* character at current position */
- register LINE *curline; /* current line during scan */
- register int curoff; /* position within current line */
+ int i; /* Generic loop index/offset */
+ int buffchar; /* character at current position */
+ LINE *curline; /* current line during scan */
+ int curoff; /* position within current line */
/* setup the local scan pointer to current "." */
diff --git a/line.c b/line.c
index c51b0dc..b75ee61 100644
--- a/line.c
+++ b/line.c
@@ -26,8 +26,8 @@
*/
LINE *lalloc(int used)
{
- register LINE *lp;
- register int size;
+ LINE *lp;
+ int size;
size = (used + NBLOCK - 1) & ~(NBLOCK - 1);
if (size == 0) /* Assume that an empty */
@@ -49,8 +49,8 @@ LINE *lalloc(int used)
*/
void lfree(LINE *lp)
{
- register struct buffer *bp;
- register window_t *wp;
+ struct buffer *bp;
+ window_t *wp;
wp = wheadp;
while (wp != NULL) {
@@ -94,7 +94,7 @@ void lfree(LINE *lp)
*/
void lchange(int flag)
{
- register window_t *wp;
+ window_t *wp;
if (curbp->b_nwnd != 1) /* Ensure hard. */
flag = WFHARD;
@@ -128,7 +128,7 @@ int insspace(int f, int n)
int linstr(char *instr)
{
- register int status = TRUE;
+ int status = TRUE;
char tmpc;
if (instr != NULL)
@@ -158,14 +158,14 @@ int linstr(char *instr)
int linsert(int n, int c)
{
- register char *cp1;
- register char *cp2;
- register LINE *lp1;
- register LINE *lp2;
- register LINE *lp3;
- register int doto;
- register int i;
- register window_t *wp;
+ char *cp1;
+ char *cp2;
+ LINE *lp1;
+ LINE *lp2;
+ LINE *lp3;
+ int doto;
+ int i;
+ window_t *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -253,7 +253,7 @@ int lowrite(int c)
*/
int lover(char *ostr)
{
- register int status = TRUE;
+ int status = TRUE;
char tmpc;
if (ostr != NULL)
@@ -282,12 +282,12 @@ int lover(char *ostr)
*/
int lnewline(void)
{
- register char *cp1;
- register char *cp2;
- register LINE *lp1;
- register LINE *lp2;
- register int doto;
- register window_t *wp;
+ char *cp1;
+ char *cp2;
+ LINE *lp1;
+ LINE *lp2;
+ int doto;
+ window_t *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -344,12 +344,12 @@ int lnewline(void)
*/
int ldelete(long n, int kflag)
{
- register char *cp1;
- register char *cp2;
- register LINE *dotp;
- register int doto;
- register int chunk;
- register window_t *wp;
+ char *cp1;
+ char *cp2;
+ LINE *dotp;
+ int doto;
+ int chunk;
+ window_t *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -412,10 +412,10 @@ int ldelete(long n, int kflag)
*/
char *getctext(void)
{
- register LINE *lp; /* line to copy */
- register int size; /* length of line to return */
- register char *sp; /* string pointer into line */
- register char *dp; /* string pointer into returned line */
+ LINE *lp; /* line to copy */
+ int size; /* length of line to return */
+ char *sp; /* string pointer into line */
+ char *dp; /* string pointer into returned line */
static char rline[NSTRING]; /* line to return */
/* find the contents of the current line and its length */
@@ -441,7 +441,7 @@ char *getctext(void)
*/
int putctext(char *iline)
{
- register int status;
+ int status;
/* delete the current line */
curwp->w_doto = 0; /* starting at the beginning of the line */
@@ -467,12 +467,12 @@ int putctext(char *iline)
*/
int ldelnewline(void)
{
- register char *cp1;
- register char *cp2;
- register LINE *lp1;
- register LINE *lp2;
- register LINE *lp3;
- register window_t *wp;
+ char *cp1;
+ char *cp2;
+ LINE *lp1;
+ LINE *lp2;
+ LINE *lp3;
+ window_t *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -604,9 +604,9 @@ int kinsert(int c)
*/
int yank(int f, int n)
{
- register int c;
- register int i;
- register char *sp; /* pointer into string to insert */
+ int c;
+ int i;
+ char *sp; /* pointer into string to insert */
KILL *kp; /* pointer into kill buffer */
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
diff --git a/lock.c b/lock.c
index 628e2ba..490baef 100644
--- a/lock.c
+++ b/lock.c
@@ -25,8 +25,8 @@ static int numlocks; /* # of current locks active */
*/
int lockchk(char *fname)
{
- register int i; /* loop indexes */
- register int status; /* return status */
+ int i; /* loop indexes */
+ int status; /* return status */
/* check to see if that file is already locked here */
if (numlocks > 0)
@@ -67,9 +67,9 @@ int lockchk(char *fname)
*/
int lockrel(void)
{
- register int i; /* loop index */
- register int status; /* status of locks */
- register int s; /* status of one unlock */
+ int i; /* loop index */
+ int status; /* status of locks */
+ int s; /* status of one unlock */
status = TRUE;
if (numlocks > 0)
@@ -93,8 +93,8 @@ int lockrel(void)
*/
int lock(char *fname)
{
- register char *locker; /* lock error message */
- register int status; /* return status */
+ char *locker; /* lock error message */
+ int status; /* return status */
char msg[NSTRING]; /* message string */
/* attempt to lock the file */
@@ -128,7 +128,7 @@ int lock(char *fname)
*/
int unlock(char *fname)
{
- register char *locker; /* undolock return string */
+ char *locker; /* undolock return string */
/* unclock and return */
locker = undolock(fname);
diff --git a/main.c b/main.c
index 562f39a..5ce8182 100644
--- a/main.c
+++ b/main.c
@@ -94,14 +94,14 @@ int emacs(int argc, char **argv)
int main(int argc, char **argv)
#endif
{
- register int c = -1; /* command character */
- register int f; /* default flag */
- register int n; /* numeric repeat count */
- register int mflag; /* negative flag on repeat */
- register struct buffer *bp; /* temp buffer pointer */
- register int firstfile; /* first file flag */
- register int carg; /* current arg to scan */
- register int startflag; /* startup executed flag */
+ int c = -1; /* command character */
+ int f; /* default flag */
+ int n; /* numeric repeat count */
+ int mflag; /* negative flag on repeat */
+ struct buffer *bp; /* temp buffer pointer */
+ int firstfile; /* first file flag */
+ int carg; /* current arg to scan */
+ int startflag; /* startup executed flag */
struct buffer *firstbp = NULL; /* ptr to first buffer in cmd line */
int basec; /* c stripped of meta character */
int viewflag; /* are we starting in view mode? */
@@ -427,8 +427,8 @@ int main(int argc, char **argv)
*/
void edinit(char *bname)
{
- register struct buffer *bp;
- register window_t *wp;
+ struct buffer *bp;
+ window_t *wp;
bp = bfind(bname, TRUE, 0); /* First buffer */
blistp = bfind("*List*", TRUE, BFINVS); /* Buffer list buffer */
@@ -465,7 +465,7 @@ void edinit(char *bname)
*/
int execute(int c, int f, int n)
{
- register int status;
+ int status;
fn_t execfunc;
/* if the keystroke is a bound function...do it */
@@ -555,9 +555,9 @@ int execute(int c, int f, int n)
*/
int quickexit(int f, int n)
{
- register struct buffer *bp; /* scanning pointer to buffers */
- register struct buffer *oldcb; /* original current buffer */
- register int status;
+ struct buffer *bp; /* scanning pointer to buffers */
+ struct buffer *oldcb; /* original current buffer */
+ int status;
oldcb = curbp; /* save in case we fail */
@@ -595,7 +595,7 @@ static void emergencyexit(int signr)
*/
int quit(int f, int n)
{
- register int s;
+ int s;
if (f != FALSE /* Argument forces it. */
|| anycb() == FALSE /* All buffers clean. */
@@ -817,9 +817,9 @@ dspram()
*/
int cexit(int status)
{
- register struct buffer *bp; /* buffer list pointer */
- register window_t *wp; /* window list pointer */
- register window_t *tp; /* temporary window pointer */
+ struct buffer *bp; /* buffer list pointer */
+ window_t *wp; /* window list pointer */
+ window_t *tp; /* temporary window pointer */
/* first clean up the windows */
wp = wheadp;
diff --git a/random.c b/random.c
index c556364..2c97487 100644
--- a/random.c
+++ b/random.c
@@ -32,12 +32,12 @@ int setfillcol(int f, int n)
*/
int showcpos(int f, int n)
{
- register LINE *lp; /* current line */
- register long numchars; /* # of chars in file */
- register int numlines; /* # of lines in file */
- register long predchars; /* # chars preceding point */
- register int predlines; /* # lines preceding point */
- register int curchar; /* character under cursor */
+ LINE *lp; /* current line */
+ long numchars; /* # of chars in file */
+ int numlines; /* # of lines in file */
+ long predchars; /* # chars preceding point */
+ int predlines; /* # lines preceding point */
+ int curchar; /* character under cursor */
int ratio;
int col;
int savepos; /* temp save for current offset */
@@ -97,8 +97,8 @@ int showcpos(int f, int n)
int getcline(void)
{ /* get the current line number */
- register LINE *lp; /* current line */
- register int numlines; /* # of lines before point */
+ LINE *lp; /* current line */
+ int numlines; /* # of lines before point */
/* starting at the beginning of the buffer */
lp = lforw(curbp->b_linep);
@@ -122,7 +122,7 @@ int getcline(void)
*/
int getccol(int bflg)
{
- register int c, i, col;
+ int c, i, col;
col = 0;
for (i = 0; i < curwp->w_doto; ++i) {
c = lgetc(curwp->w_dotp, i);
@@ -144,10 +144,10 @@ int getccol(int bflg)
*/
int setccol(int pos)
{
- register int c; /* character being scanned */
- register int i; /* index into current line */
- register int col; /* current cursor column */
- register int llen; /* length of line in bytes */
+ int c; /* character being scanned */
+ int i; /* index into current line */
+ int col; /* current cursor column */
+ int llen; /* length of line in bytes */
col = 0;
llen = llength(curwp->w_dotp);
@@ -183,10 +183,10 @@ int setccol(int pos)
*/
int twiddle(int f, int n)
{
- register LINE *dotp;
- register int doto;
- register int cl;
- register int cr;
+ LINE *dotp;
+ int doto;
+ int cl;
+ int cr;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -212,8 +212,8 @@ int twiddle(int f, int n)
*/
int quote(int f, int n)
{
- register int s;
- register int c;
+ int s;
+ int c;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -259,7 +259,7 @@ int insert_tab(int f, int n)
*/
int detab(int f, int n)
{
- register int inc; /* increment to next line [sgn(n)] */
+ int inc; /* increment to next line [sgn(n)] */
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -301,10 +301,10 @@ int detab(int f, int n)
*/
int entab(int f, int n)
{
- register int inc; /* increment to next line [sgn(n)] */
- register int fspace; /* pointer to first space if in a run */
- register int ccol; /* current cursor column */
- register char cchar; /* current character */
+ int inc; /* increment to next line [sgn(n)] */
+ int fspace; /* pointer to first space if in a run */
+ int ccol; /* current cursor column */
+ char cchar; /* current character */
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -375,10 +375,10 @@ int entab(int f, int n)
*/
int trim(int f, int n)
{
- register LINE *lp; /* current line pointer */
- register int offset; /* original line offset position */
- register int length; /* current length */
- register int inc; /* increment to next line [sgn(n)] */
+ LINE *lp; /* current line pointer */
+ int offset; /* original line offset position */
+ int length; /* current length */
+ int inc; /* increment to next line [sgn(n)] */
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -419,8 +419,8 @@ int trim(int f, int n)
*/
int openline(int f, int n)
{
- register int i;
- register int s;
+ int i;
+ int s;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -443,7 +443,7 @@ int openline(int f, int n)
*/
int insert_newline(int f, int n)
{
- register int s;
+ int s;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -478,10 +478,10 @@ int insert_newline(int f, int n)
int cinsert(void)
{ /* insert a newline and indentation for C */
- register char *cptr; /* string pointer into text to copy */
- register int tptr; /* index to scan into line */
- register int bracef; /* was there a brace at the end of line? */
- register int i;
+ char *cptr; /* string pointer into text to copy */
+ int tptr; /* index to scan into line */
+ int bracef; /* was there a brace at the end of line? */
+ int i;
char ichar[NSTRING]; /* buffer to hold indent of last line */
/* grab a pointer to text to copy indentation from */
@@ -526,12 +526,12 @@ int cinsert(void)
*/
int insbrace(int n, int c)
{
- register int ch; /* last character before input */
- register int oc; /* caractere oppose a c */
- register int i, count;
- register int target; /* column brace should go after */
- register LINE *oldlp;
- register int oldoff;
+ int ch; /* last character before input */
+ int oc; /* caractere oppose a c */
+ int i, count;
+ int target; /* column brace should go after */
+ LINE *oldlp;
+ int oldoff;
/* if we aren't at the beginning of the line... */
if (curwp->w_doto != 0)
@@ -622,9 +622,9 @@ int insbrace(int n, int c)
*/
int insbrace(int n, int c)
{
- register int ch; /* last character before input */
- register int i;
- register int target; /* column brace should go after */
+ int ch; /* last character before input */
+ int i;
+ int target; /* column brace should go after */
/* if we are at the beginning of the line, no go */
if (curwp->w_doto == 0)
@@ -651,8 +651,8 @@ int insbrace(int n, int c)
int inspound(void)
{ /* insert a # into the text here...we are in CMODE */
- register int ch; /* last character before input */
- register int i;
+ int ch; /* last character before input */
+ int i;
/* if we are at the beginning of the line, no go */
if (curwp->w_doto == 0)
@@ -683,8 +683,8 @@ int inspound(void)
*/
int deblank(int f, int n)
{
- register LINE *lp1;
- register LINE *lp2;
+ LINE *lp1;
+ LINE *lp2;
long nld;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
@@ -713,9 +713,9 @@ int deblank(int f, int n)
*/
int indent(int f, int n)
{
- register int nicol;
- register int c;
- register int i;
+ int nicol;
+ int c;
+ int i;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -767,7 +767,7 @@ int forwdel(int f, int n)
*/
int backdel(int f, int n)
{
- register int s;
+ int s;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -793,7 +793,7 @@ int backdel(int f, int n)
*/
int killtext(int f, int n)
{
- register LINE *nextp;
+ LINE *nextp;
long chunk;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
@@ -888,11 +888,11 @@ int delgmode(int f, int n)
*/
int adjustmode(int kind, int global)
{
- register char *scan; /* scanning pointer to convert prompt */
- register int i; /* loop index */
- register int status; /* error return on input */
+ char *scan; /* scanning pointer to convert prompt */
+ int i; /* loop index */
+ int status; /* error return on input */
#if COLOR
- register int uflag; /* was modename uppercase? */
+ int uflag; /* was modename uppercase? */
#endif
char prompt[50]; /* string to prompt user with */
char cbuf[NPAT]; /* buffer to recieve mode name into */
@@ -1004,9 +1004,9 @@ int clrmes(int f, int n)
*/
int writemsg(int f, int n)
{
- register char *sp; /* pointer into buf to expand %s */
- register char *np; /* ptr into nbuf */
- register int status;
+ char *sp; /* pointer into buf to expand %s */
+ char *np; /* ptr into nbuf */
+ int status;
char buf[NPAT]; /* buffer to recieve message into */
char nbuf[NPAT * 2]; /* buffer to expand string into */
@@ -1037,13 +1037,13 @@ int writemsg(int f, int n)
*/
int getfence(int f, int n)
{
- register LINE *oldlp; /* original line pointer */
- register int oldoff; /* and offset */
- register int sdir; /* direction of search (1/-1) */
- register int count; /* current fence level count */
- register char ch; /* fence type to match against */
- register char ofence; /* open fence */
- register char c; /* current character in scan */
+ LINE *oldlp; /* original line pointer */
+ int oldoff; /* and offset */
+ int sdir; /* direction of search (1/-1) */
+ int count; /* current fence level count */
+ char ch; /* fence type to match against */
+ char ofence; /* open fence */
+ char c; /* current character in scan */
/* save the original cursor position */
oldlp = curwp->w_dotp;
@@ -1137,13 +1137,13 @@ int getfence(int f, int n)
*/
int fmatch(int ch)
{
- register LINE *oldlp; /* original line pointer */
- register int oldoff; /* and offset */
- register LINE *toplp; /* top line in current window */
- register int count; /* current fence level count */
- register char opench; /* open fence */
- register char c; /* current character in scan */
- register int i;
+ LINE *oldlp; /* original line pointer */
+ int oldoff; /* and offset */
+ LINE *toplp; /* top line in current window */
+ int count; /* current fence level count */
+ char opench; /* open fence */
+ char c; /* current character in scan */
+ int i;
/* first get the display update out there */
update(FALSE);
@@ -1204,7 +1204,7 @@ int fmatch(int ch)
*/
int istring(int f, int n)
{
- register int status; /* status return code */
+ int status; /* status return code */
char tstring[NPAT + 1]; /* string to add */
/* ask for string to insert */
@@ -1232,7 +1232,7 @@ int istring(int f, int n)
*/
int ovstring(int f, int n)
{
- register int status; /* status return code */
+ int status; /* status return code */
char tstring[NPAT + 1]; /* string to add */
/* ask for string to insert */
diff --git a/region.c b/region.c
index 17a480b..104db5d 100644
--- a/region.c
+++ b/region.c
@@ -22,7 +22,7 @@
*/
int killregion(int f, int n)
{
- register int s;
+ int s;
REGION region;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
@@ -45,9 +45,9 @@ int killregion(int f, int n)
*/
int copyregion(int f, int n)
{
- register LINE *linep;
- register int loffs;
- register int s;
+ LINE *linep;
+ int loffs;
+ int s;
REGION region;
if ((s = getregion(&region)) != TRUE)
@@ -83,10 +83,10 @@ int copyregion(int f, int n)
*/
int lowerregion(int f, int n)
{
- register LINE *linep;
- register int loffs;
- register int c;
- register int s;
+ LINE *linep;
+ int loffs;
+ int c;
+ int s;
REGION region;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
@@ -120,10 +120,10 @@ int lowerregion(int f, int n)
*/
int upperregion(int f, int n)
{
- register LINE *linep;
- register int loffs;
- register int c;
- register int s;
+ LINE *linep;
+ int loffs;
+ int c;
+ int s;
REGION region;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
@@ -160,8 +160,8 @@ int upperregion(int f, int n)
*/
int getregion(REGION *rp)
{
- register LINE *flp;
- register LINE *blp;
+ LINE *flp;
+ LINE *blp;
long fsize;
long bsize;
diff --git a/search.c b/search.c
index 3c5e55b..d35f7e9 100644
--- a/search.c
+++ b/search.c
@@ -83,7 +83,7 @@ static void setbit(int bc, BITMAP cclmap);
*/
int forwsearch(int f, int n)
{
- register int status = TRUE;
+ int status = TRUE;
/* If n is negative, search backwards.
* Otherwise proceed by asking for the search string.
@@ -129,7 +129,7 @@ int forwsearch(int f, int n)
*/
int forwhunt(int f, int n)
{
- register int status = TRUE;
+ int status = TRUE;
if (n < 0) /* search backwards */
return (backhunt(f, -n));
@@ -183,7 +183,7 @@ int forwhunt(int f, int n)
*/
int backsearch(int f, int n)
{
- register int status = TRUE;
+ int status = TRUE;
/* If n is negative, search forwards.
* Otherwise proceed by asking for the search string.
@@ -231,7 +231,7 @@ int backsearch(int f, int n)
*/
int backhunt(int f, int n)
{
- register int status = TRUE;
+ int status = TRUE;
if (n < 0)
return (forwhunt(f, -n));
@@ -356,7 +356,7 @@ int mcscanner(MC *mcpatrn, int direct, int beg_or_end)
*/
static int amatch(MC *mcptr, int direct, LINE **pcwline, int *pcwoff)
{
- register int c; /* character at current position */
+ int c; /* character at current position */
LINE *curline; /* current line during scan */
int curoff; /* position within current line */
int nchars;
@@ -496,7 +496,7 @@ static int amatch(MC *mcptr, int direct, LINE **pcwline, int *pcwoff)
*/
int scanner(const char *patrn, int direct, int beg_or_end)
{
- register int c; /* character at current position */
+ int c; /* character at current position */
const char *patptr; /* pointer into pattern */
LINE *curline; /* current line during scan */
int curoff; /* position within current line */
@@ -639,8 +639,8 @@ static int readpattern(char *prompt, char *apat, int srch)
*/
void savematch(void)
{
- register char *ptr; /* pointer to last match string */
- register int j;
+ char *ptr; /* pointer to last match string */
+ int j;
LINE *curline; /* line of last match */
int curoff; /* offset " " */
@@ -668,7 +668,7 @@ void savematch(void)
*/
void rvstrcpy(char *rvstr, char *str)
{
- register int i;
+ int i;
str += (i = strlen(str));
@@ -710,10 +710,10 @@ int qreplace(int f, int n)
*/
static int replaces(int kind, int f, int n)
{
- register int status; /* success flag on pattern inputs */
- register int rlength; /* length of replacement string */
- register int numsub; /* number of substitutions */
- register int nummatch; /* number of found matches */
+ int status; /* success flag on pattern inputs */
+ int rlength; /* length of replacement string */
+ int numsub; /* number of substitutions */
+ int nummatch; /* number of found matches */
int nlflag; /* last char of search string a <NL>? */
int nlrepl; /* was a replace done on the last line? */
char c; /* input char for query */
@@ -1015,7 +1015,7 @@ int expandp(char *srcstr, char *deststr, int maxlength)
*/
int boundry(LINE *curline, int curoff, int dir)
{
- register int border;
+ int border;
if (dir == FORWARD) {
border = (curoff == llength(curline)) &&
@@ -1037,9 +1037,9 @@ int boundry(LINE *curline, int curoff, int dir)
*/
static int nextch(LINE **pcurline, int *pcuroff, int dir)
{
- register LINE *curline;
- register int curoff;
- register int c;
+ LINE *curline;
+ int curoff;
+ int c;
curline = *pcurline;
curoff = *pcuroff;
@@ -1288,7 +1288,7 @@ static int rmcstr(void)
*/
void mcclear(void)
{
- register MC *mcptr;
+ MC *mcptr;
mcptr = &mcpat[0];
@@ -1306,7 +1306,7 @@ void mcclear(void)
*/
void rmcclear(void)
{
- register RMC *rmcptr;
+ RMC *rmcptr;
rmcptr = &rmcpat[0];
@@ -1326,7 +1326,7 @@ void rmcclear(void)
*/
static int mceq(int bc, MC *mt)
{
- register int result;
+ int result;
#if PKCODE
bc = bc & 0xFF;
@@ -1377,8 +1377,8 @@ static int cclmake(char **ppatptr, MC *mcptr)
{
BITMAP clearbits();
BITMAP bmap;
- register char *patptr;
- register int pchr, ochr;
+ char *patptr;
+ int pchr, ochr;
if ((bmap = clearbits()) == NULL) {
mlwrite("%%Out of memory");
@@ -1469,7 +1469,7 @@ static int biteq(int bc, BITMAP cclmap)
static BITMAP clearbits(void)
{
BITMAP cclstart, cclmap;
- register int j;
+ int j;
if ((cclmap = cclstart = (BITMAP) malloc(HIBYTE)) != NULL)
for (j = 0; j < HIBYTE; j++)
diff --git a/spawn.c b/spawn.c
index 850752c..856de23 100644
--- a/spawn.c
+++ b/spawn.c
@@ -44,7 +44,7 @@ extern void sizesignal();
int spawncli(int f, int n)
{
#if V7 | USG | BSD
- register char *cp;
+ char *cp;
#endif
/* don't allow this command if restricted */
@@ -132,7 +132,7 @@ void rtfrmshell(void)
*/
int spawn(int f, int n)
{
- register int s;
+ int s;
char line[NLINE];
/* don't allow this command if restricted */
@@ -198,7 +198,7 @@ int spawn(int f, int n)
int execprg(int f, int n)
{
- register int s;
+ int s;
char line[NLINE];
/* don't allow this command if restricted */
@@ -256,9 +256,9 @@ int execprg(int f, int n)
*/
int pipecmd(int f, int n)
{
- register int s; /* return status from CLI */
- register window_t *wp; /* pointer to new window */
- register struct buffer *bp; /* pointer to buffer to zot */
+ int s; /* return status from CLI */
+ window_t *wp; /* pointer to new window */
+ struct buffer *bp; /* pointer to buffer to zot */
char line[NLINE]; /* command line send to shell */
static char bname[] = "command";
@@ -378,8 +378,8 @@ int pipecmd(int f, int n)
*/
int filter_buffer(int f, int n)
{
- register int s; /* return status from CLI */
- register struct buffer *bp; /* pointer to buffer to zot */
+ int s; /* return status from CLI */
+ struct buffer *bp; /* pointer to buffer to zot */
char line[NLINE]; /* command line send to shell */
char tmpnam[NFILEN]; /* place to store real file name */
static char bname1[] = "fltinp";
diff --git a/vmsvt.c b/vmsvt.c
index c3d248f..e84add7 100644
--- a/vmsvt.c
+++ b/vmsvt.c
@@ -119,9 +119,9 @@ int col; /* Column position */
static int request_code = SMG$K_SET_CURSOR_ABS;
static int max_buffer_length = sizeof(buffer);
static int arg_list[3] = { 2 };
- register char *cp;
+ char *cp;
- register int i;
+ int i;
/* Set the arguments into the arg_list array
* SMG assumes the row/column positions are 1 based (boo!)
@@ -181,9 +181,9 @@ int bot; /* Bottom position */
static int request_code = SMG$K_SET_SCROLL_REGION;
static int max_buffer_length = sizeof(buffer);
static int arg_list[3] = { 2 };
- register char *cp;
+ char *cp;
- register int i;
+ int i;
/* Set the arguments into the arg_list array
* SMG assumes the row/column positions are 1 based (boo!)
@@ -303,7 +303,7 @@ vmsbeep()
char *vmsgetstr(request_code)
int request_code; /* Request code */
{
- register char *result;
+ char *result;
static char seq_storage[1024];
static char *buffer = seq_storage;
static int arg_list[2] = { 1, 1 };
diff --git a/vt52.c b/vt52.c
index 222b292..0d59d4c 100644
--- a/vt52.c
+++ b/vt52.c
@@ -142,7 +142,7 @@ vt52beep()
vt52open()
{
#if V7 | BSD
- register char *cp;
+ char *cp;
char *getenv();
if ((cp = getenv("TERM")) == NULL) {
diff --git a/window.c b/window.c
index f13577b..3af489d 100644
--- a/window.c
+++ b/window.c
@@ -53,8 +53,8 @@ int redraw(int f, int n)
*/
int nextwind(int f, int n)
{
- register window_t *wp;
- register int nwindows; /* total number of windows */
+ window_t *wp;
+ int nwindows; /* total number of windows */
if (f) {
@@ -96,8 +96,8 @@ int nextwind(int f, int n)
*/
int prevwind(int f, int n)
{
- register window_t *wp1;
- register window_t *wp2;
+ window_t *wp1;
+ window_t *wp2;
/* if we have an argument, we mean the nth window from the bottom */
if (f)
@@ -140,8 +140,8 @@ int mvdnwind(int f, int n)
*/
int mvupwind(int f, int n)
{
- register LINE *lp;
- register int i;
+ LINE *lp;
+ int i;
lp = curwp->w_linep;
@@ -184,9 +184,9 @@ int mvupwind(int f, int n)
*/
int onlywind(int f, int n)
{
- register window_t *wp;
- register LINE *lp;
- register int i;
+ window_t *wp;
+ LINE *lp;
+ int i;
while (wheadp != curwp) {
wp = wheadp;
@@ -231,9 +231,9 @@ int onlywind(int f, int n)
*/
int delwind(int f, int n)
{
- register window_t *wp; /* window to recieve deleted space */
- register window_t *lwp; /* ptr window before curwp */
- register int target; /* target line to search for */
+ window_t *wp; /* window to recieve deleted space */
+ window_t *lwp; /* ptr window before curwp */
+ int target; /* target line to search for */
/* if there is only one window, don't delete it */
if (wheadp->w_wndp == NULL) {
@@ -309,13 +309,13 @@ int delwind(int f, int n)
*/
int splitwind(int f, int n)
{
- register window_t *wp;
- register LINE *lp;
- register int ntru;
- register int ntrl;
- register int ntrd;
- register window_t *wp1;
- register window_t *wp2;
+ window_t *wp;
+ LINE *lp;
+ int ntru;
+ int ntrl;
+ int ntrd;
+ window_t *wp1;
+ window_t *wp2;
if (curwp->w_ntrows < 3) {
mlwrite("Cannot split a %d line window", curwp->w_ntrows);
@@ -391,9 +391,9 @@ int splitwind(int f, int n)
*/
int enlargewind(int f, int n)
{
- register window_t *adjwp;
- register LINE *lp;
- register int i;
+ window_t *adjwp;
+ LINE *lp;
+ int i;
if (n < 0)
return (shrinkwind(f, -n));
@@ -442,9 +442,9 @@ int enlargewind(int f, int n)
*/
int shrinkwind(int f, int n)
{
- register window_t *adjwp;
- register LINE *lp;
- register int i;
+ window_t *adjwp;
+ LINE *lp;
+ int i;
if (n < 0)
return (enlargewind(f, -n));
@@ -517,7 +517,7 @@ int resize(int f, int n)
*/
window_t *wpopup(void)
{
- register window_t *wp;
+ window_t *wp;
if (wheadp->w_wndp == NULL /* Only 1 window */
&& splitwind(FALSE, 0) == FALSE) /* and it won't split */
@@ -552,7 +552,7 @@ int savewnd(int f, int n)
int restwnd(int f, int n)
{ /* restore the saved screen */
- register window_t *wp;
+ window_t *wp;
/* find the window */
wp = wheadp;
@@ -666,7 +666,7 @@ int newsize(int f, int n)
*/
int newwidth(int f, int n)
{
- register window_t *wp;
+ window_t *wp;
/* if the command defaults, assume the largest */
if (f == FALSE)
@@ -696,8 +696,8 @@ int newwidth(int f, int n)
int getwpos(void)
{ /* get screen offset of current line in current window */
- register int sline; /* screen line from top of window */
- register LINE *lp; /* scannile line pointer */
+ int sline; /* screen line from top of window */
+ LINE *lp; /* scannile line pointer */
/* search down the line we want */
lp = curwp->w_linep;
diff --git a/word.c b/word.c
index a1a84f3..c4e7667 100644
--- a/word.c
+++ b/word.c
@@ -25,8 +25,8 @@
*/
int wrapword(int f, int n)
{
- register int cnt; /* size of word wrapped to next line */
- register int c; /* charector temporary */
+ int cnt; /* size of word wrapped to next line */
+ int c; /* charector temporary */
/* backup from the <NL> 1 char */
if (!backchar(0, 1))
@@ -116,7 +116,7 @@ int forwword(int f, int n)
*/
int upperword(int f, int n)
{
- register int c;
+ int c;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -152,7 +152,7 @@ int upperword(int f, int n)
*/
int lowerword(int f, int n)
{
- register int c;
+ int c;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -189,7 +189,7 @@ int lowerword(int f, int n)
*/
int capword(int f, int n)
{
- register int c;
+ int c;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@@ -241,9 +241,9 @@ int capword(int f, int n)
*/
int delfword(int f, int n)
{
- register LINE *dotp; /* original cursor line */
- register int doto; /* and row */
- register int c; /* temp char */
+ LINE *dotp; /* original cursor line */
+ int doto; /* and row */
+ int c; /* temp char */
long size; /* # of chars to delete */
/* don't allow this command if we are in read only mode */
@@ -371,7 +371,7 @@ int delbword(int f, int n)
*/
int inword(void)
{
- register int c;
+ int c;
if (curwp->w_doto == llength(curwp->w_dotp))
return (FALSE);
@@ -398,15 +398,15 @@ int inword(void)
*/
int fillpara(int f, int n)
{
- register int c; /* current char durring scan */
- register int wordlen; /* length of current word */
- register int clength; /* position on line during fill */
- register int i; /* index during word copy */
- register int newlength; /* tentative new line length */
- register int eopflag; /* Are we at the End-Of-Paragraph? */
- register int firstflag; /* first word? (needs no space) */
- register LINE *eopline; /* pointer to line just past EOP */
- register int dotflag; /* was the last char a period? */
+ int c; /* current char durring scan */
+ int wordlen; /* length of current word */
+ int clength; /* position on line during fill */
+ int i; /* index during word copy */
+ int newlength; /* tentative new line length */
+ int eopflag; /* Are we at the End-Of-Paragraph? */
+ int firstflag; /* first word? (needs no space) */
+ LINE *eopline; /* pointer to line just past EOP */
+ int dotflag; /* was the last char a period? */
char wbuf[NSTRING]; /* buffer for current word */
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
@@ -495,14 +495,14 @@ int fillpara(int f, int n)
*/
int justpara(int f, int n)
{
- register int c; /* current char durring scan */
- register int wordlen; /* length of current word */
- register int clength; /* position on line during fill */
- register int i; /* index during word copy */
- register int newlength; /* tentative new line length */
- register int eopflag; /* Are we at the End-Of-Paragraph? */
- register int firstflag; /* first word? (needs no space) */
- register LINE *eopline; /* pointer to line just past EOP */
+ int c; /* current char durring scan */
+ int wordlen; /* length of current word */
+ int clength; /* position on line during fill */
+ int i; /* index during word copy */
+ int newlength; /* tentative new line length */
+ int eopflag; /* Are we at the End-Of-Paragraph? */
+ int firstflag; /* first word? (needs no space) */
+ LINE *eopline; /* pointer to line just past EOP */
char wbuf[NSTRING]; /* buffer for current word */
int leftmarg; /* left marginal */
@@ -605,7 +605,7 @@ int justpara(int f, int n)
*/
int killpara(int f, int n)
{
- register int status; /* returned status of functions */
+ int status; /* returned status of functions */
while (n--) { /* for each paragraph to delete */
@@ -640,12 +640,12 @@ int killpara(int f, int n)
*/
int wordcount(int f, int n)
{
- register LINE *lp; /* current line to scan */
- register int offset; /* current char to scan */
+ LINE *lp; /* current line to scan */
+ int offset; /* current char to scan */
long size; /* size of region left to count */
- register int ch; /* current character to scan */
- register int wordflag; /* are we in a word now? */
- register int lastword; /* were we just in a word? */
+ int ch; /* current character to scan */
+ int wordflag; /* are we in a word now? */
+ int lastword; /* were we just in a word? */
long nwords; /* total # of words */
long nchars; /* total number of chars */
int nlines; /* total number of lines in region */