diff options
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r-- | usr.bin/make/dir.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index fdfe772..0c4bac7 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -189,12 +189,12 @@ static Hash_Table mtimes; /* Results of doing a last-resort stat in * should be ok, but... */ -static int DirFindName __P((ClientData, ClientData)); +static int DirFindName __P((void *, void *)); static int DirMatchFiles __P((char *, Path *, Lst)); static void DirExpandCurly __P((char *, char *, Lst, Lst)); static void DirExpandInt __P((char *, Lst, Lst)); -static int DirPrintWord __P((ClientData, ClientData)); -static int DirPrintDir __P((ClientData, ClientData)); +static int DirPrintWord __P((void *, void *)); +static int DirPrintDir __P((void *, void *)); /*- *----------------------------------------------------------------------- @@ -247,7 +247,7 @@ void Dir_End() { dot->refCount -= 1; - Dir_Destroy((ClientData) dot); + Dir_Destroy((void *) dot); Dir_ClearPath(dirSearchPath); Lst_Destroy(dirSearchPath, NOFREE); Dir_ClearPath(openDirectories); @@ -271,8 +271,8 @@ Dir_End() */ static int DirFindName (p, dname) - ClientData p; /* Current name */ - ClientData dname; /* Desired name */ + void * p; /* Current name */ + void * dname; /* Desired name */ { return (strcmp (((Path *)p)->name, (char *) dname)); } @@ -520,8 +520,8 @@ DirExpandInt(word, path, expansions) */ static int DirPrintWord(word, dummy) - ClientData word; - ClientData dummy; + void * word; + void * dummy; { printf("%s ", (char *) word); @@ -636,7 +636,7 @@ Dir_Expand (word, path, expansions) } } if (DEBUG(DIR)) { - Lst_ForEach(expansions, DirPrintWord, (ClientData) 0); + Lst_ForEach(expansions, DirPrintWord, (void *) 0); fputc('\n', stdout); } } @@ -1035,12 +1035,12 @@ Dir_AddDir (path, name) DIR *d; /* for reading directory */ register struct dirent *dp; /* entry in directory */ - ln = Lst_Find (openDirectories, (ClientData)name, DirFindName); + ln = Lst_Find (openDirectories, (void *)name, DirFindName); if (ln != NULL) { p = (Path *)Lst_Datum (ln); - if (Lst_Member(path, (ClientData)p) == NULL) { + if (Lst_Member(path, (void *)p) == NULL) { p->refCount += 1; - (void)Lst_AtEnd (path, (ClientData)p); + (void)Lst_AtEnd (path, (void *)p); } } else { if (DEBUG(DIR)) { @@ -1075,8 +1075,8 @@ Dir_AddDir (path, name) (void)Hash_CreateEntry(&p->files, dp->d_name, (Boolean *)NULL); } (void) closedir (d); - (void)Lst_AtEnd (openDirectories, (ClientData)p); - (void)Lst_AtEnd (path, (ClientData)p); + (void)Lst_AtEnd (openDirectories, (void *)p); + (void)Lst_AtEnd (path, (void *)p); } if (DEBUG(DIR)) { printf("done\n"); @@ -1098,13 +1098,13 @@ Dir_AddDir (path, name) * *----------------------------------------------------------------------- */ -ClientData +void * Dir_CopyDir(p) - ClientData p; + void * p; { ((Path *) p)->refCount += 1; - return ((ClientData)p); + return ((void *)p); } /*- @@ -1165,7 +1165,7 @@ Dir_MakeFlags (flag, path) */ void Dir_Destroy (pp) - ClientData pp; /* The directory descriptor to nuke */ + void * pp; /* The directory descriptor to nuke */ { Path *p = (Path *) pp; p->refCount -= 1; @@ -1173,12 +1173,12 @@ Dir_Destroy (pp) if (p->refCount == 0) { LstNode ln; - ln = Lst_Member (openDirectories, (ClientData)p); + ln = Lst_Member (openDirectories, (void *)p); (void) Lst_Remove (openDirectories, ln); Hash_DeleteTable (&p->files); - free((Address)p->name); - free((Address)p); + free(p->name); + free(p); } } @@ -1203,7 +1203,7 @@ Dir_ClearPath(path) Path *p; while (!Lst_IsEmpty(path)) { p = (Path *)Lst_DeQueue(path); - Dir_Destroy((ClientData) p); + Dir_Destroy((void *) p); } } @@ -1232,9 +1232,9 @@ Dir_Concat(path1, path2) for (ln = Lst_First(path2); ln != NULL; ln = Lst_Succ(ln)) { p = (Path *)Lst_Datum(ln); - if (Lst_Member(path1, (ClientData)p) == NULL) { + if (Lst_Member(path1, (void *)p) == NULL) { p->refCount += 1; - (void)Lst_AtEnd(path1, (ClientData)p); + (void)Lst_AtEnd(path1, (void *)p); } } } @@ -1262,8 +1262,8 @@ Dir_PrintDirectories() } static int DirPrintDir (p, dummy) - ClientData p; - ClientData dummy; + void * p; + void * dummy; { printf ("%s ", ((Path *) p)->name); return (dummy ? 0 : 0); @@ -1273,5 +1273,5 @@ void Dir_PrintPath (path) Lst path; { - Lst_ForEach (path, DirPrintDir, (ClientData)0); + Lst_ForEach (path, DirPrintDir, (void *)0); } |