From 29ea5f794d20264c545a0e641835cbbd6821d46f Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Wed, 27 Jun 2018 13:08:13 -0600 Subject: [PATCH] makedepend: remove register keyword --- cde/config/makedepend/cppsetup.c | 16 ++++---- cde/config/makedepend/include.c | 24 ++++++------ cde/config/makedepend/main.c | 30 +++++++-------- cde/config/makedepend/parse.c | 64 ++++++++++++++++---------------- cde/config/makedepend/pr.c | 14 +++---- 5 files changed, 74 insertions(+), 74 deletions(-) diff --git a/cde/config/makedepend/cppsetup.c b/cde/config/makedepend/cppsetup.c index 998b0575..005051a2 100644 --- a/cde/config/makedepend/cppsetup.c +++ b/cde/config/makedepend/cppsetup.c @@ -77,11 +77,11 @@ struct filepointer *currentfile; struct inclist *currentinc; cppsetup(line, filep, inc) - register char *line; - register struct filepointer *filep; - register struct inclist *inc; + char *line; + struct filepointer *filep; + struct inclist *inc; { - register char *p, savec; + char *p, savec; static boolean setupdone = FALSE; boolean value; @@ -135,7 +135,7 @@ pperror(tag, x0,x1,x2,x3,x4) yyerror(s) - register char *s; + char *s; { fatalerr("Fatal error: %s\n", s); } @@ -236,9 +236,9 @@ my_eval_variable (ip, var, len) int cppsetup(line, filep, inc) - register char *line; - register struct filepointer *filep; - register struct inclist *inc; + char *line; + struct filepointer *filep; + struct inclist *inc; { IfParser ip; struct _parse_data pd; diff --git a/cde/config/makedepend/include.c b/cde/config/makedepend/include.c index ff36ffe1..64e8b9ad 100644 --- a/cde/config/makedepend/include.c +++ b/cde/config/makedepend/include.c @@ -55,7 +55,7 @@ extern boolean warn_multiple; boolean isdot(p) - register char *p; + char *p; { if(p && *p++ == '.' && *p++ == '\0') return(TRUE); @@ -64,7 +64,7 @@ isdot(p) boolean isdotdot(p) - register char *p; + char *p; { if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0') return(TRUE); @@ -73,7 +73,7 @@ isdotdot(p) boolean issymbolic(dir, component) - register char *dir, *component; + char *dir, *component; { #ifdef S_IFLNK struct stat st; @@ -103,7 +103,7 @@ void remove_dotdot(path) char *path; { - register char *end, *from, *to, **cp; + char *end, *from, *to, **cp; char *components[ MAXFILES ], newpath[ BUFSIZ ]; boolean component_copied; @@ -173,9 +173,9 @@ remove_dotdot(path) * Add an include file to the list of those included by 'file'. */ struct inclist *newinclude(newfile, incstring) - register char *newfile, *incstring; + char *newfile, *incstring; { - register struct inclist *ip; + struct inclist *ip; /* * First, put this file on the global list of include files. @@ -195,9 +195,9 @@ struct inclist *newinclude(newfile, incstring) void included_by(ip, newfile) - register struct inclist *ip, *newfile; + struct inclist *ip, *newfile; { - register int i; + int i; if (ip == NULL) return; @@ -247,7 +247,7 @@ included_by(ip, newfile) void inc_clean () { - register struct inclist *ip; + struct inclist *ip; for (ip = inclist; ip < inclistp; ip++) { ip->i_flags &= ~MARKED; @@ -255,13 +255,13 @@ inc_clean () } struct inclist *inc_path(file, include, dot) - register char *file, + char *file, *include; boolean dot; { static char path[ BUFSIZ ]; - register char **pp, *p; - register struct inclist *ip; + char **pp, *p; + struct inclist *ip; struct stat st; boolean found = FALSE; diff --git a/cde/config/makedepend/main.c b/cde/config/makedepend/main.c index 07be1592..22e5da17 100644 --- a/cde/config/makedepend/main.c +++ b/cde/config/makedepend/main.c @@ -152,10 +152,10 @@ int main(argc, argv) int argc; char **argv; { - register char **fp = filelist; - register char **incp = includedirs; - register char *p; - register struct inclist *ip; + char **fp = filelist; + char **incp = includedirs; + char *p; + struct inclist *ip; char *makefile = NULL; struct filepointer *filecontent; struct symtab *psymp = predefs; @@ -452,7 +452,7 @@ int main(argc, argv) struct filepointer *getfile(file) char *file; { - register int fd; + int fd; struct filepointer *content; struct stat st; @@ -487,18 +487,18 @@ freefile(fp) } char *copy(str) - register char *str; + char *str; { - register char *p = (char *)malloc(strlen(str) + 1); + char *p = (char *)malloc(strlen(str) + 1); strncpy(p, str, strlen(str) + 1); return(p); } int match(str, list) - register char *str, **list; + char *str, **list; { - register int i; + int i; for (i=0; *list; i++, list++) if (strcmp(str, *list) == 0) @@ -511,12 +511,12 @@ int match(str, list) * is all this program is ever interested in. */ char *our_getline(filep) - register struct filepointer *filep; + struct filepointer *filep; { - register char *p, /* walking pointer */ + char *p, /* walking pointer */ *eof, /* end of file pointer */ *bol; /* beginning of line pointer */ - register int lineno; /* line number */ + int lineno; /* line number */ p = filep->f_p; eof = filep->f_end; @@ -574,7 +574,7 @@ char *our_getline(filep) else if (*p == '\n') { lineno++; if (*bol == '#') { - register char *cp; + char *cp; *p++ = '\0'; /* punt lines with just # (yacc generated) */ @@ -598,9 +598,9 @@ done: * It will have objprefix and objsuffix around it. */ char *base_name(file) - register char *file; + char *file; { - register char *p; + char *p; file = copy(file); for(p=file+strlen(file); p>file && *p != '.'; p--) ; diff --git a/cde/config/makedepend/parse.c b/cde/config/makedepend/parse.c index 6e1e9fb1..4d9a13f4 100644 --- a/cde/config/makedepend/parse.c +++ b/cde/config/makedepend/parse.c @@ -54,11 +54,11 @@ extern struct inclist maininclist; int gobble(filep, file, file_red) - register struct filepointer *filep; + struct filepointer *filep; struct inclist *file, *file_red; { - register char *line; - register int type; + char *line; + int type; while ((line = our_getline(filep))) { switch(type = deftype(line, filep, file_red, file, FALSE)) { @@ -108,14 +108,14 @@ gobble(filep, file, file_red) * Decide what type of # directive this line is. */ int deftype (line, filep, file_red, file, parse_it) - register char *line; - register struct filepointer *filep; - register struct inclist *file_red, *file; + char *line; + struct filepointer *filep; + struct inclist *file_red, *file; int parse_it; { - register char *p; + char *p; char *directive, savechar, *q; - register int ret; + int ret; /* * Parse the directive... @@ -257,13 +257,13 @@ int deftype (line, filep, file_red, file, parse_it) } struct symtab **fdefined(symbol, file, srcfile) - register char *symbol; + char *symbol; struct inclist *file; struct inclist **srcfile; { - register struct inclist **ip; - register struct symtab **val; - register int i; + struct inclist **ip; + struct symtab **val; + int i; static int recurse_lvl = 0; if (file->i_flags & DEFCHECKED) @@ -292,11 +292,11 @@ struct symtab **fdefined(symbol, file, srcfile) } struct symtab **isdefined(symbol, file, srcfile) - register char *symbol; + char *symbol; struct inclist *file; struct inclist **srcfile; { - register struct symtab **val; + struct symtab **val; if ((val = slookup(symbol, &maininclist))) { debug(1,("%s defined on command line\n", symbol)); @@ -314,9 +314,9 @@ struct symtab **isdefined(symbol, file, srcfile) */ int zero_value(exp, filep, file_red) - register char *exp; - register struct filepointer *filep; - register struct inclist *file_red; + char *exp; + struct filepointer *filep; + struct inclist *file_red; { if ((cppsetup(exp, filep, file_red))) return(IFFALSE); @@ -330,7 +330,7 @@ define2(name, val, file) struct inclist *file; { int first, last, below; - register struct symtab **sp = NULL, **dest; + struct symtab **sp = NULL, **dest; struct symtab *stab; /* Make space if it's needed */ @@ -353,9 +353,9 @@ define2(name, val, file) while (last >= first) { /* Fast inline binary search */ - register char *s1; - register char *s2; - register int middle = (first + last) / 2; + char *s1; + char *s2; + int middle = (first + last) / 2; /* Fast inline strchr() */ s1 = name; @@ -430,18 +430,18 @@ define(def, file) } struct symtab **slookup(symbol, file) - register char *symbol; - register struct inclist *file; + char *symbol; + struct inclist *file; { - register int first = 0; - register int last = file->i_ndefs - 1; + int first = 0; + int last = file->i_ndefs - 1; if (file) while (last >= first) { /* Fast inline binary search */ - register char *s1; - register char *s2; - register int middle = (first + last) / 2; + char *s1; + char *s2; + int middle = (first + last) / 2; /* Fast inline strchr() */ s1 = symbol; @@ -530,9 +530,9 @@ int merge2defines(file1, file2) void undefine(symbol, file) char *symbol; - register struct inclist *file; + struct inclist *file; { - register struct symtab **ptr; + struct symtab **ptr; struct inclist *srcfile; while ((ptr = isdefined(symbol, file, &srcfile)) != NULL) { @@ -549,8 +549,8 @@ find_includes(filep, file, file_red, recursion, failOK) int recursion; boolean failOK; { - register char *line; - register int type; + char *line; + int type; boolean recfailOK; while ((line = our_getline(filep))) { diff --git a/cde/config/makedepend/pr.c b/cde/config/makedepend/pr.c index c78e5d18..b10eb318 100644 --- a/cde/config/makedepend/pr.c +++ b/cde/config/makedepend/pr.c @@ -62,8 +62,8 @@ add_include(filep, file, file_red, include, dot, failOK) boolean dot; boolean failOK; { - register struct inclist *newfile; - register struct filepointer *content; + struct inclist *newfile; + struct filepointer *content; /* * First decide what the pathname of this include file really is. @@ -96,12 +96,12 @@ add_include(filep, file, file_red, include, dot, failOK) void pr(ip, file, base) - register struct inclist *ip; + struct inclist *ip; char *file, *base; { static char *lastfile; static int current_len; - register int len, i; + int len, i; char buf[ BUFSIZ ]; printed = TRUE; @@ -133,10 +133,10 @@ pr(ip, file, base) void recursive_pr_include(head, file, base) - register struct inclist *head; - register char *file, *base; + struct inclist *head; + char *file, *base; { - register int i; + int i; if (head->i_flags & MARKED) return; -- 2.25.1