summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-04-13 10:05:30 +0000
committerobrien <obrien@FreeBSD.org>2002-04-13 10:05:30 +0000
commit64ca8195974724944e2d098ee0799ad511c8e949 (patch)
treedc49691f525cb13facff2b634c94329ec620d4ac /usr.bin/make
parentdfc0fa60ce59aa31e7d6748c59a5841db5f2ef52 (diff)
downloadFreeBSD-src-64ca8195974724944e2d098ee0799ad511c8e949.zip
FreeBSD-src-64ca8195974724944e2d098ee0799ad511c8e949.tar.gz
De'register.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/arch.c2
-rw-r--r--usr.bin/make/buf.c18
-rw-r--r--usr.bin/make/compat.c2
-rw-r--r--usr.bin/make/cond.c8
-rw-r--r--usr.bin/make/dir.c16
-rw-r--r--usr.bin/make/hash.c41
-rw-r--r--usr.bin/make/job.c36
-rw-r--r--usr.bin/make/make.c26
-rw-r--r--usr.bin/make/nonints.h2
-rw-r--r--usr.bin/make/parse.c22
-rw-r--r--usr.bin/make/str.c18
-rw-r--r--usr.bin/make/suff.c24
-rw-r--r--usr.bin/make/targ.c12
-rw-r--r--usr.bin/make/var.c30
14 files changed, 128 insertions, 129 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index 7aba6c9..0c2ff76 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -182,7 +182,7 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt)
Lst nodeLst; /* Lst on which to place the nodes */
GNode *ctxt; /* Context in which to expand variables */
{
- register char *cp; /* Pointer into line */
+ char *cp; /* Pointer into line */
GNode *gn; /* New node */
char *libName; /* Library-part of specification */
char *memName; /* Member-part of specification */
diff --git a/usr.bin/make/buf.c b/usr.bin/make/buf.c
index dfa6240..f70dbd6 100644
--- a/usr.bin/make/buf.c
+++ b/usr.bin/make/buf.c
@@ -94,7 +94,7 @@ __RCSID("$FreeBSD$");
*/
void
Buf_OvAddByte (bp, byte)
- register Buffer bp;
+ Buffer bp;
int byte;
{
int nbytes = 1;
@@ -125,8 +125,8 @@ Buf_OvAddByte (bp, byte)
*/
void
Buf_AddBytes (bp, numBytes, bytesPtr)
- register Buffer bp;
- int numBytes;
+ Buffer bp;
+ int numBytes;
const Byte *bytesPtr;
{
@@ -157,7 +157,7 @@ Buf_AddBytes (bp, numBytes, bytesPtr)
*/
void
Buf_UngetByte (bp, byte)
- register Buffer bp;
+ Buffer bp;
int byte;
{
@@ -207,7 +207,7 @@ Buf_UngetByte (bp, byte)
*/
void
Buf_UngetBytes (bp, numBytes, bytesPtr)
- register Buffer bp;
+ Buffer bp;
int numBytes;
Byte *bytesPtr;
{
@@ -252,7 +252,7 @@ Buf_UngetBytes (bp, numBytes, bytesPtr)
*/
int
Buf_GetByte (bp)
- register Buffer bp;
+ Buffer bp;
{
int res;
@@ -285,7 +285,7 @@ Buf_GetByte (bp)
*/
int
Buf_GetBytes (bp, numBytes, bytesPtr)
- register Buffer bp;
+ Buffer bp;
int numBytes;
Byte *bytesPtr;
{
@@ -319,7 +319,7 @@ Buf_GetBytes (bp, numBytes, bytesPtr)
*/
Byte *
Buf_GetAll (bp, numBytesPtr)
- register Buffer bp;
+ Buffer bp;
int *numBytesPtr;
{
@@ -345,7 +345,7 @@ Buf_GetAll (bp, numBytesPtr)
*/
void
Buf_Discard (bp, numBytes)
- register Buffer bp;
+ Buffer bp;
int numBytes;
{
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index 0a60bac..3cc4858 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -182,7 +182,7 @@ CompatRunCommand (cmdp, gnp)
void * gnp; /* Node from which the command came */
{
char *cmdStart; /* Start of expanded command */
- register char *cp;
+ char *cp;
Boolean silent, /* Don't print command */
errCheck; /* Check errors */
int reason; /* Reason for child's death */
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 2def8dc..cd264ff 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -181,9 +181,9 @@ CondGetArg (linePtr, argPtr, func, parens)
char *func;
Boolean parens; /* TRUE if arg should be bounded by parens */
{
- register char *cp;
+ char *cp;
int argLen;
- register Buffer buf;
+ Buffer buf;
cp = *linePtr;
if (parens) {
@@ -438,11 +438,11 @@ CondDoTarget (argLen, arg)
*/
static char *
CondCvtArg(str, value)
- register char *str;
+ char *str;
double *value;
{
if ((*str == '0') && (str[1] == 'x')) {
- register long i;
+ long i;
for (str += 2, i = 0; ; str++) {
int x;
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index f20df20..b68ce05 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -296,7 +296,7 @@ Boolean
Dir_HasWildcards (name)
char *name; /* name to check */
{
- register char *cp;
+ char *cp;
for (cp = name; *cp; cp++) {
switch(*cp) {
@@ -667,12 +667,12 @@ Dir_FindFile (name, path)
char *name; /* the file to find */
Lst path; /* the Lst of directories to search */
{
- register char *p1; /* pointer into p->name */
- register char *p2; /* pointer into name */
+ char *p1; /* pointer into p->name */
+ char *p2; /* pointer into name */
LstNode ln; /* a list element */
- register char *file; /* the current filename to check */
- register Path *p; /* current path member */
- register char *cp; /* index of first slash, if any */
+ char *file; /* the current filename to check */
+ Path *p; /* current path member */
+ char *cp; /* index of first slash, if any */
Boolean hasSlash; /* true if 'name' contains a / */
struct stat stb; /* Buffer for stat, if necessary */
Hash_Entry *entry; /* Entry for mtimes table */
@@ -1034,9 +1034,9 @@ Dir_AddDir (path, name)
char *name; /* the name of the directory to add */
{
LstNode ln; /* node in case Path structure is found */
- register Path *p; /* pointer to new Path structure */
+ Path *p; /* pointer to new Path structure */
DIR *d; /* for reading directory */
- register struct dirent *dp; /* entry in directory */
+ struct dirent *dp; /* entry in directory */
ln = Lst_Find (openDirectories, (void *)name, DirFindName);
if (ln != NULL) {
diff --git a/usr.bin/make/hash.c b/usr.bin/make/hash.c
index 1e03dd3..478d3c8 100644
--- a/usr.bin/make/hash.c
+++ b/usr.bin/make/hash.c
@@ -87,15 +87,15 @@ static void RebuildTable(Hash_Table *);
void
Hash_InitTable(t, numBuckets)
- register Hash_Table *t; /* Structure to use to hold table. */
+ Hash_Table *t; /* Structure to use to hold table. */
int numBuckets; /* How many buckets to create for starters.
* This number is rounded up to a power of
* two. If <= 0, a reasonable default is
* chosen. The table will grow in size later
* as needed. */
{
- register int i;
- register struct Hash_Entry **hp;
+ int i;
+ struct Hash_Entry **hp;
/*
* Round up the size to a power of two.
@@ -136,8 +136,8 @@ void
Hash_DeleteTable(t)
Hash_Table *t;
{
- register struct Hash_Entry **hp, *h, *nexth = NULL;
- register int i;
+ struct Hash_Entry **hp, *h, *nexth = NULL;
+ int i;
for (hp = t->bucketPtr, i = t->size; --i >= 0;) {
for (h = *hp++; h != NULL; h = nexth) {
@@ -177,9 +177,9 @@ Hash_FindEntry(t, key)
Hash_Table *t; /* Hash table to search. */
char *key; /* A hash key. */
{
- register Hash_Entry *e;
- register unsigned h;
- register char *p;
+ Hash_Entry *e;
+ unsigned h;
+ char *p;
for (h = 0, p = key; *p;)
h = (h << 5) - h + *p++;
@@ -211,14 +211,14 @@ Hash_FindEntry(t, key)
Hash_Entry *
Hash_CreateEntry(t, key, newPtr)
- register Hash_Table *t; /* Hash table to search. */
+ Hash_Table *t; /* Hash table to search. */
char *key; /* A hash key. */
Boolean *newPtr; /* Filled in with TRUE if new entry created,
* FALSE otherwise. */
{
- register Hash_Entry *e;
- register unsigned h;
- register char *p;
+ Hash_Entry *e;
+ unsigned h;
+ char *p;
int keylen;
struct Hash_Entry **hp;
@@ -281,7 +281,7 @@ Hash_DeleteEntry(t, e)
Hash_Table *t;
Hash_Entry *e;
{
- register Hash_Entry **hp, *p;
+ Hash_Entry **hp, *p;
if (e == NULL)
return;
@@ -320,7 +320,7 @@ Hash_DeleteEntry(t, e)
Hash_Entry *
Hash_EnumFirst(t, searchPtr)
Hash_Table *t; /* Table to be searched. */
- register Hash_Search *searchPtr;/* Area in which to keep state
+ Hash_Search *searchPtr; /* Area in which to keep state
* about search.*/
{
searchPtr->tablePtr = t;
@@ -349,10 +349,9 @@ Hash_EnumFirst(t, searchPtr)
Hash_Entry *
Hash_EnumNext(searchPtr)
- register Hash_Search *searchPtr; /* Area used to keep state about
- search. */
+ Hash_Search *searchPtr; /* Area used to keep state about search. */
{
- register Hash_Entry *e;
+ Hash_Entry *e;
Hash_Table *t = searchPtr->tablePtr;
/*
@@ -395,11 +394,11 @@ Hash_EnumNext(searchPtr)
static void
RebuildTable(t)
- register Hash_Table *t;
+ Hash_Table *t;
{
- register Hash_Entry *e, *next = NULL, **hp, **xp;
- register int i, mask;
- register Hash_Entry **oldhp;
+ Hash_Entry *e, *next = NULL, **hp, **xp;
+ int i, mask;
+ Hash_Entry **oldhp;
int oldsize;
oldhp = t->bucketPtr;
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index b3a5e82..02ddf34 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1672,7 +1672,7 @@ JobStart(gn, flags, previous)
Job *previous; /* The previous Job structure for this node,
* if any. */
{
- register Job *job; /* new job descriptor */
+ Job *job; /* new job descriptor */
char *argv[4]; /* Argument vector to shell */
Boolean cmdsOK; /* true if the nodes commands were all right */
Boolean local; /* Set true if the job was run locally */
@@ -1961,11 +1961,11 @@ JobStart(gn, flags, previous)
static char *
JobOutput(job, cp, endp, msg)
- register Job *job;
- register char *cp, *endp;
+ Job *job;
+ char *cp, *endp;
int msg;
{
- register char *ecp;
+ char *ecp;
if (commandShell->noPrint) {
ecp = Str_FindSubstring(cp, commandShell->noPrint);
@@ -2034,15 +2034,15 @@ JobOutput(job, cp, endp, msg)
*/
STATIC void
JobDoOutput(job, finish)
- register Job *job; /* the job whose output needs printing */
+ Job *job; /* the job whose output needs printing */
Boolean finish; /* TRUE if this is the last time we'll be
* called for this job */
{
Boolean gotNL = FALSE; /* true if got a newline */
Boolean fbuf; /* true if our buffer filled up */
- register int nr; /* number of bytes read */
- register int i; /* auxiliary index into outBuf */
- register int max; /* limit for i (end of current data) */
+ int nr; /* number of bytes read */
+ int i; /* auxiliary index into outBuf */
+ int max; /* limit for i (end of current data) */
int nRead; /* (Temporary) number of bytes read */
FILE *oFILE; /* Stream pointer to shell's output file */
@@ -2182,7 +2182,7 @@ end_loop:
(void) fprintf(stdout, "Results of making %s:\n", job->node->name);
(void) fflush(stdout);
while (fgets(inLine, sizeof(inLine), oFILE) != NULL) {
- register char *cp, *endp, *oendp;
+ char *cp, *endp, *oendp;
cp = inLine;
oendp = endp = inLine + strlen(inLine);
@@ -2233,7 +2233,7 @@ Job_CatchChildren(block)
Boolean block; /* TRUE if should block on the wait. */
{
int pid; /* pid of dead child */
- register Job *job; /* job descriptor for dead child */
+ Job *job; /* job descriptor for dead child */
LstNode jnode; /* list element for finding job */
int status; /* Exit/termination status */
@@ -2317,8 +2317,8 @@ Job_CatchOutput()
int nfds;
struct timeval timeout;
fd_set readfds;
- register LstNode ln;
- register Job *job;
+ LstNode ln;
+ Job *job;
#ifdef RMT_WILL_WATCH
int pnJobs; /* Previous nJobs */
#endif
@@ -2584,9 +2584,9 @@ static Shell *
JobMatchShell(name)
char *name; /* Final component of shell path */
{
- register Shell *sh; /* Pointer into shells table */
- Shell *match; /* Longest-matching shell */
- register char *cp1,
+ Shell *sh; /* Pointer into shells table */
+ Shell *match; /* Longest-matching shell */
+ char *cp1,
*cp2;
char *eoname;
@@ -2658,8 +2658,8 @@ Job_ParseShell(line)
{
char **words;
int wordCount;
- register char **argv;
- register int argc;
+ char **argv;
+ int argc;
char *path;
Shell newShell;
Boolean fullSpec = FALSE;
@@ -3045,7 +3045,7 @@ void
JobFlagForMigration(hostID)
int hostID; /* ID of host we used, for matching children. */
{
- register Job *job; /* job descriptor for dead child */
+ Job *job; /* job descriptor for dead child */
LstNode jnode; /* list element for finding job */
if (DEBUG(JOB)) {
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 99685b6..458a297 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -148,7 +148,7 @@ MakeTimeStamp (pgn, cgn)
*/
Boolean
Make_OODate (gn)
- register GNode *gn; /* the node to check */
+ GNode *gn; /* the node to check */
{
Boolean oodate;
@@ -324,11 +324,11 @@ MakeAddChild (gnp, lp)
*/
int
Make_HandleUse (cgn, pgn)
- register GNode *cgn; /* The .USE node */
- register GNode *pgn; /* The target of the .USE node */
+ GNode *cgn; /* The .USE node */
+ GNode *pgn; /* The target of the .USE node */
{
- register GNode *gn; /* A child of the .USE node */
- register LstNode ln; /* An element in the children list */
+ GNode *gn; /* A child of the .USE node */
+ LstNode ln; /* An element in the children list */
if (cgn->type & (OP_USE|OP_TRANSFORM)) {
if ((cgn->type & OP_USE) || Lst_IsEmpty(pgn->commands)) {
@@ -402,12 +402,12 @@ MakeHandleUse (pgn, cgn)
*/
void
Make_Update (cgn)
- register GNode *cgn; /* the child node */
+ GNode *cgn; /* the child node */
{
- register GNode *pgn; /* the parent node */
- register char *cname; /* the child's name */
- register LstNode ln; /* Element in parents and iParents lists */
- char *p1;
+ GNode *pgn; /* the parent node */
+ char *cname; /* the child's name */
+ LstNode ln; /* Element in parents and iParents lists */
+ char *p1;
cname = Var_Value (TARGET, cgn, &p1);
efree(p1);
@@ -676,7 +676,7 @@ Make_DoAllVar (gn)
static Boolean
MakeStartJobs ()
{
- register GNode *gn;
+ GNode *gn;
while (!Job_Full() && !Lst_IsEmpty (toBeMade)) {
gn = (GNode *) Lst_DeQueue (toBeMade);
@@ -822,8 +822,8 @@ Boolean
Make_Run (targs)
Lst targs; /* the initial list of targets */
{
- register GNode *gn; /* a temporary pointer */
- register Lst examine; /* List of targets to examine */
+ GNode *gn; /* a temporary pointer */
+ Lst examine; /* List of targets to examine */
int errors; /* Number of errors the Job module reports */
toBeMade = Lst_Init (FALSE);
diff --git a/usr.bin/make/nonints.h b/usr.bin/make/nonints.h
index 81c0f4b..9e50f4c 100644
--- a/usr.bin/make/nonints.h
+++ b/usr.bin/make/nonints.h
@@ -95,7 +95,7 @@ Lst Parse_MainName(void);
/* str.c */
void str_init(void);
void str_end(void);
-char *str_concat(char *, char *, int);
+char *str_concat(const char *, const char *, int);
char **brk_string(char *, int *, Boolean);
char *Str_FindSubstring(char *, char *);
int Str_Match(char *, char *);
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 8439f12..08196ec 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -271,10 +271,10 @@ static int
ParseFindKeyword (str)
char *str; /* String to find */
{
- register int start,
+ int start,
end,
cur;
- register int diff;
+ int diff;
start = 0;
end = (sizeof(parseKeywords)/sizeof(parseKeywords[0])) - 1;
@@ -402,7 +402,7 @@ ParseDoOp (gnp, opp)
* and the new instance is linked to all parents of the initial
* instance.
*/
- register GNode *cohort;
+ GNode *cohort;
LstNode ln;
cohort = Targ_NewGN(gn->name);
@@ -567,8 +567,8 @@ ParseDoSrc (tOp, src, allsrc)
Lst_ForEach (targets, ParseLinkSrc, (void *)gn);
}
if ((gn->type & OP_OPMASK) == OP_DOUBLEDEP) {
- register GNode *cohort;
- register LstNode ln;
+ GNode *cohort;
+ LstNode ln;
for (ln=Lst_First(gn->cohorts); ln != NULL; ln = Lst_Succ(ln)){
cohort = (GNode *)Lst_Datum(ln);
@@ -1220,10 +1220,10 @@ ParseDoDependency (line)
*/
Boolean
Parse_IsVar (line)
- register char *line; /* the line to check */
+ char *line; /* the line to check */
{
- register Boolean wasSpace = FALSE; /* set TRUE if found a space */
- register Boolean haveName = FALSE; /* Set TRUE if have a variable name */
+ Boolean wasSpace = FALSE; /* set TRUE if found a space */
+ Boolean haveName = FALSE; /* Set TRUE if have a variable name */
int level = 0;
#define ISEQOPERATOR(c) \
(((c) == '+') || ((c) == ':') || ((c) == '?') || ((c) == '!'))
@@ -2090,8 +2090,8 @@ static char *
ParseReadLine ()
{
Buffer buf; /* Buffer for current line */
- register int c; /* the current character */
- register int lastc; /* The most-recent character */
+ int c; /* the current character */
+ int lastc; /* The most-recent character */
Boolean semiNL; /* treat semi-colons as newlines */
Boolean ignDepOp; /* TRUE if should ignore dependency operators
* for the purposes of setting semiNL */
@@ -2377,7 +2377,7 @@ Parse_File(name, stream)
char *name; /* the name of the file being read */
FILE * stream; /* Stream open to makefile to parse */
{
- register char *cp, /* pointer into the line */
+ char *cp, /* pointer into the line */
*line; /* the line we're working on */
inLine = FALSE;
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 1c460f9..d4f84ea 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -92,8 +92,8 @@ str_concat(s1, s2, flags)
const char *s1, *s2;
int flags;
{
- register int len1, len2;
- register char *result;
+ int len1, len2;
+ char *result;
/* get the length of both strings */
len1 = strlen(s1);
@@ -137,12 +137,12 @@ str_concat(s1, s2, flags)
*/
char **
brk_string(str, store_argc, expand)
- register char *str;
+ char *str;
int *store_argc;
Boolean expand;
{
- register int argc, ch;
- register char inquote, *p, *start, *t;
+ int argc, ch;
+ char inquote, *p, *start, *t;
int len;
/* skip leading space chars. */
@@ -267,10 +267,10 @@ done: argv[argc] = (char *)NULL;
*/
char *
Str_FindSubstring(string, substring)
- register char *string; /* String to search. */
+ char *string; /* String to search. */
char *substring; /* Substring to find in string */
{
- register char *a, *b;
+ char *a, *b;
/*
* First scan quickly through the two strings looking for a single-
@@ -306,8 +306,8 @@ Str_FindSubstring(string, substring)
*/
int
Str_Match(string, pattern)
- register char *string; /* String */
- register char *pattern; /* Pattern */
+ char *string; /* String */
+ char *pattern; /* Pattern */
{
char c2;
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 01e42c3..5024014 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -195,8 +195,8 @@ static int SuffPrintTrans(void *, void *);
*/
static char *
SuffStrIsPrefix (pref, str)
- register char *pref; /* possible prefix */
- register char *str; /* string to check */
+ char *pref; /* possible prefix */
+ char *str; /* string to check */
{
while (*str && *pref == *str) {
pref++;
@@ -222,11 +222,11 @@ SuffStrIsPrefix (pref, str)
*/
static char *
SuffSuffIsSuffix (s, str)
- register Suff *s; /* possible suffix */
+ Suff *s; /* possible suffix */
char *str; /* string to examine */
{
- register char *p1; /* Pointer into suffix name */
- register char *p2; /* Pointer into string being examined */
+ char *p1; /* Pointer into suffix name */
+ char *p2; /* Pointer into string being examined */
p1 = s->name + s->nameLen;
p2 = str;
@@ -491,10 +491,10 @@ SuffParseTransform(str, srcPtr, targPtr)
Suff **srcPtr; /* Place to store source of trans. */
Suff **targPtr; /* Place to store target of trans. */
{
- register LstNode srcLn; /* element in suffix list of trans source*/
- register Suff *src; /* Source of transformation */
- register LstNode targLn; /* element in suffix list of trans target*/
- register char *str2; /* Extra pointer (maybe target suffix) */
+ LstNode srcLn; /* element in suffix list of trans source*/
+ Suff *src; /* Source of transformation */
+ LstNode targLn; /* element in suffix list of trans target*/
+ char *str2; /* Extra pointer (maybe target suffix) */
LstNode singleLn; /* element in suffix list of any suffix
* that exactly matches str */
Suff *single = NULL;/* Source of possible transformation to
@@ -867,8 +867,8 @@ Suff_GetPath (sname)
void
Suff_DoPaths()
{
- register Suff *s;
- register LstNode ln;
+ Suff *s;
+ LstNode ln;
char *ptr;
Lst inIncludes; /* Cumulative .INCLUDES path */
Lst inLibs; /* Cumulative .LIBS path */
@@ -1222,7 +1222,7 @@ SuffFindCmds (targ, slst)
Lst slst;
{
LstNode ln; /* General-purpose list node */
- register GNode *t, /* Target GNode */
+ GNode *t, /* Target GNode */
*s; /* Source GNode */
int prefLen;/* The length of the defined prefix */
Suff *suff; /* Suffix on matching beastie */
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index 89542a6..1a08595 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -158,7 +158,7 @@ GNode *
Targ_NewGN (name)
char *name; /* the name to stick in the new node */
{
- register GNode *gn;
+ GNode *gn;
gn = (GNode *) emalloc (sizeof (GNode));
gn->name = estrdup (name);
@@ -291,9 +291,9 @@ Targ_FindList (names, flags)
* name */
{
Lst nodes; /* result list */
- register LstNode ln; /* name list element */
- register GNode *gn; /* node in tLn */
- char *name;
+ LstNode ln; /* name list element */
+ GNode *gn; /* node in tLn */
+ char *name;
nodes = Lst_Init (FALSE);
@@ -485,9 +485,9 @@ Targ_FmtTime (time)
*/
void
Targ_PrintType (type)
- register int type;
+ int type;
{
- register int tbit;
+ int tbit;
#define PRINTBIT(attr) case CONCAT(OP_,attr): printf("." #attr " "); break
#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG)) printf("." #attr " "); break
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index fb7f901..8fbe265 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -359,7 +359,7 @@ VarAdd (name, val, ctxt)
char *val; /* value to set it to */
GNode *ctxt; /* context in which to set it */
{
- register Var *v;
+ Var *v;
int len;
v = (Var *) emalloc (sizeof (Var));
@@ -429,7 +429,7 @@ Var_Delete(name, ctxt)
}
ln = Lst_Find(ctxt->context, (void *)name, VarCmp);
if (ln != NULL) {
- register Var *v;
+ Var *v;
v = (Var *)Lst_Datum(ln);
Lst_Remove(ctxt->context, ln);
@@ -466,7 +466,7 @@ Var_Set (name, val, ctxt)
char *val; /* value to give to the variable */
GNode *ctxt; /* context in which to set it */
{
- register Var *v;
+ Var *v;
/*
* We only look for a variable in the given context since anything set
@@ -521,7 +521,7 @@ Var_Append (name, val, ctxt)
char *val; /* String to append to it */
GNode *ctxt; /* Context in which this should occur */
{
- register Var *v;
+ Var *v;
v = VarFind (name, ctxt, (ctxt == VAR_GLOBAL) ? FIND_ENV : 0);
@@ -639,7 +639,7 @@ VarHead (word, addSpace, buf, dummy)
Buffer buf; /* Buffer in which to store it */
void * dummy;
{
- register char *slash;
+ char *slash;
slash = strrchr (word, '/');
if (slash != (char *)NULL) {
@@ -686,7 +686,7 @@ VarTail (word, addSpace, buf, dummy)
Buffer buf; /* Buffer in which to store it */
void * dummy;
{
- register char *slash;
+ char *slash;
if (addSpace) {
Buf_AddByte (buf, (Byte)' ');
@@ -725,7 +725,7 @@ VarSuffix (word, addSpace, buf, dummy)
Buffer buf; /* Buffer in which to store it */
void * dummy;
{
- register char *dot;
+ char *dot;
dot = strrchr (word, '.');
if (dot != (char *)NULL) {
@@ -763,7 +763,7 @@ VarRoot (word, addSpace, buf, dummy)
Buffer buf; /* Buffer in which to store it */
void * dummy;
{
- register char *dot;
+ char *dot;
if (addSpace) {
Buf_AddByte (buf, (Byte)' ');
@@ -916,8 +916,8 @@ VarSubstitute (word, addSpace, buf, patternp)
Buffer buf; /* Buffer for result */
void * patternp; /* Pattern for substitution */
{
- register int wordLen; /* Length of word */
- register char *cp; /* General pointer */
+ int wordLen; /* Length of word */
+ char *cp; /* General pointer */
VarPattern *pattern = (VarPattern *) patternp;
wordLen = strlen(word);
@@ -1012,7 +1012,7 @@ VarSubstitute (word, addSpace, buf, patternp)
* addSpace is set FALSE as soon as a space is added to the
* buffer.
*/
- register Boolean done;
+ Boolean done;
int origSize;
done = FALSE;
@@ -1457,14 +1457,14 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr)
int *lengthPtr; /* OUT: The length of the specification */
Boolean *freePtr; /* OUT: TRUE if caller should free result */
{
- register char *tstr; /* Pointer into str */
+ char *tstr; /* Pointer into str */
Var *v; /* Variable in invocation */
char *cp; /* Secondary pointer into str (place marker
* for tstr) */
Boolean haveModifier;/* TRUE if have modifiers for the variable */
- register char endc; /* Ending character when variable in parens
+ char endc; /* Ending character when variable in parens
* or braces */
- register char startc=0; /* Starting character when variable in parens
+ char startc=0; /* Starting character when variable in parens
* or braces */
int cnt; /* Used to count brace pairs when variable in
* in parens or braces */
@@ -1842,7 +1842,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr)
case 'S':
{
VarPattern pattern;
- register char delim;
+ char delim;
Buffer buf; /* Buffer for patterns */
pattern.flags = 0;
OpenPOWER on IntegriCloud