mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
makedepend: remove register keyword
This commit is contained in:
parent
aad31c8e27
commit
29ea5f794d
5 changed files with 74 additions and 74 deletions
|
@ -77,11 +77,11 @@ struct filepointer *currentfile;
|
||||||
struct inclist *currentinc;
|
struct inclist *currentinc;
|
||||||
|
|
||||||
cppsetup(line, filep, inc)
|
cppsetup(line, filep, inc)
|
||||||
register char *line;
|
char *line;
|
||||||
register struct filepointer *filep;
|
struct filepointer *filep;
|
||||||
register struct inclist *inc;
|
struct inclist *inc;
|
||||||
{
|
{
|
||||||
register char *p, savec;
|
char *p, savec;
|
||||||
static boolean setupdone = FALSE;
|
static boolean setupdone = FALSE;
|
||||||
boolean value;
|
boolean value;
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ pperror(tag, x0,x1,x2,x3,x4)
|
||||||
|
|
||||||
|
|
||||||
yyerror(s)
|
yyerror(s)
|
||||||
register char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
fatalerr("Fatal error: %s\n", s);
|
fatalerr("Fatal error: %s\n", s);
|
||||||
}
|
}
|
||||||
|
@ -236,9 +236,9 @@ my_eval_variable (ip, var, len)
|
||||||
|
|
||||||
|
|
||||||
int cppsetup(line, filep, inc)
|
int cppsetup(line, filep, inc)
|
||||||
register char *line;
|
char *line;
|
||||||
register struct filepointer *filep;
|
struct filepointer *filep;
|
||||||
register struct inclist *inc;
|
struct inclist *inc;
|
||||||
{
|
{
|
||||||
IfParser ip;
|
IfParser ip;
|
||||||
struct _parse_data pd;
|
struct _parse_data pd;
|
||||||
|
|
|
@ -55,7 +55,7 @@ extern boolean warn_multiple;
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
isdot(p)
|
isdot(p)
|
||||||
register char *p;
|
char *p;
|
||||||
{
|
{
|
||||||
if(p && *p++ == '.' && *p++ == '\0')
|
if(p && *p++ == '.' && *p++ == '\0')
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -64,7 +64,7 @@ isdot(p)
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
isdotdot(p)
|
isdotdot(p)
|
||||||
register char *p;
|
char *p;
|
||||||
{
|
{
|
||||||
if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0')
|
if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0')
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -73,7 +73,7 @@ isdotdot(p)
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
issymbolic(dir, component)
|
issymbolic(dir, component)
|
||||||
register char *dir, *component;
|
char *dir, *component;
|
||||||
{
|
{
|
||||||
#ifdef S_IFLNK
|
#ifdef S_IFLNK
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -103,7 +103,7 @@ void
|
||||||
remove_dotdot(path)
|
remove_dotdot(path)
|
||||||
char *path;
|
char *path;
|
||||||
{
|
{
|
||||||
register char *end, *from, *to, **cp;
|
char *end, *from, *to, **cp;
|
||||||
char *components[ MAXFILES ],
|
char *components[ MAXFILES ],
|
||||||
newpath[ BUFSIZ ];
|
newpath[ BUFSIZ ];
|
||||||
boolean component_copied;
|
boolean component_copied;
|
||||||
|
@ -173,9 +173,9 @@ remove_dotdot(path)
|
||||||
* Add an include file to the list of those included by 'file'.
|
* Add an include file to the list of those included by 'file'.
|
||||||
*/
|
*/
|
||||||
struct inclist *newinclude(newfile, incstring)
|
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.
|
* First, put this file on the global list of include files.
|
||||||
|
@ -195,9 +195,9 @@ struct inclist *newinclude(newfile, incstring)
|
||||||
|
|
||||||
void
|
void
|
||||||
included_by(ip, newfile)
|
included_by(ip, newfile)
|
||||||
register struct inclist *ip, *newfile;
|
struct inclist *ip, *newfile;
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
if (ip == NULL)
|
if (ip == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -247,7 +247,7 @@ included_by(ip, newfile)
|
||||||
void
|
void
|
||||||
inc_clean ()
|
inc_clean ()
|
||||||
{
|
{
|
||||||
register struct inclist *ip;
|
struct inclist *ip;
|
||||||
|
|
||||||
for (ip = inclist; ip < inclistp; ip++) {
|
for (ip = inclist; ip < inclistp; ip++) {
|
||||||
ip->i_flags &= ~MARKED;
|
ip->i_flags &= ~MARKED;
|
||||||
|
@ -255,13 +255,13 @@ inc_clean ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct inclist *inc_path(file, include, dot)
|
struct inclist *inc_path(file, include, dot)
|
||||||
register char *file,
|
char *file,
|
||||||
*include;
|
*include;
|
||||||
boolean dot;
|
boolean dot;
|
||||||
{
|
{
|
||||||
static char path[ BUFSIZ ];
|
static char path[ BUFSIZ ];
|
||||||
register char **pp, *p;
|
char **pp, *p;
|
||||||
register struct inclist *ip;
|
struct inclist *ip;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
boolean found = FALSE;
|
boolean found = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -152,10 +152,10 @@ int main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
register char **fp = filelist;
|
char **fp = filelist;
|
||||||
register char **incp = includedirs;
|
char **incp = includedirs;
|
||||||
register char *p;
|
char *p;
|
||||||
register struct inclist *ip;
|
struct inclist *ip;
|
||||||
char *makefile = NULL;
|
char *makefile = NULL;
|
||||||
struct filepointer *filecontent;
|
struct filepointer *filecontent;
|
||||||
struct symtab *psymp = predefs;
|
struct symtab *psymp = predefs;
|
||||||
|
@ -452,7 +452,7 @@ int main(argc, argv)
|
||||||
struct filepointer *getfile(file)
|
struct filepointer *getfile(file)
|
||||||
char *file;
|
char *file;
|
||||||
{
|
{
|
||||||
register int fd;
|
int fd;
|
||||||
struct filepointer *content;
|
struct filepointer *content;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
|
@ -487,18 +487,18 @@ freefile(fp)
|
||||||
}
|
}
|
||||||
|
|
||||||
char *copy(str)
|
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);
|
strncpy(p, str, strlen(str) + 1);
|
||||||
return(p);
|
return(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
int match(str, list)
|
int match(str, list)
|
||||||
register char *str, **list;
|
char *str, **list;
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; *list; i++, list++)
|
for (i=0; *list; i++, list++)
|
||||||
if (strcmp(str, *list) == 0)
|
if (strcmp(str, *list) == 0)
|
||||||
|
@ -511,12 +511,12 @@ int match(str, list)
|
||||||
* is all this program is ever interested in.
|
* is all this program is ever interested in.
|
||||||
*/
|
*/
|
||||||
char *our_getline(filep)
|
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 */
|
*eof, /* end of file pointer */
|
||||||
*bol; /* beginning of line pointer */
|
*bol; /* beginning of line pointer */
|
||||||
register int lineno; /* line number */
|
int lineno; /* line number */
|
||||||
|
|
||||||
p = filep->f_p;
|
p = filep->f_p;
|
||||||
eof = filep->f_end;
|
eof = filep->f_end;
|
||||||
|
@ -574,7 +574,7 @@ char *our_getline(filep)
|
||||||
else if (*p == '\n') {
|
else if (*p == '\n') {
|
||||||
lineno++;
|
lineno++;
|
||||||
if (*bol == '#') {
|
if (*bol == '#') {
|
||||||
register char *cp;
|
char *cp;
|
||||||
|
|
||||||
*p++ = '\0';
|
*p++ = '\0';
|
||||||
/* punt lines with just # (yacc generated) */
|
/* punt lines with just # (yacc generated) */
|
||||||
|
@ -598,9 +598,9 @@ done:
|
||||||
* It will have objprefix and objsuffix around it.
|
* It will have objprefix and objsuffix around it.
|
||||||
*/
|
*/
|
||||||
char *base_name(file)
|
char *base_name(file)
|
||||||
register char *file;
|
char *file;
|
||||||
{
|
{
|
||||||
register char *p;
|
char *p;
|
||||||
|
|
||||||
file = copy(file);
|
file = copy(file);
|
||||||
for(p=file+strlen(file); p>file && *p != '.'; p--) ;
|
for(p=file+strlen(file); p>file && *p != '.'; p--) ;
|
||||||
|
|
|
@ -54,11 +54,11 @@ extern struct inclist maininclist;
|
||||||
|
|
||||||
int
|
int
|
||||||
gobble(filep, file, file_red)
|
gobble(filep, file, file_red)
|
||||||
register struct filepointer *filep;
|
struct filepointer *filep;
|
||||||
struct inclist *file, *file_red;
|
struct inclist *file, *file_red;
|
||||||
{
|
{
|
||||||
register char *line;
|
char *line;
|
||||||
register int type;
|
int type;
|
||||||
|
|
||||||
while ((line = our_getline(filep))) {
|
while ((line = our_getline(filep))) {
|
||||||
switch(type = deftype(line, filep, file_red, file, FALSE)) {
|
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.
|
* Decide what type of # directive this line is.
|
||||||
*/
|
*/
|
||||||
int deftype (line, filep, file_red, file, parse_it)
|
int deftype (line, filep, file_red, file, parse_it)
|
||||||
register char *line;
|
char *line;
|
||||||
register struct filepointer *filep;
|
struct filepointer *filep;
|
||||||
register struct inclist *file_red, *file;
|
struct inclist *file_red, *file;
|
||||||
int parse_it;
|
int parse_it;
|
||||||
{
|
{
|
||||||
register char *p;
|
char *p;
|
||||||
char *directive, savechar, *q;
|
char *directive, savechar, *q;
|
||||||
register int ret;
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse the directive...
|
* Parse the directive...
|
||||||
|
@ -257,13 +257,13 @@ int deftype (line, filep, file_red, file, parse_it)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct symtab **fdefined(symbol, file, srcfile)
|
struct symtab **fdefined(symbol, file, srcfile)
|
||||||
register char *symbol;
|
char *symbol;
|
||||||
struct inclist *file;
|
struct inclist *file;
|
||||||
struct inclist **srcfile;
|
struct inclist **srcfile;
|
||||||
{
|
{
|
||||||
register struct inclist **ip;
|
struct inclist **ip;
|
||||||
register struct symtab **val;
|
struct symtab **val;
|
||||||
register int i;
|
int i;
|
||||||
static int recurse_lvl = 0;
|
static int recurse_lvl = 0;
|
||||||
|
|
||||||
if (file->i_flags & DEFCHECKED)
|
if (file->i_flags & DEFCHECKED)
|
||||||
|
@ -292,11 +292,11 @@ struct symtab **fdefined(symbol, file, srcfile)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct symtab **isdefined(symbol, file, srcfile)
|
struct symtab **isdefined(symbol, file, srcfile)
|
||||||
register char *symbol;
|
char *symbol;
|
||||||
struct inclist *file;
|
struct inclist *file;
|
||||||
struct inclist **srcfile;
|
struct inclist **srcfile;
|
||||||
{
|
{
|
||||||
register struct symtab **val;
|
struct symtab **val;
|
||||||
|
|
||||||
if ((val = slookup(symbol, &maininclist))) {
|
if ((val = slookup(symbol, &maininclist))) {
|
||||||
debug(1,("%s defined on command line\n", symbol));
|
debug(1,("%s defined on command line\n", symbol));
|
||||||
|
@ -314,9 +314,9 @@ struct symtab **isdefined(symbol, file, srcfile)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
zero_value(exp, filep, file_red)
|
zero_value(exp, filep, file_red)
|
||||||
register char *exp;
|
char *exp;
|
||||||
register struct filepointer *filep;
|
struct filepointer *filep;
|
||||||
register struct inclist *file_red;
|
struct inclist *file_red;
|
||||||
{
|
{
|
||||||
if ((cppsetup(exp, filep, file_red)))
|
if ((cppsetup(exp, filep, file_red)))
|
||||||
return(IFFALSE);
|
return(IFFALSE);
|
||||||
|
@ -330,7 +330,7 @@ define2(name, val, file)
|
||||||
struct inclist *file;
|
struct inclist *file;
|
||||||
{
|
{
|
||||||
int first, last, below;
|
int first, last, below;
|
||||||
register struct symtab **sp = NULL, **dest;
|
struct symtab **sp = NULL, **dest;
|
||||||
struct symtab *stab;
|
struct symtab *stab;
|
||||||
|
|
||||||
/* Make space if it's needed */
|
/* Make space if it's needed */
|
||||||
|
@ -353,9 +353,9 @@ define2(name, val, file)
|
||||||
while (last >= first)
|
while (last >= first)
|
||||||
{
|
{
|
||||||
/* Fast inline binary search */
|
/* Fast inline binary search */
|
||||||
register char *s1;
|
char *s1;
|
||||||
register char *s2;
|
char *s2;
|
||||||
register int middle = (first + last) / 2;
|
int middle = (first + last) / 2;
|
||||||
|
|
||||||
/* Fast inline strchr() */
|
/* Fast inline strchr() */
|
||||||
s1 = name;
|
s1 = name;
|
||||||
|
@ -430,18 +430,18 @@ define(def, file)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct symtab **slookup(symbol, file)
|
struct symtab **slookup(symbol, file)
|
||||||
register char *symbol;
|
char *symbol;
|
||||||
register struct inclist *file;
|
struct inclist *file;
|
||||||
{
|
{
|
||||||
register int first = 0;
|
int first = 0;
|
||||||
register int last = file->i_ndefs - 1;
|
int last = file->i_ndefs - 1;
|
||||||
|
|
||||||
if (file) while (last >= first)
|
if (file) while (last >= first)
|
||||||
{
|
{
|
||||||
/* Fast inline binary search */
|
/* Fast inline binary search */
|
||||||
register char *s1;
|
char *s1;
|
||||||
register char *s2;
|
char *s2;
|
||||||
register int middle = (first + last) / 2;
|
int middle = (first + last) / 2;
|
||||||
|
|
||||||
/* Fast inline strchr() */
|
/* Fast inline strchr() */
|
||||||
s1 = symbol;
|
s1 = symbol;
|
||||||
|
@ -530,9 +530,9 @@ int merge2defines(file1, file2)
|
||||||
void
|
void
|
||||||
undefine(symbol, file)
|
undefine(symbol, file)
|
||||||
char *symbol;
|
char *symbol;
|
||||||
register struct inclist *file;
|
struct inclist *file;
|
||||||
{
|
{
|
||||||
register struct symtab **ptr;
|
struct symtab **ptr;
|
||||||
struct inclist *srcfile;
|
struct inclist *srcfile;
|
||||||
while ((ptr = isdefined(symbol, file, &srcfile)) != NULL)
|
while ((ptr = isdefined(symbol, file, &srcfile)) != NULL)
|
||||||
{
|
{
|
||||||
|
@ -549,8 +549,8 @@ find_includes(filep, file, file_red, recursion, failOK)
|
||||||
int recursion;
|
int recursion;
|
||||||
boolean failOK;
|
boolean failOK;
|
||||||
{
|
{
|
||||||
register char *line;
|
char *line;
|
||||||
register int type;
|
int type;
|
||||||
boolean recfailOK;
|
boolean recfailOK;
|
||||||
|
|
||||||
while ((line = our_getline(filep))) {
|
while ((line = our_getline(filep))) {
|
||||||
|
|
|
@ -62,8 +62,8 @@ add_include(filep, file, file_red, include, dot, failOK)
|
||||||
boolean dot;
|
boolean dot;
|
||||||
boolean failOK;
|
boolean failOK;
|
||||||
{
|
{
|
||||||
register struct inclist *newfile;
|
struct inclist *newfile;
|
||||||
register struct filepointer *content;
|
struct filepointer *content;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First decide what the pathname of this include file really is.
|
* 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
|
void
|
||||||
pr(ip, file, base)
|
pr(ip, file, base)
|
||||||
register struct inclist *ip;
|
struct inclist *ip;
|
||||||
char *file, *base;
|
char *file, *base;
|
||||||
{
|
{
|
||||||
static char *lastfile;
|
static char *lastfile;
|
||||||
static int current_len;
|
static int current_len;
|
||||||
register int len, i;
|
int len, i;
|
||||||
char buf[ BUFSIZ ];
|
char buf[ BUFSIZ ];
|
||||||
|
|
||||||
printed = TRUE;
|
printed = TRUE;
|
||||||
|
@ -133,10 +133,10 @@ pr(ip, file, base)
|
||||||
|
|
||||||
void
|
void
|
||||||
recursive_pr_include(head, file, base)
|
recursive_pr_include(head, file, base)
|
||||||
register struct inclist *head;
|
struct inclist *head;
|
||||||
register char *file, *base;
|
char *file, *base;
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
if (head->i_flags & MARKED)
|
if (head->i_flags & MARKED)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue