Move PrintAddr() from util.c into suff.c - the only file where it is

actuall used, and make it static.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
This commit is contained in:
Hartmut Brandt 2005-02-04 13:23:39 +00:00
parent ce8c7083f4
commit 8ffb687e64
3 changed files with 17 additions and 12 deletions

View File

@ -187,6 +187,10 @@ static void SuffFindNormalDeps(GNode *, Lst *);
static int SuffPrintName(void *, void *);
static int SuffPrintSuff(void *, void *);
static int SuffPrintTrans(void *, void *);
#ifdef DEBUG_SRC
static int PrintAddr(void *, void *);
#endif /* DEBUG_SRC */
/*************** Lst Predicates ****************/
/*-
@ -2337,3 +2341,16 @@ Suff_PrintAll(void)
printf("#*** Transformations:\n");
Lst_ForEach(&transforms, SuffPrintTrans, (void *)NULL);
}
#ifdef DEBUG_SRC
/*
* Printaddr --
* Print the address of a node.
*/
static int
PrintAddr(void *a, void *b __unused)
{
printf("%p ", a);
return (0);
}
#endif /* DEBUG_SRC */

View File

@ -274,14 +274,3 @@ eunlink(const char *file)
return (unlink(file));
}
/*
* Printaddr --
* Print the address of a node, used as an interative function.
*/
int
PrintAddr(void *a, void *b __unused)
{
printf("%p ", a);
return (0);
}

View File

@ -79,7 +79,6 @@ void Error(const char *, ...);
void Fatal(const char *, ...);
void Punt(const char *, ...);
void DieHorribly(void);
int PrintAddr(void *, void *);
void Finish(int);
char *estrdup(const char *);
void *emalloc(size_t);