From 1a1a8c93241a8c083decbcf08e779c6900e44016 Mon Sep 17 00:00:00 2001 From: Will Andrews Date: Sat, 2 Dec 2000 20:24:42 +0000 Subject: [PATCH] There's also no point in #typedef'ing void/char pointers. Accordingly, rip out ClientData/Address pointers and use standard types. Obtained from: OpenBSD --- usr.bin/make/arch.c | 30 ++-- usr.bin/make/compat.c | 28 ++-- usr.bin/make/cond.c | 8 +- usr.bin/make/dir.c | 54 +++---- usr.bin/make/dir.h | 4 +- usr.bin/make/for.c | 16 +- usr.bin/make/hash.h | 6 +- usr.bin/make/job.c | 86 +++++----- usr.bin/make/lst.h | 42 ++--- usr.bin/make/lst.lib/lstAppend.c | 2 +- usr.bin/make/lst.lib/lstAtEnd.c | 2 +- usr.bin/make/lst.lib/lstAtFront.c | 2 +- usr.bin/make/lst.lib/lstConcat.c | 2 +- usr.bin/make/lst.lib/lstDatum.c | 4 +- usr.bin/make/lst.lib/lstDeQueue.c | 8 +- usr.bin/make/lst.lib/lstDestroy.c | 10 +- usr.bin/make/lst.lib/lstDupl.c | 6 +- usr.bin/make/lst.lib/lstEnQueue.c | 2 +- usr.bin/make/lst.lib/lstFind.c | 4 +- usr.bin/make/lst.lib/lstFindFrom.c | 4 +- usr.bin/make/lst.lib/lstForEach.c | 4 +- usr.bin/make/lst.lib/lstForEachFrom.c | 4 +- usr.bin/make/lst.lib/lstInsert.c | 2 +- usr.bin/make/lst.lib/lstInt.h | 2 +- usr.bin/make/lst.lib/lstMember.c | 2 +- usr.bin/make/lst.lib/lstRemove.c | 2 +- usr.bin/make/lst.lib/lstReplace.c | 2 +- usr.bin/make/main.c | 25 +-- usr.bin/make/make.c | 54 +++---- usr.bin/make/nonints.h | 6 +- usr.bin/make/parse.c | 126 +++++++-------- usr.bin/make/sprite.h | 45 +----- usr.bin/make/str.c | 2 +- usr.bin/make/suff.c | 220 +++++++++++++------------- usr.bin/make/targ.c | 48 +++--- usr.bin/make/var.c | 120 +++++++------- 36 files changed, 472 insertions(+), 512 deletions(-) diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c index 535aae67de99..b07a92e9997d 100644 --- a/usr.bin/make/arch.c +++ b/usr.bin/make/arch.c @@ -115,8 +115,8 @@ typedef struct Arch { size_t fnamesize; /* Size of the string table */ } Arch; -static int ArchFindArchive __P((ClientData, ClientData)); -static void ArchFree __P((ClientData)); +static int ArchFindArchive __P((void *, void *)); +static void ArchFree __P((void *)); static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean)); static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *)); #if defined(__svr4__) || defined(__SVR4) || defined(__ELF__) @@ -139,7 +139,7 @@ static int ArchSVR4Entry __P((Arch *, char *, size_t, FILE *)); */ static void ArchFree(ap) - ClientData ap; + void * ap; { Arch *a = (Arch *) ap; Hash_Search search; @@ -149,12 +149,12 @@ ArchFree(ap) for (entry = Hash_EnumFirst(&a->members, &search); entry != NULL; entry = Hash_EnumNext(&search)) - free((Address) Hash_GetValue (entry)); + free(Hash_GetValue(entry)); free(a->name); efree(a->fnametab); Hash_DeleteTable(&a->members); - free((Address) a); + free(a); } @@ -327,7 +327,7 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt) return(FAILURE); } else { gn->type |= OP_ARCHV; - (void)Lst_AtEnd(nodeLst, (ClientData)gn); + (void)Lst_AtEnd(nodeLst, (void *)gn); } } else if (Arch_ParseArchive(&sacrifice, nodeLst, ctxt)!=SUCCESS) { /* @@ -370,7 +370,7 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt) * end of the provided list. */ gn->type |= OP_ARCHV; - (void) Lst_AtEnd (nodeLst, (ClientData)gn); + (void) Lst_AtEnd (nodeLst, (void *)gn); } } Lst_Destroy(members, NOFREE); @@ -392,7 +392,7 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt) * provided list. */ gn->type |= OP_ARCHV; - (void) Lst_AtEnd (nodeLst, (ClientData)gn); + (void) Lst_AtEnd (nodeLst, (void *)gn); } } if (doSubst) { @@ -438,8 +438,8 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt) */ static int ArchFindArchive (ar, archName) - ClientData ar; /* Current list element */ - ClientData archName; /* Name we want */ + void * ar; /* Current list element */ + void * archName; /* Name we want */ { return (strcmp ((char *) archName, ((Arch *) ar)->name)); } @@ -491,7 +491,7 @@ ArchStatMember (archive, member, hash) if ((cp != NULL) && (strcmp(member, RANLIBMAG) != 0)) member = cp + 1; - ln = Lst_Find (archives, (ClientData) archive, ArchFindArchive); + ln = Lst_Find (archives, (void *) archive, ArchFindArchive); if (ln != NULL) { ar = (Arch *) Lst_Datum (ln); @@ -630,8 +630,8 @@ ArchStatMember (archive, member, hash) #endif he = Hash_CreateEntry (&ar->members, memName, NULL); - Hash_SetValue (he, (ClientData)emalloc (sizeof (struct ar_hdr))); - memcpy ((Address)Hash_GetValue (he), (Address)&arh, + Hash_SetValue (he, (void *)emalloc (sizeof (struct ar_hdr))); + memcpy (Hash_GetValue (he), &arh, sizeof (struct ar_hdr)); } fseek (arch, (size + 1) & ~1, SEEK_CUR); @@ -639,7 +639,7 @@ ArchStatMember (archive, member, hash) fclose (arch); - (void) Lst_AtEnd (archives, (ClientData) ar); + (void) Lst_AtEnd (archives, (void *) ar); /* * Now that the archive has been read and cached, we can look into @@ -657,7 +657,7 @@ badarch: fclose (arch); Hash_DeleteTable (&ar->members); efree(ar->fnametab); - free ((Address)ar); + free (ar); return (NULL); } diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 23d48db27063..e68dd08c5540 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -80,8 +80,8 @@ static char meta[256]; static GNode *curTarg = NULL; static GNode *ENDNode; static void CompatInterrupt __P((int)); -static int CompatRunCommand __P((ClientData, ClientData)); -static int CompatMake __P((ClientData, ClientData)); +static int CompatRunCommand __P((void *, void *)); +static int CompatMake __P((void *, void *)); static char *sh_builtin[] = { "alias", "cd", "eval", "exec", "exit", "read", "set", "ulimit", @@ -123,7 +123,7 @@ CompatInterrupt (signo) if (signo == SIGINT) { gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); if (gn != NULL) { - Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn); + Lst_ForEach(gn->commands, CompatRunCommand, (void *)gn); } } @@ -177,8 +177,8 @@ shellneed (cmd) */ static int CompatRunCommand (cmdp, gnp) - ClientData cmdp; /* Command to execute */ - ClientData gnp; /* Node from which the command came */ + void * cmdp; /* Command to execute */ + void * gnp; /* Node from which the command came */ { char *cmdStart; /* Start of expanded command */ register char *cp; @@ -209,7 +209,7 @@ CompatRunCommand (cmdp, gnp) silent = gn->type & OP_SILENT; errCheck = !(gn->type & OP_IGNORE); - cmdNode = Lst_Member (gn->commands, (ClientData)cmd); + cmdNode = Lst_Member (gn->commands, (void *)cmd); cmdStart = Var_Subst (NULL, cmd, gn, FALSE); /* @@ -226,10 +226,10 @@ CompatRunCommand (cmdp, gnp) } else { cmd = cmdStart; } - Lst_Replace (cmdNode, (ClientData)cmdStart); + Lst_Replace (cmdNode, (void *)cmdStart); if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { - (void)Lst_AtEnd(ENDNode->commands, (ClientData)cmdStart); + (void)Lst_AtEnd(ENDNode->commands, (void *)cmdStart); return(0); } else if (strcmp(cmdStart, "...") == 0) { gn->type |= OP_SAVE_CMDS; @@ -418,8 +418,8 @@ CompatRunCommand (cmdp, gnp) */ static int CompatMake (gnp, pgnp) - ClientData gnp; /* The node to make */ - ClientData pgnp; /* Parent to abort if necessary */ + void * gnp; /* The node to make */ + void * pgnp; /* Parent to abort if necessary */ { GNode *gn = (GNode *) gnp; GNode *pgn = (GNode *) pgnp; @@ -437,7 +437,7 @@ CompatMake (gnp, pgnp) gn->make = TRUE; gn->made = BEINGMADE; Suff_FindDeps (gn); - Lst_ForEach (gn->children, CompatMake, (ClientData)gn); + Lst_ForEach (gn->children, CompatMake, (void *)gn); if (!gn->make) { gn->made = ABORTED; pgn->make = FALSE; @@ -502,7 +502,7 @@ CompatMake (gnp, pgnp) */ if (!touchFlag) { curTarg = gn; - Lst_ForEach (gn->commands, CompatRunCommand, (ClientData)gn); + Lst_ForEach (gn->commands, CompatRunCommand, (void *)gn); curTarg = NULL; } else { Job_Touch (gn, gn->type & OP_SILENT); @@ -677,7 +677,7 @@ Compat_Run(targs) if (!queryFlag) { gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); if (gn != NULL) { - Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn); + Lst_ForEach(gn->commands, CompatRunCommand, (void *)gn); if (gn->made == ERROR) { printf("\n\nStop.\n"); exit(1); @@ -712,6 +712,6 @@ Compat_Run(targs) * If the user has defined a .END target, run its commands. */ if (errors == 0) { - Lst_ForEach(ENDNode->commands, CompatRunCommand, (ClientData)gn); + Lst_ForEach(ENDNode->commands, CompatRunCommand, (void *)gn); } } diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c index 065226ee3db7..8e947002b46e 100644 --- a/usr.bin/make/cond.c +++ b/usr.bin/make/cond.c @@ -100,7 +100,7 @@ typedef enum { static void CondPushBack __P((Token)); static int CondGetArg __P((char **, char **, char *, Boolean)); static Boolean CondDoDefined __P((int, char *)); -static int CondStrMatch __P((ClientData, ClientData)); +static int CondStrMatch __P((void *, void *)); static Boolean CondDoMake __P((int, char *)); static Boolean CondDoExists __P((int, char *)); static Boolean CondDoTarget __P((int, char *)); @@ -312,8 +312,8 @@ CondDoDefined (argLen, arg) */ static int CondStrMatch(string, pattern) - ClientData string; - ClientData pattern; + void * string; + void * pattern; { return(!Str_Match((char *) string,(char *) pattern)); } @@ -340,7 +340,7 @@ CondDoMake (argLen, arg) Boolean result; arg[argLen] = '\0'; - if (Lst_Find (create, (ClientData)arg, CondStrMatch) == NULL) { + if (Lst_Find (create, (void *)arg, CondStrMatch) == NULL) { result = FALSE; } else { result = TRUE; diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index fdfe7729d273..0c4bac7e00af 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); } diff --git a/usr.bin/make/dir.h b/usr.bin/make/dir.h index 487957222eee..c1f8d932cded 100644 --- a/usr.bin/make/dir.h +++ b/usr.bin/make/dir.h @@ -65,7 +65,7 @@ void Dir_ClearPath __P((Lst)); void Dir_Concat __P((Lst, Lst)); void Dir_PrintDirectories __P((void)); void Dir_PrintPath __P((Lst)); -void Dir_Destroy __P((ClientData)); -ClientData Dir_CopyDir __P((ClientData)); +void Dir_Destroy __P((void *)); +void * Dir_CopyDir __P((void *)); #endif /* _DIR */ diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c index 882de11422e8..714ccfb19fb7 100644 --- a/usr.bin/make/for.c +++ b/usr.bin/make/for.c @@ -82,7 +82,7 @@ typedef struct _For { Lst lst; /* List of variables */ } For; -static int ForExec __P((ClientData, ClientData)); +static int ForExec __P((void *, void *)); @@ -177,7 +177,7 @@ For_Eval (line) #define ADDWORD() \ Buf_AddBytes(buf, ptr - wrd, (Byte *) wrd), \ Buf_AddByte(buf, (Byte) '\0'), \ - Lst_AtFront(forLst, (ClientData) Buf_GetAll(buf, &varlen)), \ + Lst_AtFront(forLst, (void *) Buf_GetAll(buf, &varlen)), \ Buf_Destroy(buf, FALSE) for (ptr = sub; *ptr && isspace((unsigned char) *ptr); ptr++) @@ -197,7 +197,7 @@ For_Eval (line) ADDWORD(); else Buf_Destroy(buf, TRUE); - free((Address) sub); + free(sub); forBuf = Buf_Init(0); forLevel++; @@ -250,8 +250,8 @@ For_Eval (line) */ static int ForExec(namep, argp) - ClientData namep; - ClientData argp; + void * namep; + void * argp; { char *name = (char *) namep; For *arg = (For *) argp; @@ -294,9 +294,9 @@ For_Run() forBuf = NULL; forLst = NULL; - Lst_ForEach(arg.lst, ForExec, (ClientData) &arg); + Lst_ForEach(arg.lst, ForExec, (void *) &arg); - free((Address)arg.var); - Lst_Destroy(arg.lst, (void (*) __P((ClientData))) free); + free(arg.var); + Lst_Destroy(arg.lst, (void (*) __P((void *))) free); Buf_Destroy(arg.buf, TRUE); } diff --git a/usr.bin/make/hash.h b/usr.bin/make/hash.h index 6a1dcbd12f44..19012fa937af 100644 --- a/usr.bin/make/hash.h +++ b/usr.bin/make/hash.h @@ -56,7 +56,7 @@ typedef struct Hash_Entry { struct Hash_Entry *next; /* Used to link together all the * entries associated with the same * bucket. */ - ClientData clientData; /* Arbitrary piece of data associated + void * clientData; /* Arbitrary piece of data associated * with key. */ unsigned namehash; /* hash value of key */ char name[1]; /* key string */ @@ -86,7 +86,7 @@ typedef struct Hash_Search { */ /* - * ClientData Hash_GetValue(h) + * void * Hash_GetValue(h) * Hash_Entry *h; */ @@ -98,7 +98,7 @@ typedef struct Hash_Search { * char *val; */ -#define Hash_SetValue(h, val) ((h)->clientData = (ClientData) (val)) +#define Hash_SetValue(h, val) ((h)->clientData = (void *) (val)) /* * Hash_Size(n) returns the number of words in an object of n bytes diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index f197610cc41b..916ee3f1f620 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -297,11 +297,11 @@ STATIC Lst stoppedJobs; /* Lst of Job structures describing #define W_SETEXITSTATUS(st, val) W_SETMASKED(st, val, WEXITSTATUS) -static int JobCondPassSig __P((ClientData, ClientData)); +static int JobCondPassSig __P((void *, void *)); static void JobPassSig __P((int)); -static int JobCmpPid __P((ClientData, ClientData)); -static int JobPrintCommand __P((ClientData, ClientData)); -static int JobSaveCommand __P((ClientData, ClientData)); +static int JobCmpPid __P((void *, void *)); +static int JobPrintCommand __P((void *, void *)); +static int JobSaveCommand __P((void *, void *)); static void JobClose __P((Job *)); #ifdef REMOTE static int JobCmpRmtID __P((Job *, int)); @@ -337,8 +337,8 @@ static void JobRestartJobs __P((void)); */ static int JobCondPassSig(jobp, signop) - ClientData jobp; /* Job to biff */ - ClientData signop; /* Signal to send it */ + void * jobp; /* Job to biff */ + void * signop; /* Signal to send it */ { Job *job = (Job *) jobp; int signo = *(int *) signop; @@ -389,7 +389,7 @@ JobPassSig(signo) (void) fprintf(stdout, "JobPassSig(%d) called.\n", signo); (void) fflush(stdout); } - Lst_ForEach(jobs, JobCondPassSig, (ClientData) &signo); + Lst_ForEach(jobs, JobCondPassSig, (void *) &signo); /* * Deal with proper cleanup based on the signal received. We only run @@ -434,7 +434,7 @@ JobPassSig(signo) (void) KILL(getpid(), signo); signo = SIGCONT; - Lst_ForEach(jobs, JobCondPassSig, (ClientData) &signo); + Lst_ForEach(jobs, JobCondPassSig, (void *) &signo); (void) sigprocmask(SIG_SETMASK, &omask, NULL); sigprocmask(SIG_SETMASK, &omask, NULL); @@ -458,8 +458,8 @@ JobPassSig(signo) */ static int JobCmpPid(job, pid) - ClientData job; /* job to examine */ - ClientData pid; /* process id desired */ + void * job; /* job to examine */ + void * pid; /* process id desired */ { return *(int *) pid - ((Job *) job)->pid; } @@ -480,8 +480,8 @@ JobCmpPid(job, pid) */ static int JobCmpRmtID(job, rmtID) - ClientData job; /* job to examine */ - ClientData rmtID; /* remote id desired */ + void * job; /* job to examine */ + void * rmtID; /* remote id desired */ { return(*(int *) rmtID - *(int *) job->rmtID); } @@ -516,8 +516,8 @@ JobCmpRmtID(job, rmtID) */ static int JobPrintCommand(cmdp, jobp) - ClientData cmdp; /* command string to print */ - ClientData jobp; /* job for which to print it */ + void * cmdp; /* command string to print */ + void * jobp; /* job for which to print it */ { Boolean noSpecials; /* true if we shouldn't worry about * inserting special commands into @@ -540,7 +540,7 @@ JobPrintCommand(cmdp, jobp) job->node->type |= OP_SAVE_CMDS; if ((job->flags & JOB_IGNDOTS) == 0) { job->tailCmds = Lst_Succ(Lst_Member(job->node->commands, - (ClientData)cmd)); + (void *)cmd)); return 1; } return 0; @@ -559,9 +559,9 @@ JobPrintCommand(cmdp, jobp) * For debugging, we replace each command with the result of expanding * the variables in the command. */ - cmdNode = Lst_Member(job->node->commands, (ClientData)cmd); + cmdNode = Lst_Member(job->node->commands, (void *)cmd); cmdStart = cmd = Var_Subst(NULL, cmd, job->node, FALSE); - Lst_Replace(cmdNode, (ClientData)cmdStart); + Lst_Replace(cmdNode, (void *)cmdStart); cmdTemplate = "%s\n"; @@ -677,10 +677,10 @@ JobPrintCommand(cmdp, jobp) */ static int JobSaveCommand(cmd, gn) - ClientData cmd; - ClientData gn; + void * cmd; + void * gn; { - cmd = (ClientData) Var_Subst(NULL, (char *) cmd, (GNode *) gn, FALSE); + cmd = (void *) Var_Subst(NULL, (char *) cmd, (GNode *) gn, FALSE); (void) Lst_AtEnd(postCommands->commands, cmd); return(0); } @@ -858,7 +858,7 @@ JobFinish(job, status) WSTOPSIG(*status)); } job->flags |= JOB_RESUME; - (void)Lst_AtEnd(stoppedJobs, (ClientData)job); + (void)Lst_AtEnd(stoppedJobs, (void *)job); #ifdef REMOTE if (job->flags & JOB_REMIGRATE) JobRestart(job); @@ -896,7 +896,7 @@ JobFinish(job, status) #endif } job->flags &= ~JOB_CONTINUING; - Lst_AtEnd(jobs, (ClientData)job); + Lst_AtEnd(jobs, (void *)job); nJobs += 1; if (!(job->flags & JOB_REMOTE)) { if (DEBUG(JOB)) { @@ -972,14 +972,14 @@ JobFinish(job, status) if (job->tailCmds != NULL) { Lst_ForEachFrom(job->node->commands, job->tailCmds, JobSaveCommand, - (ClientData)job->node); + (void *)job->node); } job->node->made = MADE; Make_Update(job->node); - free((Address)job); + free(job); } else if (*status != 0) { errors += 1; - free((Address)job); + free(job); } JobRestartJobs(); @@ -1334,7 +1334,7 @@ jobExecFinish: * Now the job is actually running, add it to the table. */ nJobs += 1; - (void) Lst_AtEnd(jobs, (ClientData)job); + (void) Lst_AtEnd(jobs, (void *)job); if (nJobs == maxJobs) { jobFull = TRUE; } @@ -1469,7 +1469,7 @@ JobRestart(job) (void) fprintf(stdout, "*** holding\n"); (void) fflush(stdout); } - (void)Lst_AtFront(stoppedJobs, (ClientData)job); + (void)Lst_AtFront(stoppedJobs, (void *)job); jobFull = TRUE; if (DEBUG(JOB)) { (void) fprintf(stdout, "Job queue is full.\n"); @@ -1490,7 +1490,7 @@ JobRestart(job) } #endif - (void)Lst_AtEnd(jobs, (ClientData)job); + (void)Lst_AtEnd(jobs, (void *)job); nJobs += 1; if (nJobs == maxJobs) { jobFull = TRUE; @@ -1535,7 +1535,7 @@ JobRestart(job) (void) fprintf(stdout, "holding\n"); (void) fflush(stdout); } - (void)Lst_AtFront(stoppedJobs, (ClientData)job); + (void)Lst_AtFront(stoppedJobs, (void *)job); jobFull = TRUE; if (DEBUG(JOB)) { (void) fprintf(stdout, "Job queue is full.\n"); @@ -1634,7 +1634,7 @@ JobRestart(job) (void) fprintf(stdout, "table full\n"); (void) fflush(stdout); } - (void) Lst_AtFront(stoppedJobs, (ClientData)job); + (void) Lst_AtFront(stoppedJobs, (void *)job); jobFull = TRUE; if (DEBUG(JOB)) { (void) fprintf(stdout, "Job queue is full.\n"); @@ -1763,8 +1763,8 @@ JobStart(gn, flags, previous) LstNode ln = Lst_Next(gn->commands); if ((ln == NULL) || - JobPrintCommand((ClientData) Lst_Datum(ln), - (ClientData) job)) + JobPrintCommand((void *) Lst_Datum(ln), + (void *) job)) { noExec = TRUE; Lst_Close(gn->commands); @@ -1789,7 +1789,7 @@ JobStart(gn, flags, previous) * We can do all the commands at once. hooray for sanity */ numCommands = 0; - Lst_ForEach(gn->commands, JobPrintCommand, (ClientData)job); + Lst_ForEach(gn->commands, JobPrintCommand, (void *)job); /* * If we didn't print out any commands to the shell script, @@ -1815,7 +1815,7 @@ JobStart(gn, flags, previous) * doesn't do any harm in this case and may do some good. */ if (cmdsOK) { - Lst_ForEach(gn->commands, JobPrintCommand, (ClientData)job); + Lst_ForEach(gn->commands, JobPrintCommand, (void *)job); } /* * Don't execute the shell, thank you. @@ -1856,15 +1856,15 @@ JobStart(gn, flags, previous) if (job->tailCmds != NULL) { Lst_ForEachFrom(job->node->commands, job->tailCmds, JobSaveCommand, - (ClientData)job->node); + (void *)job->node); } job->node->made = MADE; Make_Update(job->node); } - free((Address)job); + free(job); return(JOB_FINISHED); } else { - free((Address)job); + free(job); return(JOB_ERROR); } } else { @@ -1940,7 +1940,7 @@ JobStart(gn, flags, previous) (void) fflush(stdout); } job->flags |= JOB_RESTART; - (void) Lst_AtEnd(stoppedJobs, (ClientData)job); + (void) Lst_AtEnd(stoppedJobs, (void *)job); } else { if ((nLocal >= maxLocal) && local) { /* @@ -2252,11 +2252,11 @@ Job_CatchChildren(block) } - jnode = Lst_Find(jobs, (ClientData)&pid, JobCmpPid); + jnode = Lst_Find(jobs, (void *)&pid, JobCmpPid); if (jnode == NULL) { if (WIFSIGNALED(status) && (WTERMSIG(status) == SIGCONT)) { - jnode = Lst_Find(stoppedJobs, (ClientData) &pid, JobCmpPid); + jnode = Lst_Find(stoppedJobs, (void *) &pid, JobCmpPid); if (jnode == NULL) { Error("Resumed child (%d) not in table", pid); continue; @@ -2668,7 +2668,7 @@ Job_ParseShell(line) } words = brk_string(line, &wordCount, TRUE); - memset((Address)&newShell, 0, sizeof(newShell)); + memset(&newShell, 0, sizeof(newShell)); /* * Parse the specification by keyword @@ -3051,10 +3051,10 @@ JobFlagForMigration(hostID) (void) fprintf(stdout, "JobFlagForMigration(%d) called.\n", hostID); (void) fflush(stdout); } - jnode = Lst_Find(jobs, (ClientData)hostID, JobCmpRmtID); + jnode = Lst_Find(jobs, (void *)hostID, JobCmpRmtID); if (jnode == NULL) { - jnode = Lst_Find(stoppedJobs, (ClientData)hostID, JobCmpRmtID); + jnode = Lst_Find(stoppedJobs, (void *)hostID, JobCmpRmtID); if (jnode == NULL) { if (DEBUG(JOB)) { Error("Evicting host(%d) not in table", hostID); diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h index d7b14f144bd7..86691d78926d 100644 --- a/usr.bin/make/lst.h +++ b/usr.bin/make/lst.h @@ -64,8 +64,8 @@ typedef struct LstNode *LstNode; * not to be freed. * NOCOPY performs similarly when given as the copyProc to Lst_Duplicate. */ -#define NOFREE ((void (*) __P((ClientData))) 0) -#define NOCOPY ((ClientData (*) __P((ClientData))) 0) +#define NOFREE ((void (*) __P((void *))) 0) +#define NOCOPY ((void * (*) __P((void *))) 0) #define LST_CONCNEW 0 /* create new LstNode's when using Lst_Concat */ #define LST_CONCLINK 1 /* relink LstNode's when using Lst_Concat */ @@ -76,9 +76,9 @@ typedef struct LstNode *LstNode; /* Create a new list */ Lst Lst_Init __P((Boolean)); /* Duplicate an existing list */ -Lst Lst_Duplicate __P((Lst, ClientData (*)(ClientData))); +Lst Lst_Duplicate __P((Lst, void * (*)(void *))); /* Destroy an old one */ -void Lst_Destroy __P((Lst, void (*)(ClientData))); +void Lst_Destroy __P((Lst, void (*)(void *))); /* True if list is empty */ Boolean Lst_IsEmpty __P((Lst)); @@ -86,17 +86,17 @@ Boolean Lst_IsEmpty __P((Lst)); * Functions to modify a list */ /* Insert an element before another */ -ReturnStatus Lst_Insert __P((Lst, LstNode, ClientData)); +ReturnStatus Lst_Insert __P((Lst, LstNode, void *)); /* Insert an element after another */ -ReturnStatus Lst_Append __P((Lst, LstNode, ClientData)); +ReturnStatus Lst_Append __P((Lst, LstNode, void *)); /* Place an element at the front of a lst. */ -ReturnStatus Lst_AtFront __P((Lst, ClientData)); +ReturnStatus Lst_AtFront __P((Lst, void *)); /* Place an element at the end of a lst. */ -ReturnStatus Lst_AtEnd __P((Lst, ClientData)); +ReturnStatus Lst_AtEnd __P((Lst, void *)); /* Remove an element */ ReturnStatus Lst_Remove __P((Lst, LstNode)); /* Replace a node with a new value */ -ReturnStatus Lst_Replace __P((LstNode, ClientData)); +ReturnStatus Lst_Replace __P((LstNode, void *)); /* Concatenate two lists */ ReturnStatus Lst_Concat __P((Lst, Lst, int)); @@ -110,33 +110,33 @@ LstNode Lst_Last __P((Lst)); /* Return successor to given element */ LstNode Lst_Succ __P((LstNode)); /* Get datum from LstNode */ -ClientData Lst_Datum __P((LstNode)); +void * Lst_Datum __P((LstNode)); /* * Functions for entire lists */ /* Find an element in a list */ -LstNode Lst_Find __P((Lst, ClientData, - int (*)(ClientData, ClientData))); +LstNode Lst_Find __P((Lst, void *, + int (*)(void *, void *))); /* Find an element starting from somewhere */ -LstNode Lst_FindFrom __P((Lst, LstNode, ClientData, - int (*cProc)(ClientData, ClientData))); +LstNode Lst_FindFrom __P((Lst, LstNode, void *, + int (*cProc)(void *, void *))); /* * See if the given datum is on the list. Returns the LstNode containing * the datum */ -LstNode Lst_Member __P((Lst, ClientData)); +LstNode Lst_Member __P((Lst, void *)); /* Apply a function to all elements of a lst */ -void Lst_ForEach __P((Lst, int (*)(ClientData, ClientData), - ClientData)); +void Lst_ForEach __P((Lst, int (*)(void *, void *), + void *)); /* * Apply a function to all elements of a lst starting from a certain point. * If the list is circular, the application will wrap around to the * beginning of the list again. */ void Lst_ForEachFrom __P((Lst, LstNode, - int (*)(ClientData, ClientData), - ClientData)); + int (*)(void *, void *), + void *)); /* * these functions are for dealing with a list as a table, of sorts. * An idea of the "current element" is kept and used by all the functions @@ -155,8 +155,8 @@ void Lst_Close __P((Lst)); * for using the list as a queue */ /* Place an element at tail of queue */ -ReturnStatus Lst_EnQueue __P((Lst, ClientData)); +ReturnStatus Lst_EnQueue __P((Lst, void *)); /* Remove an element from head of queue */ -ClientData Lst_DeQueue __P((Lst)); +void * Lst_DeQueue __P((Lst)); #endif /* _LST_H_ */ diff --git a/usr.bin/make/lst.lib/lstAppend.c b/usr.bin/make/lst.lib/lstAppend.c index 155addc57805..942e1938262f 100644 --- a/usr.bin/make/lst.lib/lstAppend.c +++ b/usr.bin/make/lst.lib/lstAppend.c @@ -68,7 +68,7 @@ ReturnStatus Lst_Append (l, ln, d) Lst l; /* affected list */ LstNode ln; /* node after which to append the datum */ - ClientData d; /* said datum */ + void * d; /* said datum */ { register List list; register ListNode lNode; diff --git a/usr.bin/make/lst.lib/lstAtEnd.c b/usr.bin/make/lst.lib/lstAtEnd.c index 979cbb60a8dc..2a7de2162872 100644 --- a/usr.bin/make/lst.lib/lstAtEnd.c +++ b/usr.bin/make/lst.lib/lstAtEnd.c @@ -64,7 +64,7 @@ __RCSID("$FreeBSD$"); ReturnStatus Lst_AtEnd (l, d) Lst l; /* List to which to add the datum */ - ClientData d; /* Datum to add */ + void * d; /* Datum to add */ { register LstNode end; diff --git a/usr.bin/make/lst.lib/lstAtFront.c b/usr.bin/make/lst.lib/lstAtFront.c index e83176dfde76..3153d1573d59 100644 --- a/usr.bin/make/lst.lib/lstAtFront.c +++ b/usr.bin/make/lst.lib/lstAtFront.c @@ -65,7 +65,7 @@ __RCSID("$FreeBSD$"); ReturnStatus Lst_AtFront (l, d) Lst l; - ClientData d; + void * d; { register LstNode front; diff --git a/usr.bin/make/lst.lib/lstConcat.c b/usr.bin/make/lst.lib/lstConcat.c index 6f0b207cf849..991f58ff2eb8 100644 --- a/usr.bin/make/lst.lib/lstConcat.c +++ b/usr.bin/make/lst.lib/lstConcat.c @@ -119,7 +119,7 @@ Lst_Concat (l1, l2, flags) list1->firstPtr->prevPtr = list1->lastPtr; list1->lastPtr->nextPtr = list1->firstPtr; } - free ((Address)l2); + free (l2); } else if (list2->firstPtr != NULL) { /* * We set the nextPtr of the last element of list 2 to be NULL to make diff --git a/usr.bin/make/lst.lib/lstDatum.c b/usr.bin/make/lst.lib/lstDatum.c index 3d2b0cff4111..7a0d77c27499 100644 --- a/usr.bin/make/lst.lib/lstDatum.c +++ b/usr.bin/make/lst.lib/lstDatum.c @@ -61,14 +61,14 @@ __RCSID("$FreeBSD$"); * *----------------------------------------------------------------------- */ -ClientData +void * Lst_Datum (ln) LstNode ln; { if (ln != NULL) { return (((ListNode)ln)->datum); } else { - return ((ClientData) NULL); + return ((void *) NULL); } } diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c index b004deedca03..e8194f385b30 100644 --- a/usr.bin/make/lst.lib/lstDeQueue.c +++ b/usr.bin/make/lst.lib/lstDeQueue.c @@ -62,21 +62,21 @@ __RCSID("$FreeBSD$"); * *----------------------------------------------------------------------- */ -ClientData +void * Lst_DeQueue (l) Lst l; { - ClientData rd; + void * rd; register ListNode tln; tln = (ListNode) Lst_First (l); if (tln == NULL) { - return ((ClientData) NULL); + return ((void *) NULL); } rd = tln->datum; if (Lst_Remove (l, (LstNode)tln) == FAILURE) { - return ((ClientData) NULL); + return ((void *) NULL); } else { return (rd); } diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c index 32f79f49a254..a0316b8aec7e 100644 --- a/usr.bin/make/lst.lib/lstDestroy.c +++ b/usr.bin/make/lst.lib/lstDestroy.c @@ -66,7 +66,7 @@ __RCSID("$FreeBSD$"); void Lst_Destroy (l, freeProc) Lst l; - register void (*freeProc) __P((ClientData)); + register void (*freeProc) __P((void *)); { register ListNode ln; register ListNode tln = NULL; @@ -84,7 +84,7 @@ Lst_Destroy (l, freeProc) if (list->lastPtr != NULL) list->lastPtr->nextPtr = NULL; else { - free ((Address)l); + free (l); return; } @@ -92,14 +92,14 @@ Lst_Destroy (l, freeProc) for (ln = list->firstPtr; ln != NULL; ln = tln) { tln = ln->nextPtr; (*freeProc) (ln->datum); - free ((Address)ln); + free (ln); } } else { for (ln = list->firstPtr; ln != NULL; ln = tln) { tln = ln->nextPtr; - free ((Address)ln); + free (ln); } } - free ((Address)l); + free (l); } diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c index 6d0665bba367..cf693888783a 100644 --- a/usr.bin/make/lst.lib/lstDupl.c +++ b/usr.bin/make/lst.lib/lstDupl.c @@ -52,7 +52,7 @@ __RCSID("$FreeBSD$"); /*- *----------------------------------------------------------------------- * Lst_Duplicate -- - * Duplicate an entire list. If a function to copy a ClientData is + * Duplicate an entire list. If a function to copy a void * is * given, the individual client elements will be duplicated as well. * * Results: @@ -65,8 +65,8 @@ __RCSID("$FreeBSD$"); Lst Lst_Duplicate (l, copyProc) Lst l; /* the list to duplicate */ - /* A function to duplicate each ClientData */ - ClientData (*copyProc) __P((ClientData)); + /* A function to duplicate each void * */ + void * (*copyProc) __P((void *)); { register Lst nl; register ListNode ln; diff --git a/usr.bin/make/lst.lib/lstEnQueue.c b/usr.bin/make/lst.lib/lstEnQueue.c index fe29028bde05..50a729990ed0 100644 --- a/usr.bin/make/lst.lib/lstEnQueue.c +++ b/usr.bin/make/lst.lib/lstEnQueue.c @@ -65,7 +65,7 @@ __RCSID("$FreeBSD$"); ReturnStatus Lst_EnQueue (l, d) Lst l; - ClientData d; + void * d; { if (LstValid (l) == FALSE) { return (FAILURE); diff --git a/usr.bin/make/lst.lib/lstFind.c b/usr.bin/make/lst.lib/lstFind.c index acc038697c1e..fe85e7374d3e 100644 --- a/usr.bin/make/lst.lib/lstFind.c +++ b/usr.bin/make/lst.lib/lstFind.c @@ -65,8 +65,8 @@ __RCSID("$FreeBSD$"); LstNode Lst_Find (l, d, cProc) Lst l; - ClientData d; - int (*cProc) __P((ClientData, ClientData)); + void * d; + int (*cProc) __P((void *, void *)); { return (Lst_FindFrom (l, Lst_First(l), d, cProc)); } diff --git a/usr.bin/make/lst.lib/lstFindFrom.c b/usr.bin/make/lst.lib/lstFindFrom.c index 22491155cd82..0da80200aadb 100644 --- a/usr.bin/make/lst.lib/lstFindFrom.c +++ b/usr.bin/make/lst.lib/lstFindFrom.c @@ -67,8 +67,8 @@ LstNode Lst_FindFrom (l, ln, d, cProc) Lst l; register LstNode ln; - register ClientData d; - register int (*cProc) __P((ClientData, ClientData)); + register void * d; + register int (*cProc) __P((void *, void *)); { register ListNode tln; Boolean found = FALSE; diff --git a/usr.bin/make/lst.lib/lstForEach.c b/usr.bin/make/lst.lib/lstForEach.c index cac2485345b4..e89744849a1e 100644 --- a/usr.bin/make/lst.lib/lstForEach.c +++ b/usr.bin/make/lst.lib/lstForEach.c @@ -67,8 +67,8 @@ __RCSID("$FreeBSD$"); void Lst_ForEach (l, proc, d) Lst l; - register int (*proc) __P((ClientData, ClientData)); - register ClientData d; + register int (*proc) __P((void *, void *)); + register void * d; { Lst_ForEachFrom(l, Lst_First(l), proc, d); } diff --git a/usr.bin/make/lst.lib/lstForEachFrom.c b/usr.bin/make/lst.lib/lstForEachFrom.c index 579a640b196b..6655ab8bcc47 100644 --- a/usr.bin/make/lst.lib/lstForEachFrom.c +++ b/usr.bin/make/lst.lib/lstForEachFrom.c @@ -69,8 +69,8 @@ void Lst_ForEachFrom (l, ln, proc, d) Lst l; LstNode ln; - register int (*proc) __P((ClientData, ClientData)); - register ClientData d; + register int (*proc) __P((void *, void *)); + register void * d; { register ListNode tln = (ListNode)ln; register List list = (List)l; diff --git a/usr.bin/make/lst.lib/lstInsert.c b/usr.bin/make/lst.lib/lstInsert.c index fca1e41b3f02..6bc0f1043975 100644 --- a/usr.bin/make/lst.lib/lstInsert.c +++ b/usr.bin/make/lst.lib/lstInsert.c @@ -67,7 +67,7 @@ ReturnStatus Lst_Insert (l, ln, d) Lst l; /* list to manipulate */ LstNode ln; /* node before which to insert d */ - ClientData d; /* datum to be inserted */ + void * d; /* datum to be inserted */ { register ListNode nLNode; /* new lnode for d */ register ListNode lNode = (ListNode)ln; diff --git a/usr.bin/make/lst.lib/lstInt.h b/usr.bin/make/lst.lib/lstInt.h index 6bbc240766c6..86dcb2bb46e9 100644 --- a/usr.bin/make/lst.lib/lstInt.h +++ b/usr.bin/make/lst.lib/lstInt.h @@ -54,7 +54,7 @@ typedef struct ListNode { * node may not be deleted until count * goes to 0 */ flags:8; /* Node status flags */ - ClientData datum; /* datum associated with this element */ + void * datum; /* datum associated with this element */ } *ListNode; /* * Flags required for synchronization diff --git a/usr.bin/make/lst.lib/lstMember.c b/usr.bin/make/lst.lib/lstMember.c index f12a1fcef616..a6eebfc45176 100644 --- a/usr.bin/make/lst.lib/lstMember.c +++ b/usr.bin/make/lst.lib/lstMember.c @@ -51,7 +51,7 @@ __RCSID("$FreeBSD$"); LstNode Lst_Member (l, d) Lst l; - ClientData d; + void * d; { List list = (List) l; register ListNode lNode; diff --git a/usr.bin/make/lst.lib/lstRemove.c b/usr.bin/make/lst.lib/lstRemove.c index 6460c9b6d261..175a963d8f82 100644 --- a/usr.bin/make/lst.lib/lstRemove.c +++ b/usr.bin/make/lst.lib/lstRemove.c @@ -124,7 +124,7 @@ Lst_Remove (l, ln) * necessary and as expected. */ if (lNode->useCount == 0) { - free ((Address)ln); + free (ln); } else { lNode->flags |= LN_DELETED; } diff --git a/usr.bin/make/lst.lib/lstReplace.c b/usr.bin/make/lst.lib/lstReplace.c index d8a1f2151d62..5ceebd36cfd6 100644 --- a/usr.bin/make/lst.lib/lstReplace.c +++ b/usr.bin/make/lst.lib/lstReplace.c @@ -64,7 +64,7 @@ __RCSID("$FreeBSD$"); ReturnStatus Lst_Replace (ln, d) register LstNode ln; - ClientData d; + void * d; { if (ln == NULL) { return (FAILURE); diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 0396cac5d56e..4695066bb1fd 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -138,7 +138,7 @@ static Boolean jobsRunning; /* TRUE if the jobs might be running */ static void MainParseArgs __P((int, char **)); char * chdir_verify_path __P((char *, char *)); -static int ReadMakefile __P((ClientData, ClientData)); +static int ReadMakefile __P((void *, void *)); static void usage __P((void)); static char *curdir; /* startup directory */ @@ -186,7 +186,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { break; case 'V': printVars = TRUE; - (void)Lst_AtEnd(variables, (ClientData)optarg); + (void)Lst_AtEnd(variables, (void *)optarg); Var_Append(MAKEFLAGS, "-V", VAR_GLOBAL); Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); break; @@ -281,7 +281,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { if (!p) Punt("make: cannot allocate memory."); (void)strcpy(p, optarg); - (void)Lst_AtEnd(envFirstVars, (ClientData)p); + (void)Lst_AtEnd(envFirstVars, (void *)p); Var_Append(MAKEFLAGS, "-E", VAR_GLOBAL); Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); break; @@ -290,7 +290,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { Var_Append(MAKEFLAGS, "-e", VAR_GLOBAL); break; case 'f': - (void)Lst_AtEnd(makefiles, (ClientData)optarg); + (void)Lst_AtEnd(makefiles, (void *)optarg); break; case 'i': ignoreErrors = TRUE; @@ -373,7 +373,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { optind = 1; /* - */ goto rearg; } - (void)Lst_AtEnd(create, (ClientData)estrdup(*argv)); + (void)Lst_AtEnd(create, (void *)estrdup(*argv)); } } @@ -752,7 +752,7 @@ main(argc, argv) Dir_Expand (_PATH_DEFSYSMK, sysIncPath, sysMkPath); if (Lst_IsEmpty(sysMkPath)) Fatal("make: no system rules (%s).", _PATH_DEFSYSMK); - ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile); + ln = Lst_Find(sysMkPath, (void *)NULL, ReadMakefile); if (ln != NULL) Fatal("make: cannot open %s.", (char *)Lst_Datum(ln)); } @@ -760,7 +760,7 @@ main(argc, argv) if (!Lst_IsEmpty(makefiles)) { LstNode ln; - ln = Lst_Find(makefiles, (ClientData)NULL, ReadMakefile); + ln = Lst_Find(makefiles, (void *)NULL, ReadMakefile); if (ln != NULL) Fatal("make: cannot open %s.", (char *)Lst_Datum(ln)); } else if (!ReadMakefile("makefile", NULL)) @@ -809,7 +809,7 @@ main(argc, argv) *cp = savec; path = cp + 1; } while (savec == ':'); - (void)free((Address)vpath); + (void)free(vpath); } /* @@ -883,7 +883,7 @@ main(argc, argv) Lst_Destroy(targs, NOFREE); Lst_Destroy(variables, NOFREE); Lst_Destroy(makefiles, NOFREE); - Lst_Destroy(create, (void (*) __P((ClientData))) free); + Lst_Destroy(create, (void (*) __P((void *))) free); /* print the graph now it's been processed if the user requested it */ if (DEBUG(GRAPH2)) @@ -915,7 +915,8 @@ main(argc, argv) */ static Boolean ReadMakefile(p, q) - ClientData p, q; + void *p; + void *q; { char *fname = p; /* makefile to read */ extern Lst parseIncPath; @@ -1340,8 +1341,8 @@ usage() int PrintAddr(a, b) - ClientData a; - ClientData b; + void * a; + void * b; { printf("%lx ", (unsigned long) a); return b ? 0 : 0; diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 6335b717c6e5..8153af100db9 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -89,12 +89,12 @@ static int numNodes; /* Number of nodes to be processed. If this * is non-zero when Job_Empty() returns * TRUE, there's a cycle in the graph */ -static int MakeAddChild __P((ClientData, ClientData)); -static int MakeAddAllSrc __P((ClientData, ClientData)); -static int MakeTimeStamp __P((ClientData, ClientData)); -static int MakeHandleUse __P((ClientData, ClientData)); +static int MakeAddChild __P((void *, void *)); +static int MakeAddAllSrc __P((void *, void *)); +static int MakeTimeStamp __P((void *, void *)); +static int MakeHandleUse __P((void *, void *)); static Boolean MakeStartJobs __P((void)); -static int MakePrintStatus __P((ClientData, ClientData)); +static int MakePrintStatus __P((void *, void *)); /*- *----------------------------------------------------------------------- * Make_TimeStamp -- @@ -122,8 +122,8 @@ Make_TimeStamp (pgn, cgn) static int MakeTimeStamp (pgn, cgn) - ClientData pgn; /* the current parent */ - ClientData cgn; /* the child we've just examined */ + void * pgn; /* the current parent */ + void * cgn; /* the child we've just examined */ { return Make_TimeStamp((GNode *) pgn, (GNode *) cgn); } @@ -266,7 +266,7 @@ Make_OODate (gn) * thinking they're out-of-date. */ if (!oodate) { - Lst_ForEach (gn->parents, MakeTimeStamp, (ClientData)gn); + Lst_ForEach (gn->parents, MakeTimeStamp, (void *)gn); } return (oodate); @@ -287,14 +287,14 @@ Make_OODate (gn) */ static int MakeAddChild (gnp, lp) - ClientData gnp; /* the node to add */ - ClientData lp; /* the list to which to add it */ + void * gnp; /* the node to add */ + void * lp; /* the list to which to add it */ { GNode *gn = (GNode *) gnp; Lst l = (Lst) lp; if (!gn->make && !(gn->type & OP_USE)) { - (void)Lst_EnQueue (l, (ClientData)gn); + (void)Lst_EnQueue (l, (void *)gn); } return (0); } @@ -369,8 +369,8 @@ Make_HandleUse (cgn, pgn) } static int MakeHandleUse (pgn, cgn) - ClientData pgn; /* the current parent */ - ClientData cgn; /* the child we've just examined */ + void * pgn; /* the current parent */ + void * cgn; /* the child we've just examined */ { return Make_HandleUse((GNode *) pgn, (GNode *) cgn); } @@ -500,7 +500,7 @@ Make_Update (cgn) * Queue the node up -- any unmade predecessors will * be dealt with in MakeStartJobs. */ - (void)Lst_EnQueue (toBeMade, (ClientData)pgn); + (void)Lst_EnQueue (toBeMade, (void *)pgn); } else if (pgn->unmade < 0) { Error ("Graph cycles through %s", pgn->name); } @@ -518,9 +518,9 @@ Make_Update (cgn) GNode *succ = (GNode *)Lst_Datum(ln); if (succ->make && succ->unmade == 0 && succ->made == UNMADE && - Lst_Member(toBeMade, (ClientData)succ) == NULL) + Lst_Member(toBeMade, (void *)succ) == NULL) { - (void)Lst_EnQueue(toBeMade, (ClientData)succ); + (void)Lst_EnQueue(toBeMade, (void *)succ); } } @@ -566,8 +566,8 @@ Make_Update (cgn) */ static int MakeAddAllSrc (cgnp, pgnp) - ClientData cgnp; /* The child to add */ - ClientData pgnp; /* The parent to whose ALLSRC variable it should be */ + void * cgnp; /* The child to add */ + void * pgnp; /* The parent to whose ALLSRC variable it should be */ /* added */ { GNode *cgn = (GNode *) cgnp; @@ -641,7 +641,7 @@ void Make_DoAllVar (gn) GNode *gn; { - Lst_ForEach (gn->children, MakeAddAllSrc, (ClientData) gn); + Lst_ForEach (gn->children, MakeAddAllSrc, (void *) gn); if (!Var_Exists (OODATE, gn)) { Var_Set (OODATE, "", gn); @@ -759,8 +759,8 @@ MakeStartJobs () */ static int MakePrintStatus(gnp, cyclep) - ClientData gnp; /* Node to examine */ - ClientData cyclep; /* True if gn->unmade being non-zero implies + void * gnp; /* Node to examine */ + void * cyclep; /* True if gn->unmade being non-zero implies * a cycle in the graph, not an error in an * inferior */ { @@ -784,11 +784,11 @@ MakePrintStatus(gnp, cyclep) if (gn->made == CYCLE) { Error("Graph cycles through `%s'", gn->name); gn->made = ENDCYCLE; - Lst_ForEach(gn->children, MakePrintStatus, (ClientData) &t); + Lst_ForEach(gn->children, MakePrintStatus, (void *) &t); gn->made = UNMADE; } else if (gn->made != ENDCYCLE) { gn->made = CYCLE; - Lst_ForEach(gn->children, MakePrintStatus, (ClientData) &t); + Lst_ForEach(gn->children, MakePrintStatus, (void *) &t); } } else { printf ("`%s' not remade because of errors.\n", gn->name); @@ -850,13 +850,13 @@ Make_Run (targs) * Apply any .USE rules before looking for implicit dependencies * to make sure everything has commands that should... */ - Lst_ForEach (gn->children, MakeHandleUse, (ClientData)gn); + Lst_ForEach (gn->children, MakeHandleUse, (void *)gn); Suff_FindDeps (gn); if (gn->unmade != 0) { - Lst_ForEach (gn->children, MakeAddChild, (ClientData)examine); + Lst_ForEach (gn->children, MakeAddChild, (void *)examine); } else { - (void)Lst_EnQueue (toBeMade, (ClientData)gn); + (void)Lst_EnQueue (toBeMade, (void *)gn); } } } @@ -904,7 +904,7 @@ Make_Run (targs) * because some inferior reported an error. */ errors = ((errors == 0) && (numNodes != 0)); - Lst_ForEach(targs, MakePrintStatus, (ClientData) &errors); + Lst_ForEach(targs, MakePrintStatus, (void *) &errors); return (TRUE); } diff --git a/usr.bin/make/nonints.h b/usr.bin/make/nonints.h index ce1665d96c85..d3c9a7f327a3 100644 --- a/usr.bin/make/nonints.h +++ b/usr.bin/make/nonints.h @@ -69,7 +69,7 @@ void Error __P((char *, ...)); void Fatal __P((char *, ...)); void Punt __P((char *, ...)); void DieHorribly __P((void)); -int PrintAddr __P((ClientData, ClientData)); +int PrintAddr __P((void *, void *)); void Finish __P((int)); char *estrdup __P((const char *)); void *emalloc __P((size_t)); @@ -106,7 +106,7 @@ void Str_SYSVSubst __P((Buffer, char *, char *, int)); void Suff_ClearSuffixes __P((void)); Boolean Suff_IsTransform __P((char *)); GNode *Suff_AddTransform __P((char *)); -int Suff_EndTransform __P((ClientData, ClientData)); +int Suff_EndTransform __P((void *, void *)); void Suff_AddSuffix __P((char *)); Lst Suff_GetPath __P((char *)); void Suff_DoPaths __P((void)); @@ -128,7 +128,7 @@ Boolean Targ_Ignore __P((GNode *)); Boolean Targ_Silent __P((GNode *)); Boolean Targ_Precious __P((GNode *)); void Targ_SetMain __P((GNode *)); -int Targ_PrintCmd __P((ClientData, ClientData)); +int Targ_PrintCmd __P((void *, void *)); char *Targ_FmtTime __P((time_t)); void Targ_PrintType __P((int)); void Targ_PrintGraph __P((int)); diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index c250e56449d8..6304a41483ab 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -237,18 +237,18 @@ static struct { }; static int ParseFindKeyword __P((char *)); -static int ParseLinkSrc __P((ClientData, ClientData)); -static int ParseDoOp __P((ClientData, ClientData)); -static int ParseAddDep __P((ClientData, ClientData)); +static int ParseLinkSrc __P((void *, void *)); +static int ParseDoOp __P((void *, void *)); +static int ParseAddDep __P((void *, void *)); static void ParseDoSrc __P((int, char *, Lst)); -static int ParseFindMain __P((ClientData, ClientData)); -static int ParseAddDir __P((ClientData, ClientData)); -static int ParseClearPath __P((ClientData, ClientData)); +static int ParseFindMain __P((void *, void *)); +static int ParseAddDir __P((void *, void *)); +static int ParseClearPath __P((void *, void *)); static void ParseDoDependency __P((char *)); -static int ParseAddCmd __P((ClientData, ClientData)); +static int ParseAddCmd __P((void *, void *)); static int ParseReadc __P((void)); static void ParseUnreadc __P((int)); -static void ParseHasCommands __P((ClientData)); +static void ParseHasCommands __P((void *)); static void ParseDoInclude __P((char *)); static void ParseDoError __P((char *)); #ifdef SYSVINCLUDE @@ -360,15 +360,15 @@ Parse_Error(va_alist) */ static int ParseLinkSrc (pgnp, cgnp) - ClientData pgnp; /* The parent node */ - ClientData cgnp; /* The child node */ + void * pgnp; /* The parent node */ + void * cgnp; /* The child node */ { GNode *pgn = (GNode *) pgnp; GNode *cgn = (GNode *) cgnp; - if (Lst_Member (pgn->children, (ClientData)cgn) == NULL) { - (void)Lst_AtEnd (pgn->children, (ClientData)cgn); + if (Lst_Member (pgn->children, (void *)cgn) == NULL) { + (void)Lst_AtEnd (pgn->children, (void *)cgn); if (specType == Not) { - (void)Lst_AtEnd (cgn->parents, (ClientData)pgn); + (void)Lst_AtEnd (cgn->parents, (void *)pgn); } pgn->unmade += 1; } @@ -393,9 +393,9 @@ ParseLinkSrc (pgnp, cgnp) */ static int ParseDoOp (gnp, opp) - ClientData gnp; /* The node to which the operator is to be + void * gnp; /* The node to which the operator is to be * applied */ - ClientData opp; /* The operator to apply */ + void * opp; /* The operator to apply */ { GNode *gn = (GNode *) gnp; int op = *(int *) opp; @@ -433,15 +433,15 @@ ParseDoOp (gnp, opp) * anything with their local variables, but better safe than * sorry. */ - Lst_ForEach(gn->parents, ParseLinkSrc, (ClientData)cohort); + Lst_ForEach(gn->parents, ParseLinkSrc, (void *)cohort); cohort->type = OP_DOUBLEDEP|OP_INVISIBLE; - (void)Lst_AtEnd(gn->cohorts, (ClientData)cohort); + (void)Lst_AtEnd(gn->cohorts, (void *)cohort); /* * Replace the node in the targets list with the new copy */ - ln = Lst_Member(targets, (ClientData)gn); - Lst_Replace(ln, (ClientData)cohort); + ln = Lst_Member(targets, (void *)gn); + Lst_Replace(ln, (void *)cohort); gn = cohort; } /* @@ -471,8 +471,8 @@ ParseDoOp (gnp, opp) */ static int ParseAddDep(pp, sp) - ClientData pp; - ClientData sp; + void * pp; + void * sp; { GNode *p = (GNode *) pp; GNode *s = (GNode *) sp; @@ -483,8 +483,8 @@ ParseAddDep(pp, sp) * but checking is tedious, and the debugging output can show the * problem */ - (void)Lst_AtEnd(p->successors, (ClientData)s); - (void)Lst_AtEnd(s->preds, (ClientData)p); + (void)Lst_AtEnd(p->successors, (void *)s); + (void)Lst_AtEnd(s->preds, (void *)p); return 0; } else @@ -522,7 +522,7 @@ ParseDoSrc (tOp, src, allsrc) if (keywd != -1) { int op = parseKeywords[keywd].op; if (op != 0) { - Lst_ForEach (targets, ParseDoOp, (ClientData)&op); + Lst_ForEach (targets, ParseDoOp, (void *)&op); return; } if (parseKeywords[keywd].spec == Wait) { @@ -542,7 +542,7 @@ ParseDoSrc (tOp, src, allsrc) * invoked if the user didn't specify a target on the command * line. This is to allow #ifmake's to succeed, or something... */ - (void) Lst_AtEnd (create, (ClientData)estrdup(src)); + (void) Lst_AtEnd (create, (void *)estrdup(src)); /* * Add the name to the .TARGETS variable as well, so the user cna * employ that, if desired. @@ -557,8 +557,8 @@ ParseDoSrc (tOp, src, allsrc) */ gn = Targ_FindNode(src, TARG_CREATE); if (predecessor != NULL) { - (void)Lst_AtEnd(predecessor->successors, (ClientData)gn); - (void)Lst_AtEnd(gn->preds, (ClientData)predecessor); + (void)Lst_AtEnd(predecessor->successors, (void *)gn); + (void)Lst_AtEnd(gn->preds, (void *)predecessor); } /* * The current source now becomes the predecessor for the next one. @@ -582,7 +582,7 @@ ParseDoSrc (tOp, src, allsrc) if (tOp) { gn->type |= tOp; } else { - Lst_ForEach (targets, ParseLinkSrc, (ClientData)gn); + Lst_ForEach (targets, ParseLinkSrc, (void *)gn); } if ((gn->type & OP_OPMASK) == OP_DOUBLEDEP) { register GNode *cohort; @@ -593,7 +593,7 @@ ParseDoSrc (tOp, src, allsrc) if (tOp) { cohort->type |= tOp; } else { - Lst_ForEach(targets, ParseLinkSrc, (ClientData)cohort); + Lst_ForEach(targets, ParseLinkSrc, (void *)cohort); } } } @@ -601,9 +601,9 @@ ParseDoSrc (tOp, src, allsrc) } gn->order = waiting; - (void)Lst_AtEnd(allsrc, (ClientData)gn); + (void)Lst_AtEnd(allsrc, (void *)gn); if (waiting) { - Lst_ForEach(allsrc, ParseAddDep, (ClientData)gn); + Lst_ForEach(allsrc, ParseAddDep, (void *)gn); } } @@ -624,8 +624,8 @@ ParseDoSrc (tOp, src, allsrc) */ static int ParseFindMain(gnp, dummy) - ClientData gnp; /* Node to examine */ - ClientData dummy; + void * gnp; /* Node to examine */ + void * dummy; { GNode *gn = (GNode *) gnp; if ((gn->type & (OP_NOTMAIN|OP_USE|OP_EXEC|OP_TRANSFORM)) == 0) { @@ -652,8 +652,8 @@ ParseFindMain(gnp, dummy) */ static int ParseAddDir(path, name) - ClientData path; - ClientData name; + void * path; + void * name; { Dir_AddDir((Lst) path, (char *) name); return(0); @@ -674,8 +674,8 @@ ParseAddDir(path, name) */ static int ParseClearPath(path, dummy) - ClientData path; - ClientData dummy; + void * path; + void * dummy; { Dir_ClearPath((Lst) path); return(dummy ? 0 : 0); @@ -850,7 +850,7 @@ ParseDoDependency (line) if (paths == NULL) { paths = Lst_Init(FALSE); } - (void)Lst_AtEnd(paths, (ClientData)dirSearchPath); + (void)Lst_AtEnd(paths, (void *)dirSearchPath); break; case Main: if (!Lst_IsEmpty(create)) { @@ -862,12 +862,12 @@ ParseDoDependency (line) case Interrupt: gn = Targ_FindNode(line, TARG_CREATE); gn->type |= OP_NOTMAIN; - (void)Lst_AtEnd(targets, (ClientData)gn); + (void)Lst_AtEnd(targets, (void *)gn); break; case Default: gn = Targ_NewGN(".DEFAULT"); gn->type |= (OP_NOTMAIN|OP_TRANSFORM); - (void)Lst_AtEnd(targets, (ClientData)gn); + (void)Lst_AtEnd(targets, (void *)gn); DEFAULT = gn; break; case NotParallel: @@ -905,7 +905,7 @@ ParseDoDependency (line) if (paths == (Lst)NULL) { paths = Lst_Init(FALSE); } - (void)Lst_AtEnd(paths, (ClientData)path); + (void)Lst_AtEnd(paths, (void *)path); } } } @@ -932,7 +932,7 @@ ParseDoDependency (line) * No wildcards, but we want to avoid code duplication, * so create a list with the word on it. */ - (void)Lst_AtEnd(curTargs, (ClientData)line); + (void)Lst_AtEnd(curTargs, (void *)line); } while(!Lst_IsEmpty(curTargs)) { @@ -944,7 +944,7 @@ ParseDoDependency (line) gn = Suff_AddTransform (targName); } - (void)Lst_AtEnd (targets, (ClientData)gn); + (void)Lst_AtEnd (targets, (void *)gn); } } else if (specType == ExPath && *line != '.' && *line != '\0') { Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", line); @@ -1021,7 +1021,7 @@ ParseDoDependency (line) cp++; /* Advance beyond operator */ - Lst_ForEach (targets, ParseDoOp, (ClientData)&op); + Lst_ForEach (targets, ParseDoOp, (void *)&op); /* * Get to the first source @@ -1055,7 +1055,7 @@ ParseDoDependency (line) beSilent = TRUE; break; case ExPath: - Lst_ForEach(paths, ParseClearPath, (ClientData)NULL); + Lst_ForEach(paths, ParseClearPath, (void *)NULL); break; #ifdef POSIX case Posix: @@ -1126,7 +1126,7 @@ ParseDoDependency (line) Suff_AddSuffix (line); break; case ExPath: - Lst_ForEach(paths, ParseAddDir, (ClientData)line); + Lst_ForEach(paths, ParseAddDir, (void *)line); break; case Includes: Suff_AddInclude (line); @@ -1211,7 +1211,7 @@ ParseDoDependency (line) * the first dependency line that is actually a real target * (i.e. isn't a .USE or .EXEC rule) to be made. */ - Lst_ForEach (targets, ParseFindMain, (ClientData)0); + Lst_ForEach (targets, ParseFindMain, (void *)0); } /* @@ -1497,8 +1497,8 @@ Parse_DoVar (line, ctxt) */ static int ParseAddCmd(gnp, cmd) - ClientData gnp; /* the node to which the command is to be added */ - ClientData cmd; /* the command to add */ + void * gnp; /* the node to which the command is to be added */ + void * cmd; /* the command to add */ { GNode *gn = (GNode *) gnp; /* if target already supplied, ignore commands */ @@ -1525,7 +1525,7 @@ ParseAddCmd(gnp, cmd) */ static void ParseHasCommands(gnp) - ClientData gnp; /* Node to examine */ + void * gnp; /* Node to examine */ { GNode *gn = (GNode *) gnp; if (!Lst_IsEmpty(gn->commands)) { @@ -1742,7 +1742,7 @@ ParseDoInclude (file) oldFile->p = curPTR; oldFile->lineno = lineno; - (void) Lst_AtFront (includes, (ClientData)oldFile); + (void) Lst_AtFront (includes, (void *)oldFile); /* * Once the previous state has been saved, we can get down to reading @@ -1794,7 +1794,7 @@ Parse_FromString(str) oldFile->F = curFILE; oldFile->p = curPTR; - (void) Lst_AtFront (includes, (ClientData)oldFile); + (void) Lst_AtFront (includes, (void *)oldFile); curFILE = NULL; curPTR = (PTR *) emalloc (sizeof (PTR)); @@ -1925,7 +1925,7 @@ ParseTraditionalInclude (file) oldFile->p = curPTR; oldFile->lineno = lineno; - (void) Lst_AtFront (includes, (ClientData)oldFile); + (void) Lst_AtFront (includes, (void *)oldFile); /* * Once the previous state has been saved, we can get down to reading @@ -1974,18 +1974,18 @@ ParseEOF (opened) } ifile = (IFile *) Lst_DeQueue (includes); - free ((Address) fname); + free (fname); fname = ifile->fname; lineno = ifile->lineno; if (opened && curFILE) (void) fclose (curFILE); if (curPTR) { - free((Address) curPTR->str); - free((Address) curPTR); + free(curPTR->str); + free(curPTR); } curFILE = ifile->F; curPTR = ifile->p; - free ((Address)ifile); + free (ifile); return (CONTINUE); } @@ -2312,7 +2312,7 @@ test_char: break; /*FALLTHRU*/ case COND_PARSE: - free ((Address) line); + free (line); line = ParseReadLine(); break; case COND_INVALID: @@ -2367,7 +2367,7 @@ static void ParseFinishLine() { if (inLine) { - Lst_ForEach(targets, Suff_EndTransform, (ClientData)NULL); + Lst_ForEach(targets, Suff_EndTransform, (void *)NULL); Lst_Destroy (targets, ParseHasCommands); targets = NULL; inLine = FALSE; @@ -2461,7 +2461,7 @@ Parse_File(name, stream) * commands of all targets in the dependency spec */ Lst_ForEach (targets, ParseAddCmd, cp); - Lst_AtEnd(targCmds, (ClientData) line); + Lst_AtEnd(targCmds, (void *) line); continue; } else { Parse_Error (PARSE_FATAL, @@ -2588,7 +2588,7 @@ Parse_Init () void Parse_End() { - Lst_Destroy(targCmds, (void (*) __P((ClientData))) free); + Lst_Destroy(targCmds, (void (*) __P((void *))) free); if (targets) Lst_Destroy(targets, NOFREE); Lst_Destroy(sysIncPath, Dir_Destroy); @@ -2622,10 +2622,10 @@ Parse_MainName() Punt ("no target to make."); /*NOTREACHED*/ } else if (mainNode->type & OP_DOUBLEDEP) { - (void) Lst_AtEnd (listmain, (ClientData)mainNode); + (void) Lst_AtEnd (listmain, (void *)mainNode); Lst_Concat(listmain, mainNode->cohorts, LST_CONCNEW); } else - (void) Lst_AtEnd (listmain, (ClientData)mainNode); + (void) Lst_AtEnd (listmain, (void *)mainNode); return (listmain); } diff --git a/usr.bin/make/sprite.h b/usr.bin/make/sprite.h index fd2cef62dccf..6e3207b347df 100644 --- a/usr.bin/make/sprite.h +++ b/usr.bin/make/sprite.h @@ -48,7 +48,6 @@ #ifndef _SPRITE #define _SPRITE - /* * A boolean type is defined as an integer, not an enum. This allows a * boolean argument to be an expression that isn't strictly 0 or 1 valued. @@ -62,49 +61,9 @@ typedef int Boolean; #define FALSE 0 #endif /* FALSE */ -/* - * Functions that must return a status can return a ReturnStatus to - * indicate success or type of failure. - */ - typedef int ReturnStatus; -/* - * The following statuses overlap with the first 2 generic statuses - * defined in status.h: - * - * SUCCESS There was no error. - * FAILURE There was a general error. - */ - -#define SUCCESS 0x00000000 -#define FAILURE 0x00000001 - - -/* - * A nil pointer must be something that will cause an exception if - * referenced. There are two nils: the kernels nil and the nil used - * by user processes. - */ - -#ifndef NULL -#define NULL 0 -#endif /* NULL */ - -/* - * An address is just a pointer in C. It is defined as a character pointer - * so that address arithmetic will work properly, a byte at a time. - */ - -typedef char *Address; - -/* - * ClientData is an uninterpreted word. It is defined as an int so that - * kdbx will not interpret client data as a string. Unlike an "Address", - * client data will generally not be used in arithmetic. - * But we don't have kdbx anymore so we define it as void (christos) - */ - -typedef void *ClientData; +#define SUCCESS 0 +#define FAILURE 1 #endif /* _SPRITE */ diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c index 3f8c104d6bc2..8a60a26bcbc5 100644 --- a/usr.bin/make/str.c +++ b/usr.bin/make/str.c @@ -73,7 +73,7 @@ str_end() if (argv) { if (argv[0]) free(argv[0]); - free((Address) argv); + free(argv); } if (buffer) free(buffer); diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 5b9bf539696a..0e58fb9ff7ef 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -157,28 +157,28 @@ static Suff *emptySuff; /* The empty suffix required for POSIX static char *SuffStrIsPrefix __P((char *, char *)); static char *SuffSuffIsSuffix __P((Suff *, char *)); -static int SuffSuffIsSuffixP __P((ClientData, ClientData)); -static int SuffSuffHasNameP __P((ClientData, ClientData)); -static int SuffSuffIsPrefix __P((ClientData, ClientData)); -static int SuffGNHasNameP __P((ClientData, ClientData)); -static void SuffFree __P((ClientData)); +static int SuffSuffIsSuffixP __P((void *, void *)); +static int SuffSuffHasNameP __P((void *, void *)); +static int SuffSuffIsPrefix __P((void *, void *)); +static int SuffGNHasNameP __P((void *, void *)); +static void SuffFree __P((void *)); static void SuffInsert __P((Lst, Suff *)); static void SuffRemove __P((Lst, Suff *)); static Boolean SuffParseTransform __P((char *, Suff **, Suff **)); -static int SuffRebuildGraph __P((ClientData, ClientData)); -static int SuffAddSrc __P((ClientData, ClientData)); +static int SuffRebuildGraph __P((void *, void *)); +static int SuffAddSrc __P((void *, void *)); static int SuffRemoveSrc __P((Lst)); static void SuffAddLevel __P((Lst, Src *)); static Src *SuffFindThem __P((Lst, Lst)); static Src *SuffFindCmds __P((Src *, Lst)); -static int SuffExpandChildren __P((ClientData, ClientData)); +static int SuffExpandChildren __P((void *, void *)); static Boolean SuffApplyTransform __P((GNode *, GNode *, Suff *, Suff *)); static void SuffFindDeps __P((GNode *, Lst)); static void SuffFindArchiveDeps __P((GNode *, Lst)); static void SuffFindNormalDeps __P((GNode *, Lst)); -static int SuffPrintName __P((ClientData, ClientData)); -static int SuffPrintSuff __P((ClientData, ClientData)); -static int SuffPrintTrans __P((ClientData, ClientData)); +static int SuffPrintName __P((void *, void *)); +static int SuffPrintSuff __P((void *, void *)); +static int SuffPrintTrans __P((void *, void *)); /*************** Lst Predicates ****************/ /*- @@ -255,8 +255,8 @@ SuffSuffIsSuffix (s, str) */ static int SuffSuffIsSuffixP(s, str) - ClientData s; - ClientData str; + void * s; + void * str; { return(!SuffSuffIsSuffix((Suff *) s, (char *) str)); } @@ -276,8 +276,8 @@ SuffSuffIsSuffixP(s, str) */ static int SuffSuffHasNameP (s, sname) - ClientData s; /* Suffix to check */ - ClientData sname; /* Desired name */ + void * s; /* Suffix to check */ + void * sname; /* Desired name */ { return (strcmp ((char *) sname, ((Suff *) s)->name)); } @@ -299,8 +299,8 @@ SuffSuffHasNameP (s, sname) */ static int SuffSuffIsPrefix (s, str) - ClientData s; /* suffix to compare */ - ClientData str; /* string to examine */ + void * s; /* suffix to compare */ + void * str; /* string to examine */ { return (SuffStrIsPrefix (((Suff *) s)->name, (char *) str) == NULL ? 1 : 0); } @@ -319,8 +319,8 @@ SuffSuffIsPrefix (s, str) */ static int SuffGNHasNameP (gn, name) - ClientData gn; /* current node we're looking at */ - ClientData name; /* name we're looking for */ + void * gn; /* current node we're looking at */ + void * name; /* name we're looking for */ { return (strcmp ((char *) name, ((GNode *) gn)->name)); } @@ -341,7 +341,7 @@ SuffGNHasNameP (gn, name) */ static void SuffFree (sp) - ClientData sp; + void * sp; { Suff *s = (Suff *) sp; @@ -356,8 +356,8 @@ SuffFree (sp) Lst_Destroy (s->parents, NOFREE); Lst_Destroy (s->searchPath, Dir_Destroy); - free ((Address)s->name); - free ((Address)s); + free (s->name); + free (s); } /*- @@ -377,7 +377,7 @@ SuffRemove(l, s) Lst l; Suff *s; { - LstNode ln = Lst_Member(l, (ClientData)s); + LstNode ln = Lst_Member(l, (void *)s); if (ln != NULL) { Lst_Remove(l, ln); s->refCount--; @@ -423,16 +423,16 @@ SuffInsert (l, s) if (DEBUG(SUFF)) { printf("at end of list\n"); } - (void)Lst_AtEnd (l, (ClientData)s); + (void)Lst_AtEnd (l, (void *)s); s->refCount++; - (void)Lst_AtEnd(s->ref, (ClientData) l); + (void)Lst_AtEnd(s->ref, (void *) l); } else if (s2->sNum != s->sNum) { if (DEBUG(SUFF)) { printf("before %s(%d)\n", s2->name, s2->sNum); } - (void)Lst_Insert (l, ln, (ClientData)s); + (void)Lst_Insert (l, ln, (void *)s); s->refCount++; - (void)Lst_AtEnd(s->ref, (ClientData) l); + (void)Lst_AtEnd(s->ref, (void *) l); } else if (DEBUG(SUFF)) { printf("already there\n"); } @@ -503,9 +503,9 @@ SuffParseTransform(str, srcPtr, targPtr) */ for (;;) { if (srcLn == NULL) { - srcLn = Lst_Find(sufflist, (ClientData)str, SuffSuffIsPrefix); + srcLn = Lst_Find(sufflist, (void *)str, SuffSuffIsPrefix); } else { - srcLn = Lst_FindFrom (sufflist, Lst_Succ(srcLn), (ClientData)str, + srcLn = Lst_FindFrom (sufflist, Lst_Succ(srcLn), (void *)str, SuffSuffIsPrefix); } if (srcLn == NULL) { @@ -534,7 +534,7 @@ SuffParseTransform(str, srcPtr, targPtr) single = src; singleLn = srcLn; } else { - targLn = Lst_Find(sufflist, (ClientData)str2, SuffSuffHasNameP); + targLn = Lst_Find(sufflist, (void *)str2, SuffSuffHasNameP); if (targLn != NULL) { *srcPtr = src; *targPtr = (Suff *)Lst_Datum(targLn); @@ -590,14 +590,14 @@ Suff_AddTransform (line) *t; /* target suffix */ LstNode ln; /* Node for existing transformation */ - ln = Lst_Find (transforms, (ClientData)line, SuffGNHasNameP); + ln = Lst_Find (transforms, (void *)line, SuffGNHasNameP); if (ln == NULL) { /* * Make a new graph node for the transformation. It will be filled in * by the Parse module. */ gn = Targ_NewGN (line); - (void)Lst_AtEnd (transforms, (ClientData)gn); + (void)Lst_AtEnd (transforms, (void *)gn); } else { /* * New specification for transformation rule. Just nuke the old list @@ -648,8 +648,8 @@ Suff_AddTransform (line) */ int Suff_EndTransform(gnp, dummy) - ClientData gnp; /* Node for transformation */ - ClientData dummy; /* Node for transformation */ + void * gnp; /* Node for transformation */ + void * dummy; /* Node for transformation */ { GNode *gn = (GNode *) gnp; @@ -707,8 +707,8 @@ Suff_EndTransform(gnp, dummy) */ static int SuffRebuildGraph(transformp, sp) - ClientData transformp; /* Transformation to test */ - ClientData sp; /* Suffix to rebuild */ + void * transformp; /* Transformation to test */ + void * sp; /* Suffix to rebuild */ { GNode *transform = (GNode *) transformp; Suff *s = (Suff *) sp; @@ -721,7 +721,7 @@ SuffRebuildGraph(transformp, sp) */ cp = SuffStrIsPrefix(s->name, transform->name); if (cp != (char *)NULL) { - ln = Lst_Find(sufflist, (ClientData)cp, SuffSuffHasNameP); + ln = Lst_Find(sufflist, (void *)cp, SuffSuffHasNameP); if (ln != NULL) { /* * Found target. Link in and return, since it can't be anything @@ -743,7 +743,7 @@ SuffRebuildGraph(transformp, sp) * Null-terminate the source suffix in order to find it. */ cp[1] = '\0'; - ln = Lst_Find(sufflist, (ClientData)transform->name, SuffSuffHasNameP); + ln = Lst_Find(sufflist, (void *)transform->name, SuffSuffHasNameP); /* * Replace the start of the target suffix */ @@ -781,7 +781,7 @@ Suff_AddSuffix (str) Suff *s; /* new suffix descriptor */ LstNode ln; - ln = Lst_Find (sufflist, (ClientData)str, SuffSuffHasNameP); + ln = Lst_Find (sufflist, (void *)str, SuffSuffHasNameP); if (ln == NULL) { s = (Suff *) emalloc (sizeof (Suff)); @@ -795,12 +795,12 @@ Suff_AddSuffix (str) s->flags = 0; s->refCount = 0; - (void)Lst_AtEnd (sufflist, (ClientData)s); + (void)Lst_AtEnd (sufflist, (void *)s); /* * Look for any existing transformations from or to this suffix. * XXX: Only do this after a Suff_ClearSuffixes? */ - Lst_ForEach (transforms, SuffRebuildGraph, (ClientData)s); + Lst_ForEach (transforms, SuffRebuildGraph, (void *)s); } } @@ -824,7 +824,7 @@ Suff_GetPath (sname) LstNode ln; Suff *s; - ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP); + ln = Lst_Find (sufflist, (void *)sname, SuffSuffHasNameP); if (ln == NULL) { return (NULL); } else { @@ -920,7 +920,7 @@ Suff_AddInclude (sname) LstNode ln; Suff *s; - ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP); + ln = Lst_Find (sufflist, (void *)sname, SuffSuffHasNameP); if (ln != NULL) { s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_INCLUDE; @@ -950,7 +950,7 @@ Suff_AddLib (sname) LstNode ln; Suff *s; - ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP); + ln = Lst_Find (sufflist, (void *)sname, SuffSuffHasNameP); if (ln != NULL) { s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_LIBRARY; @@ -975,8 +975,8 @@ Suff_AddLib (sname) */ static int SuffAddSrc (sp, lsp) - ClientData sp; /* suffix for which to create a Src structure */ - ClientData lsp; /* list and parent for the new Src */ + void * sp; /* suffix for which to create a Src structure */ + void * lsp; /* list and parent for the new Src */ { Suff *s = (Suff *) sp; LstSrc *ls = (LstSrc *) lsp; @@ -1000,12 +1000,12 @@ SuffAddSrc (sp, lsp) s->refCount++; s2->children = 0; targ->children += 1; - (void)Lst_AtEnd (ls->l, (ClientData)s2); + (void)Lst_AtEnd (ls->l, (void *)s2); #ifdef DEBUG_SRC s2->cp = Lst_Init(FALSE); - Lst_AtEnd(targ->cp, (ClientData) s2); + Lst_AtEnd(targ->cp, (void *) s2); printf("1 add %x %x to %x:", targ, s2, ls->l); - Lst_ForEach(ls->l, PrintAddr, (ClientData) 0); + Lst_ForEach(ls->l, PrintAddr, (void *) 0); printf("\n"); #endif } @@ -1018,12 +1018,12 @@ SuffAddSrc (sp, lsp) s->refCount++; s2->children = 0; targ->children += 1; - (void)Lst_AtEnd (ls->l, (ClientData)s2); + (void)Lst_AtEnd (ls->l, (void *)s2); #ifdef DEBUG_SRC s2->cp = Lst_Init(FALSE); - Lst_AtEnd(targ->cp, (ClientData) s2); + Lst_AtEnd(targ->cp, (void *) s2); printf("2 add %x %x to %x:", targ, s2, ls->l); - Lst_ForEach(ls->l, PrintAddr, (ClientData) 0); + Lst_ForEach(ls->l, PrintAddr, (void *) 0); printf("\n"); #endif @@ -1052,7 +1052,7 @@ SuffAddLevel (l, targ) ls.s = targ; ls.l = l; - Lst_ForEach (targ->suff->children, SuffAddSrc, (ClientData)&ls); + Lst_ForEach (targ->suff->children, SuffAddSrc, (void *)&ls); } /*- @@ -1080,7 +1080,7 @@ SuffRemoveSrc (l) } #ifdef DEBUG_SRC printf("cleaning %lx: ", (unsigned long) l); - Lst_ForEach(l, PrintAddr, (ClientData) 0); + Lst_ForEach(l, PrintAddr, (void *) 0); printf("\n"); #endif @@ -1088,12 +1088,12 @@ SuffRemoveSrc (l) while ((ln = Lst_Next (l)) != NULL) { s = (Src *) Lst_Datum (ln); if (s->children == 0) { - free ((Address)s->file); + free (s->file); if (!s->parent) - free((Address)s->pref); + free(s->pref); else { #ifdef DEBUG_SRC - LstNode ln = Lst_Member(s->parent->cp, (ClientData)s); + LstNode ln = Lst_Member(s->parent->cp, (void *)s); if (ln != NULL) Lst_Remove(s->parent->cp, ln); #endif @@ -1104,7 +1104,7 @@ SuffRemoveSrc (l) Lst_Destroy(s->cp, NOFREE); #endif Lst_Remove(l, ln); - free ((Address)s); + free (s); t |= 1; Lst_Close(l); return TRUE; @@ -1112,7 +1112,7 @@ SuffRemoveSrc (l) #ifdef DEBUG_SRC else { printf("keep: [l=%x] p=%x %d: ", l, s, s->children); - Lst_ForEach(s->cp, PrintAddr, (ClientData) 0); + Lst_ForEach(s->cp, PrintAddr, (void *) 0); printf("\n"); } #endif @@ -1179,7 +1179,7 @@ SuffFindThem (srcs, slst) } SuffAddLevel (srcs, s); - Lst_AtEnd(slst, (ClientData) s); + Lst_AtEnd(slst, (void *) s); } if (DEBUG(SUFF) && rs) { @@ -1234,7 +1234,7 @@ SuffFindCmds (targ, slst) * The node matches the prefix ok, see if it has a known * suffix. */ - ln = Lst_Find (sufflist, (ClientData)&cp[prefLen], + ln = Lst_Find (sufflist, (void *)&cp[prefLen], SuffSuffHasNameP); if (ln != NULL) { /* @@ -1246,7 +1246,7 @@ SuffFindCmds (targ, slst) suff = (Suff *)Lst_Datum (ln); if (Lst_Member (suff->parents, - (ClientData)targ->suff) != NULL) + (void *)targ->suff) != NULL) { /* * Hot Damn! Create a new Src structure to describe @@ -1266,9 +1266,9 @@ SuffFindCmds (targ, slst) #ifdef DEBUG_SRC ret->cp = Lst_Init(FALSE); printf("3 add %x %x\n", targ, ret); - Lst_AtEnd(targ->cp, (ClientData) ret); + Lst_AtEnd(targ->cp, (void *) ret); #endif - Lst_AtEnd(slst, (ClientData) ret); + Lst_AtEnd(slst, (void *) ret); if (DEBUG(SUFF)) { printf ("\tusing existing source %s\n", s->name); } @@ -1299,8 +1299,8 @@ SuffFindCmds (targ, slst) */ static int SuffExpandChildren(cgnp, pgnp) - ClientData cgnp; /* Child to examine */ - ClientData pgnp; /* Parent node being processed */ + void * cgnp; /* Child to examine */ + void * pgnp; /* Parent node being processed */ { GNode *cgn = (GNode *) cgnp; GNode *pgn = (GNode *) pgnp; @@ -1313,7 +1313,7 @@ SuffExpandChildren(cgnp, pgnp) * New nodes effectively take the place of the child, so place them * after the child */ - prevLN = Lst_Member(pgn->children, (ClientData)cgn); + prevLN = Lst_Member(pgn->children, (void *)cgn); /* * First do variable expansion -- this takes precedence over @@ -1360,7 +1360,7 @@ SuffExpandChildren(cgnp, pgnp) */ *cp++ = '\0'; gn = Targ_FindNode(start, TARG_CREATE); - (void)Lst_AtEnd(members, (ClientData)gn); + (void)Lst_AtEnd(members, (void *)gn); while (*cp == ' ' || *cp == '\t') { cp++; } @@ -1399,7 +1399,7 @@ SuffExpandChildren(cgnp, pgnp) * Stuff left over -- add it to the list too */ gn = Targ_FindNode(start, TARG_CREATE); - (void)Lst_AtEnd(members, (ClientData)gn); + (void)Lst_AtEnd(members, (void *)gn); } /* * Point cp back at the beginning again so the variable value @@ -1416,10 +1416,10 @@ SuffExpandChildren(cgnp, pgnp) if (DEBUG(SUFF)) { printf("%s...", gn->name); } - if (Lst_Member(pgn->children, (ClientData)gn) == NULL) { - (void)Lst_Append(pgn->children, prevLN, (ClientData)gn); + if (Lst_Member(pgn->children, (void *)gn) == NULL) { + (void)Lst_Append(pgn->children, prevLN, (void *)gn); prevLN = Lst_Succ(prevLN); - (void)Lst_AtEnd(gn->parents, (ClientData)pgn); + (void)Lst_AtEnd(gn->parents, (void *)pgn); pgn->unmade++; } } @@ -1433,7 +1433,7 @@ SuffExpandChildren(cgnp, pgnp) * Now the source is expanded, remove it from the list of children to * keep it from being processed. */ - ln = Lst_Member(pgn->children, (ClientData)cgn); + ln = Lst_Member(pgn->children, (void *)cgn); pgn->unmade--; Lst_Remove(pgn->children, ln); if (DEBUG(SUFF)) { @@ -1452,7 +1452,7 @@ SuffExpandChildren(cgnp, pgnp) * Else use the default system search path. */ cp = cgn->name + strlen(cgn->name); - ln = Lst_Find(sufflist, (ClientData)cp, SuffSuffIsSuffixP); + ln = Lst_Find(sufflist, (void *)cp, SuffSuffIsSuffixP); if (DEBUG(SUFF)) { printf("Wildcard expanding \"%s\"...", cgn->name); @@ -1493,10 +1493,10 @@ SuffExpandChildren(cgnp, pgnp) * If gn isn't already a child of the parent, make it so and * up the parent's count of unmade children. */ - if (Lst_Member(pgn->children, (ClientData)gn) == NULL) { - (void)Lst_Append(pgn->children, prevLN, (ClientData)gn); + if (Lst_Member(pgn->children, (void *)gn) == NULL) { + (void)Lst_Append(pgn->children, prevLN, (void *)gn); prevLN = Lst_Succ(prevLN); - (void)Lst_AtEnd(gn->parents, (ClientData)pgn); + (void)Lst_AtEnd(gn->parents, (void *)pgn); pgn->unmade++; } } @@ -1510,7 +1510,7 @@ SuffExpandChildren(cgnp, pgnp) * Now the source is expanded, remove it from the list of children to * keep it from being processed. */ - ln = Lst_Member(pgn->children, (ClientData)cgn); + ln = Lst_Member(pgn->children, (void *)cgn); pgn->unmade--; Lst_Remove(pgn->children, ln); if (DEBUG(SUFF)) { @@ -1550,13 +1550,13 @@ SuffApplyTransform(tGn, sGn, t, s) char *tname; /* Name of transformation rule */ GNode *gn; /* Node for same */ - if (Lst_Member(tGn->children, (ClientData)sGn) == NULL) { + if (Lst_Member(tGn->children, (void *)sGn) == NULL) { /* * Not already linked, so form the proper links between the * target and source. */ - (void)Lst_AtEnd(tGn->children, (ClientData)sGn); - (void)Lst_AtEnd(sGn->parents, (ClientData)tGn); + (void)Lst_AtEnd(tGn->children, (void *)sGn); + (void)Lst_AtEnd(sGn->parents, (void *)tGn); tGn->unmade += 1; } @@ -1570,13 +1570,13 @@ SuffApplyTransform(tGn, sGn, t, s) for (ln=Lst_First(sGn->cohorts); ln != NULL; ln=Lst_Succ(ln)) { gn = (GNode *)Lst_Datum(ln); - if (Lst_Member(tGn->children, (ClientData)gn) == NULL) { + if (Lst_Member(tGn->children, (void *)gn) == NULL) { /* * Not already linked, so form the proper links between the * target and source. */ - (void)Lst_AtEnd(tGn->children, (ClientData)gn); - (void)Lst_AtEnd(gn->parents, (ClientData)tGn); + (void)Lst_AtEnd(tGn->children, (void *)gn); + (void)Lst_AtEnd(gn->parents, (void *)tGn); tGn->unmade += 1; } } @@ -1585,7 +1585,7 @@ SuffApplyTransform(tGn, sGn, t, s) * Locate the transformation rule itself */ tname = str_concat(s->name, t->name, 0); - ln = Lst_Find(transforms, (ClientData)tname, SuffGNHasNameP); + ln = Lst_Find(transforms, (void *)tname, SuffGNHasNameP); free(tname); if (ln == NULL) { @@ -1619,14 +1619,14 @@ SuffApplyTransform(tGn, sGn, t, s) ln = Lst_Succ(ln); if (ln != NULL) { Lst_ForEachFrom(tGn->children, ln, - SuffExpandChildren, (ClientData)tGn); + SuffExpandChildren, (void *)tGn); } /* * Keep track of another parent to which this beast is transformed so * the .IMPSRC variable can be set correctly for the parent. */ - (void)Lst_AtEnd(sGn->iParents, (ClientData)tGn); + (void)Lst_AtEnd(sGn->iParents, (void *)tGn); return(TRUE); } @@ -1686,9 +1686,9 @@ SuffFindArchiveDeps(gn, slst) /* * Create the link between the two nodes right off */ - if (Lst_Member(gn->children, (ClientData)mem) == NULL) { - (void)Lst_AtEnd(gn->children, (ClientData)mem); - (void)Lst_AtEnd(mem->parents, (ClientData)gn); + if (Lst_Member(gn->children, (void *)mem) == NULL) { + (void)Lst_AtEnd(gn->children, (void *)mem); + (void)Lst_AtEnd(mem->parents, (void *)gn); gn->unmade += 1; } @@ -1871,7 +1871,7 @@ SuffFindNormalDeps(gn, slst) /* * Record the target so we can nuke it */ - (void)Lst_AtEnd(targs, (ClientData)targ); + (void)Lst_AtEnd(targs, (void *)targ); /* * Search from this suffix's successor... @@ -1914,7 +1914,7 @@ SuffFindNormalDeps(gn, slst) if (DEBUG(SUFF)) printf("adding suffix rules\n"); - (void)Lst_AtEnd(targs, (ClientData)targ); + (void)Lst_AtEnd(targs, (void *)targ); } /* @@ -1957,7 +1957,7 @@ SuffFindNormalDeps(gn, slst) * Now we've got the important local variables set, expand any sources * that still contain variables or wildcards in their names. */ - Lst_ForEach(gn->children, SuffExpandChildren, (ClientData)gn); + Lst_ForEach(gn->children, SuffExpandChildren, (void *)gn); if (targ == NULL) { if (DEBUG(SUFF)) { @@ -2059,8 +2059,8 @@ sfnd_abort: * up to, but not including, the parent node. */ while (bottom && bottom->parent != NULL) { - if (Lst_Member(slst, (ClientData) bottom) == NULL) { - Lst_AtEnd(slst, (ClientData) bottom); + if (Lst_Member(slst, (void *) bottom) == NULL) { + Lst_AtEnd(slst, (void *) bottom); } bottom = bottom->parent; } @@ -2141,8 +2141,8 @@ sfnd_abort: */ sfnd_return: if (bottom) - if (Lst_Member(slst, (ClientData) bottom) == NULL) - Lst_AtEnd(slst, (ClientData) bottom); + if (Lst_Member(slst, (void *) bottom) == NULL) + Lst_AtEnd(slst, (void *) bottom); while (SuffRemoveSrc(srcs) || SuffRemoveSrc(targs)) continue; @@ -2223,7 +2223,7 @@ SuffFindDeps (gn, slst) LstNode ln; Suff *s; - ln = Lst_Find (sufflist, (ClientData)LIBSUFF, SuffSuffHasNameP); + ln = Lst_Find (sufflist, (void *)LIBSUFF, SuffSuffHasNameP); if (gn->suffix) gn->suffix->refCount--; if (ln != NULL) { @@ -2269,7 +2269,7 @@ Suff_SetNull(name) Suff *s; LstNode ln; - ln = Lst_Find(sufflist, (ClientData)name, SuffSuffHasNameP); + ln = Lst_Find(sufflist, (void *)name, SuffSuffHasNameP); if (ln != NULL) { s = (Suff *)Lst_Datum(ln); if (suffNull != (Suff *)NULL) { @@ -2356,8 +2356,8 @@ Suff_End() /********************* DEBUGGING FUNCTIONS **********************/ static int SuffPrintName(s, dummy) - ClientData s; - ClientData dummy; + void * s; + void * dummy; { printf ("%s ", ((Suff *) s)->name); return (dummy ? 0 : 0); @@ -2365,8 +2365,8 @@ static int SuffPrintName(s, dummy) static int SuffPrintSuff (sp, dummy) - ClientData sp; - ClientData dummy; + void * sp; + void * dummy; { Suff *s = (Suff *) sp; int flags; @@ -2396,10 +2396,10 @@ SuffPrintSuff (sp, dummy) } fputc ('\n', stdout); printf ("#\tTo: "); - Lst_ForEach (s->parents, SuffPrintName, (ClientData)0); + Lst_ForEach (s->parents, SuffPrintName, (void *)0); fputc ('\n', stdout); printf ("#\tFrom: "); - Lst_ForEach (s->children, SuffPrintName, (ClientData)0); + Lst_ForEach (s->children, SuffPrintName, (void *)0); fputc ('\n', stdout); printf ("#\tSearch Path: "); Dir_PrintPath (s->searchPath); @@ -2409,15 +2409,15 @@ SuffPrintSuff (sp, dummy) static int SuffPrintTrans (tp, dummy) - ClientData tp; - ClientData dummy; + void * tp; + void * dummy; { GNode *t = (GNode *) tp; printf ("%-16s: ", t->name); Targ_PrintType (t->type); fputc ('\n', stdout); - Lst_ForEach (t->commands, Targ_PrintCmd, (ClientData)0); + Lst_ForEach (t->commands, Targ_PrintCmd, (void *)0); fputc ('\n', stdout); return(dummy ? 0 : 0); } @@ -2426,8 +2426,8 @@ void Suff_PrintAll() { printf ("#*** Suffixes:\n"); - Lst_ForEach (sufflist, SuffPrintSuff, (ClientData)0); + Lst_ForEach (sufflist, SuffPrintSuff, (void *)0); printf ("#*** Transformations:\n"); - Lst_ForEach (transforms, SuffPrintTrans, (ClientData)0); + Lst_ForEach (transforms, SuffPrintTrans, (void *)0); } diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c index fa43e8bea28e..8e13e69f39ff 100644 --- a/usr.bin/make/targ.c +++ b/usr.bin/make/targ.c @@ -96,10 +96,10 @@ static Hash_Table targets; /* a hash table of same */ #define HTSIZE 191 /* initial size of hash table */ -static int TargPrintOnlySrc __P((ClientData, ClientData)); -static int TargPrintName __P((ClientData, ClientData)); -static int TargPrintNode __P((ClientData, ClientData)); -static void TargFreeGN __P((ClientData)); +static int TargPrintOnlySrc __P((void *, void *)); +static int TargPrintName __P((void *, void *)); +static int TargPrintNode __P((void *, void *)); +static void TargFreeGN __P((void *)); /*- *----------------------------------------------------------------------- @@ -186,7 +186,7 @@ Targ_NewGN (name) if (allGNs == NULL) allGNs = Lst_Init(FALSE); - Lst_AtEnd(allGNs, (ClientData) gn); + Lst_AtEnd(allGNs, (void *) gn); return (gn); } @@ -205,7 +205,7 @@ Targ_NewGN (name) */ static void TargFreeGN (gnp) - ClientData gnp; + void * gnp; { GNode *gn = (GNode *) gnp; @@ -221,7 +221,7 @@ TargFreeGN (gnp) Lst_Destroy(gn->preds, NOFREE); Lst_Destroy(gn->context, NOFREE); Lst_Destroy(gn->commands, NOFREE); - free((Address)gn); + free(gn); } @@ -256,7 +256,7 @@ Targ_FindNode (name, flags) if (isNew) { gn = Targ_NewGN (name); Hash_SetValue (he, gn); - (void) Lst_AtEnd (allTargets, (ClientData)gn); + (void) Lst_AtEnd (allTargets, (void *)gn); } } else { he = Hash_FindEntry (&targets, name); @@ -309,7 +309,7 @@ Targ_FindList (names, flags) * are added to the list in the order in which they were * encountered in the makefile. */ - (void) Lst_AtEnd (nodes, (ClientData)gn); + (void) Lst_AtEnd (nodes, (void *)gn); if (gn->type & OP_DOUBLEDEP) { (void)Lst_Concat (nodes, gn->cohorts, LST_CONCNEW); } @@ -415,8 +415,8 @@ Targ_SetMain (gn) static int TargPrintName (gnp, ppath) - ClientData gnp; - ClientData ppath; + void * gnp; + void * ppath; { GNode *gn = (GNode *) gnp; printf ("%s ", gn->name); @@ -436,8 +436,8 @@ TargPrintName (gnp, ppath) int Targ_PrintCmd (cmd, dummy) - ClientData cmd; - ClientData dummy; + void * cmd; + void * dummy; { printf ("\t%s\n", (char *) cmd); return (dummy ? 0 : 0); @@ -530,8 +530,8 @@ Targ_PrintType (type) */ static int TargPrintNode (gnp, passp) - ClientData gnp; - ClientData passp; + void * gnp; + void * passp; { GNode *gn = (GNode *) gnp; int pass = *(int *) passp; @@ -566,13 +566,13 @@ TargPrintNode (gnp, passp) } if (!Lst_IsEmpty (gn->iParents)) { printf("# implicit parents: "); - Lst_ForEach (gn->iParents, TargPrintName, (ClientData)0); + Lst_ForEach (gn->iParents, TargPrintName, (void *)0); fputc ('\n', stdout); } } if (!Lst_IsEmpty (gn->parents)) { printf("# parents: "); - Lst_ForEach (gn->parents, TargPrintName, (ClientData)0); + Lst_ForEach (gn->parents, TargPrintName, (void *)0); fputc ('\n', stdout); } @@ -586,12 +586,12 @@ TargPrintNode (gnp, passp) printf(":: "); break; } Targ_PrintType (gn->type); - Lst_ForEach (gn->children, TargPrintName, (ClientData)0); + Lst_ForEach (gn->children, TargPrintName, (void *)0); fputc ('\n', stdout); - Lst_ForEach (gn->commands, Targ_PrintCmd, (ClientData)0); + Lst_ForEach (gn->commands, Targ_PrintCmd, (void *)0); printf("\n\n"); if (gn->type & OP_DOUBLEDEP) { - Lst_ForEach (gn->cohorts, TargPrintNode, (ClientData)&pass); + Lst_ForEach (gn->cohorts, TargPrintNode, (void *)&pass); } } return (0); @@ -612,8 +612,8 @@ TargPrintNode (gnp, passp) */ static int TargPrintOnlySrc(gnp, dummy) - ClientData gnp; - ClientData dummy; + void * gnp; + void * dummy; { GNode *gn = (GNode *) gnp; if (OP_NOP(gn->type)) @@ -640,10 +640,10 @@ Targ_PrintGraph (pass) * 2 => processing done */ { printf("#*** Input graph:\n"); - Lst_ForEach (allTargets, TargPrintNode, (ClientData)&pass); + Lst_ForEach (allTargets, TargPrintNode, (void *)&pass); printf("\n\n"); printf("#\n# Files that are only sources:\n"); - Lst_ForEach (allTargets, TargPrintOnlySrc, (ClientData) 0); + Lst_ForEach (allTargets, TargPrintOnlySrc, (void *) 0); printf("#*** Global Variables:\n"); Var_Dump (VAR_GLOBAL); printf("#*** Command-line Variables:\n"); diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index 92a345de192c..12cd4f50828d 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -168,29 +168,29 @@ typedef struct { int flags; } VarREPattern; -static int VarCmp __P((ClientData, ClientData)); +static int VarCmp __P((void *, void *)); static Var *VarFind __P((char *, GNode *, int)); static void VarAdd __P((char *, char *, GNode *)); -static void VarDelete __P((ClientData)); -static Boolean VarHead __P((char *, Boolean, Buffer, ClientData)); -static Boolean VarTail __P((char *, Boolean, Buffer, ClientData)); -static Boolean VarSuffix __P((char *, Boolean, Buffer, ClientData)); -static Boolean VarRoot __P((char *, Boolean, Buffer, ClientData)); -static Boolean VarMatch __P((char *, Boolean, Buffer, ClientData)); +static void VarDelete __P((void *)); +static Boolean VarHead __P((char *, Boolean, Buffer, void *)); +static Boolean VarTail __P((char *, Boolean, Buffer, void *)); +static Boolean VarSuffix __P((char *, Boolean, Buffer, void *)); +static Boolean VarRoot __P((char *, Boolean, Buffer, void *)); +static Boolean VarMatch __P((char *, Boolean, Buffer, void *)); #ifdef SYSVVARSUB -static Boolean VarSYSVMatch __P((char *, Boolean, Buffer, ClientData)); +static Boolean VarSYSVMatch __P((char *, Boolean, Buffer, void *)); #endif -static Boolean VarNoMatch __P((char *, Boolean, Buffer, ClientData)); +static Boolean VarNoMatch __P((char *, Boolean, Buffer, void *)); static void VarREError __P((int, regex_t *, const char *)); -static Boolean VarRESubstitute __P((char *, Boolean, Buffer, ClientData)); -static Boolean VarSubstitute __P((char *, Boolean, Buffer, ClientData)); +static Boolean VarRESubstitute __P((char *, Boolean, Buffer, void *)); +static Boolean VarSubstitute __P((char *, Boolean, Buffer, void *)); static char *VarGetPattern __P((GNode *, int, char **, int, int *, int *, VarPattern *)); static char *VarQuote __P((char *)); static char *VarModify __P((char *, Boolean (*)(char *, Boolean, Buffer, - ClientData), - ClientData)); -static int VarPrintVar __P((ClientData, ClientData)); + void *), + void *)); +static int VarPrintVar __P((void *, void *)); /*- *----------------------------------------------------------------------- @@ -207,8 +207,8 @@ static int VarPrintVar __P((ClientData, ClientData)); */ static int VarCmp (v, name) - ClientData v; /* VAR structure to compare */ - ClientData name; /* name to look for */ + void * v; /* VAR structure to compare */ + void * name; /* name to look for */ { return (strcmp ((char *) name, ((Var *) v)->name)); } @@ -282,8 +282,8 @@ VarFind (name, ctxt, flags) * Note whether this is one of the specific variables we were told through * the -E flag to use environment-variable-override for. */ - if (Lst_Find (envFirstVars, (ClientData)name, - (int (*)(ClientData, ClientData)) strcmp) != NULL) + if (Lst_Find (envFirstVars, (void *)name, + (int (*)(void *, void *)) strcmp) != NULL) { localCheckEnvFirst = TRUE; } else { @@ -295,15 +295,15 @@ VarFind (name, ctxt, flags) * look for it in VAR_CMD, VAR_GLOBAL and the environment, in that order, * depending on the FIND_* flags in 'flags' */ - var = Lst_Find (ctxt->context, (ClientData)name, VarCmp); + var = Lst_Find (ctxt->context, (void *)name, VarCmp); if ((var == NULL) && (flags & FIND_CMD) && (ctxt != VAR_CMD)) { - var = Lst_Find (VAR_CMD->context, (ClientData)name, VarCmp); + var = Lst_Find (VAR_CMD->context, (void *)name, VarCmp); } if ((var == NULL) && (flags & FIND_GLOBAL) && (ctxt != VAR_GLOBAL) && !checkEnvFirst && !localCheckEnvFirst) { - var = Lst_Find (VAR_GLOBAL->context, (ClientData)name, VarCmp); + var = Lst_Find (VAR_GLOBAL->context, (void *)name, VarCmp); } if ((var == NULL) && (flags & FIND_ENV)) { char *env; @@ -324,7 +324,7 @@ VarFind (name, ctxt, flags) } else if ((checkEnvFirst || localCheckEnvFirst) && (flags & FIND_GLOBAL) && (ctxt != VAR_GLOBAL)) { - var = Lst_Find (VAR_GLOBAL->context, (ClientData)name, VarCmp); + var = Lst_Find (VAR_GLOBAL->context, (void *)name, VarCmp); if (var == NULL) { return ((Var *) NULL); } else { @@ -373,8 +373,8 @@ VarAdd (name, val, ctxt) v->flags = 0; - (void) Lst_AtFront (ctxt->context, (ClientData)v); - (void) Lst_AtEnd (allVars, (ClientData) v); + (void) Lst_AtFront (ctxt->context, (void *)v); + (void) Lst_AtEnd (allVars, (void *) v); if (DEBUG(VAR)) { printf("%s:%s = %s\n", ctxt->name, name, val); } @@ -395,12 +395,12 @@ VarAdd (name, val, ctxt) */ static void VarDelete(vp) - ClientData vp; + void * vp; { Var *v = (Var *) vp; free(v->name); Buf_Destroy(v->val, TRUE); - free((Address) v); + free(v); } @@ -428,7 +428,7 @@ Var_Delete(name, ctxt) if (DEBUG(VAR)) { printf("%s:delete %s\n", ctxt->name, name); } - ln = Lst_Find(ctxt->context, (ClientData)name, VarCmp); + ln = Lst_Find(ctxt->context, (void *)name, VarCmp); if (ln != NULL) { register Var *v; @@ -436,7 +436,7 @@ Var_Delete(name, ctxt) Lst_Remove(ctxt->context, ln); ln = Lst_Member(allVars, v); Lst_Remove(allVars, ln); - VarDelete((ClientData) v); + VarDelete((void *) v); } } @@ -545,7 +545,7 @@ Var_Append (name, val, ctxt) * export other variables...) */ v->flags &= ~VAR_FROM_ENV; - Lst_AtFront(ctxt->context, (ClientData)v); + Lst_AtFront(ctxt->context, (void *)v); } } } @@ -608,7 +608,7 @@ Var_Value (name, ctxt, frp) char *p = ((char *)Buf_GetAll(v->val, (int *)NULL)); if (v->flags & VAR_FROM_ENV) { Buf_Destroy(v->val, FALSE); - free((Address) v); + free(v); *frp = p; } return p; @@ -638,7 +638,7 @@ VarHead (word, addSpace, buf, dummy) Boolean addSpace; /* True if need to add a space to the buffer * before sticking in the head */ Buffer buf; /* Buffer in which to store it */ - ClientData dummy; + void * dummy; { register char *slash; @@ -685,7 +685,7 @@ VarTail (word, addSpace, buf, dummy) Boolean addSpace; /* TRUE if need to stick a space in the * buffer before adding the tail */ Buffer buf; /* Buffer in which to store it */ - ClientData dummy; + void * dummy; { register char *slash; @@ -724,7 +724,7 @@ VarSuffix (word, addSpace, buf, dummy) Boolean addSpace; /* TRUE if need to add a space before placing * the suffix in the buffer */ Buffer buf; /* Buffer in which to store it */ - ClientData dummy; + void * dummy; { register char *dot; @@ -762,7 +762,7 @@ VarRoot (word, addSpace, buf, dummy) Boolean addSpace; /* TRUE if need to add a space to the buffer * before placing the root in it */ Buffer buf; /* Buffer in which to store it */ - ClientData dummy; + void * dummy; { register char *dot; @@ -803,7 +803,7 @@ VarMatch (word, addSpace, buf, pattern) * buffer before adding the word, if it * matches */ Buffer buf; /* Buffer in which to store it */ - ClientData pattern; /* Pattern the word must match */ + void * pattern; /* Pattern the word must match */ { if (Str_Match(word, (char *) pattern)) { if (addSpace) { @@ -839,7 +839,7 @@ VarSYSVMatch (word, addSpace, buf, patp) * buffer before adding the word, if it * matches */ Buffer buf; /* Buffer in which to store it */ - ClientData patp; /* Pattern the word must match */ + void * patp; /* Pattern the word must match */ { int len; char *ptr; @@ -882,7 +882,7 @@ VarNoMatch (word, addSpace, buf, pattern) * buffer before adding the word, if it * matches */ Buffer buf; /* Buffer in which to store it */ - ClientData pattern; /* Pattern the word must match */ + void * pattern; /* Pattern the word must match */ { if (!Str_Match(word, (char *) pattern)) { if (addSpace) { @@ -915,7 +915,7 @@ VarSubstitute (word, addSpace, buf, patternp) Boolean addSpace; /* True if space should be added before * other characters */ Buffer buf; /* Buffer for result */ - ClientData patternp; /* Pattern for substitution */ + void * patternp; /* Pattern for substitution */ { register int wordLen; /* Length of word */ register char *cp; /* General pointer */ @@ -1112,7 +1112,7 @@ VarRESubstitute(word, addSpace, buf, patternp) char *word; Boolean addSpace; Buffer buf; - ClientData patternp; + void * patternp; { VarREPattern *pat; int xrv; @@ -1243,8 +1243,8 @@ static char * VarModify (str, modProc, datum) char *str; /* String whose words should be trimmed */ /* Function to use to modify them */ - Boolean (*modProc) __P((char *, Boolean, Buffer, ClientData)); - ClientData datum; /* Datum to pass it */ + Boolean (*modProc) __P((char *, Boolean, Buffer, void *)); + void * datum; /* Datum to pass it */ { Buffer buf; /* Buffer for the new string */ Boolean addSpace; /* TRUE if need to add a space to the @@ -1608,9 +1608,9 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) val = (char *)Buf_GetAll(v->val, (int *)NULL); if (str[1] == 'D') { - val = VarModify(val, VarHead, (ClientData)0); + val = VarModify(val, VarHead, (void *)0); } else { - val = VarModify(val, VarTail, (ClientData)0); + val = VarModify(val, VarTail, (void *)0); } /* * Resulting string is dynamically allocated, so @@ -1830,10 +1830,10 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) pattern = &tstr[1]; } if (*tstr == 'M' || *tstr == 'm') { - newStr = VarModify(str, VarMatch, (ClientData)pattern); + newStr = VarModify(str, VarMatch, (void *)pattern); } else { newStr = VarModify(str, VarNoMatch, - (ClientData)pattern); + (void *)pattern); } if (copy) { free(pattern); @@ -2004,7 +2004,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) termc = *cp; newStr = VarModify(str, VarSubstitute, - (ClientData)&pattern); + (void *)&pattern); /* * Free the two strings. */ @@ -2081,7 +2081,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) pattern.matches = emalloc(pattern.nsub * sizeof(regmatch_t)); newStr = VarModify(str, VarRESubstitute, - (ClientData) &pattern); + (void *) &pattern); regfree(&pattern.re); free(pattern.replace); free(pattern.matches); @@ -2097,7 +2097,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) /*FALLTHRU*/ case 'T': if (tstr[1] == endc || tstr[1] == ':') { - newStr = VarModify (str, VarTail, (ClientData)0); + newStr = VarModify (str, VarTail, (void *)0); cp = tstr + 1; termc = *cp; break; @@ -2105,7 +2105,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) /*FALLTHRU*/ case 'H': if (tstr[1] == endc || tstr[1] == ':') { - newStr = VarModify (str, VarHead, (ClientData)0); + newStr = VarModify (str, VarHead, (void *)0); cp = tstr + 1; termc = *cp; break; @@ -2113,7 +2113,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) /*FALLTHRU*/ case 'E': if (tstr[1] == endc || tstr[1] == ':') { - newStr = VarModify (str, VarSuffix, (ClientData)0); + newStr = VarModify (str, VarSuffix, (void *)0); cp = tstr + 1; termc = *cp; break; @@ -2121,7 +2121,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) /*FALLTHRU*/ case 'R': if (tstr[1] == endc || tstr[1] == ':') { - newStr = VarModify (str, VarRoot, (ClientData)0); + newStr = VarModify (str, VarRoot, (void *)0); cp = tstr + 1; termc = *cp; break; @@ -2201,7 +2201,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) * string. Note the pattern is anchored at the end. */ newStr = VarModify(str, VarSYSVMatch, - (ClientData)&pattern); + (void *)&pattern); /* * Restore the nulled characters @@ -2263,7 +2263,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) *freePtr = TRUE; } Buf_Destroy(v->val, destroy); - free((Address)v); + free(v); } else if (v->flags & VAR_JUNK) { /* * Perform any free'ing needed and set *freePtr to FALSE so the caller @@ -2274,7 +2274,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr) } *freePtr = FALSE; Buf_Destroy(v->val, TRUE); - free((Address)v); + free(v); if (dynamic) { str = emalloc(*lengthPtr + 1); strncpy(str, start, *lengthPtr); @@ -2441,7 +2441,7 @@ Var_Subst (var, str, ctxt, undefErr) */ Buf_AddBytes (buf, strlen (val), (Byte *)val); if (doFree) { - free ((Address)val); + free (val); } } } @@ -2471,7 +2471,7 @@ char * Var_GetTail(file) char *file; /* Filename to modify */ { - return(VarModify(file, VarTail, (ClientData)0)); + return(VarModify(file, VarTail, (void *)0)); } /*- @@ -2493,7 +2493,7 @@ char * Var_GetHead(file) char *file; /* Filename to manipulate */ { - return(VarModify(file, VarHead, (ClientData)0)); + return(VarModify(file, VarHead, (void *)0)); } /*- @@ -2528,8 +2528,8 @@ Var_End () /****************** PRINT DEBUGGING INFO *****************/ static int VarPrintVar (vp, dummy) - ClientData vp; - ClientData dummy; + void * vp; + void * dummy; { Var *v = (Var *) vp; printf ("%-16s = %s\n", v->name, (char *) Buf_GetAll(v->val, (int *)NULL)); @@ -2546,5 +2546,5 @@ void Var_Dump (ctxt) GNode *ctxt; { - Lst_ForEach (ctxt->context, VarPrintVar, (ClientData) 0); + Lst_ForEach (ctxt->context, VarPrintVar, (void *) 0); }