summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-06-10 01:41:08 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-06-10 01:41:08 +0000
commit69d6992183cedaf529b0a58bb5533295806df7fc (patch)
treeed4c3f1e279bdf396098b56122e8fe183d10f770
parent2e26084dfa835db1e3793f42d67432d67dceb0bc (diff)
Clean-up patch: use `void *' instead of old-fashioned ClientData/Address.
-rw-r--r--usr.bin/make/arch.c35
-rw-r--r--usr.bin/make/compat.c16
-rw-r--r--usr.bin/make/cond.c16
-rw-r--r--usr.bin/make/dir.c39
-rw-r--r--usr.bin/make/dir.h6
-rw-r--r--usr.bin/make/extern.h8
-rw-r--r--usr.bin/make/for.c10
-rw-r--r--usr.bin/make/hash.h6
-rw-r--r--usr.bin/make/job.c56
-rw-r--r--usr.bin/make/lst.h32
-rw-r--r--usr.bin/make/lst.lib/lstAppend.c6
-rw-r--r--usr.bin/make/lst.lib/lstAtEnd.c6
-rw-r--r--usr.bin/make/lst.lib/lstAtFront.c8
-rw-r--r--usr.bin/make/lst.lib/lstConcat.c6
-rw-r--r--usr.bin/make/lst.lib/lstDatum.c6
-rw-r--r--usr.bin/make/lst.lib/lstDeQueue.c8
-rw-r--r--usr.bin/make/lst.lib/lstDestroy.c12
-rw-r--r--usr.bin/make/lst.lib/lstDupl.c6
-rw-r--r--usr.bin/make/lst.lib/lstEnQueue.c6
-rw-r--r--usr.bin/make/lst.lib/lstFindFrom.c6
-rw-r--r--usr.bin/make/lst.lib/lstForEachFrom.c6
-rw-r--r--usr.bin/make/lst.lib/lstInsert.c8
-rw-r--r--usr.bin/make/lst.lib/lstInt.h4
-rw-r--r--usr.bin/make/lst.lib/lstMember.c8
-rw-r--r--usr.bin/make/lst.lib/lstRemove.c6
-rw-r--r--usr.bin/make/lst.lib/lstReplace.c10
-rw-r--r--usr.bin/make/main.c19
-rw-r--r--usr.bin/make/make.c34
-rw-r--r--usr.bin/make/parse.c58
-rw-r--r--usr.bin/make/sprite.h41
-rw-r--r--usr.bin/make/suff.c92
-rw-r--r--usr.bin/make/targ.c28
-rw-r--r--usr.bin/make/var.c90
33 files changed, 330 insertions, 368 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index 697a3a4346a..fdea6a5b913 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arch.c,v 1.26 2000/03/26 16:21:32 espie Exp $ */
+/* $OpenBSD: arch.c,v 1.27 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: arch.c,v 1.26 2000/03/26 16:21:32 espie Exp $";
+static char rcsid[] = "$OpenBSD: arch.c,v 1.27 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -129,9 +129,9 @@ typedef struct Arch {
size_t fnamesize; /* Size of the string table */
} Arch;
-static int ArchFindArchive __P((ClientData, ClientData));
+static int ArchFindArchive __P((void *, void *));
#ifdef CLEANUP
-static void ArchFree __P((ClientData));
+static void ArchFree __P((void *));
#endif
static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));
static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));
@@ -158,7 +158,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;
@@ -168,12 +168,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);
}
#endif
@@ -443,10 +443,10 @@ 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));
+ return strcmp ((char *)archName, ((Arch *)ar)->name);
}
/*-
@@ -634,10 +634,9 @@ ArchStatMember (archive, member, hash)
}
#endif
- he = Hash_CreateEntry (&ar->members, memName, NULL);
- Hash_SetValue (he, emalloc (sizeof (struct ar_hdr)));
- memcpy ((Address)Hash_GetValue (he), (Address)&arh,
- sizeof (struct ar_hdr));
+ he = Hash_CreateEntry(&ar->members, memName, NULL);
+ Hash_SetValue(he, emalloc(sizeof(struct ar_hdr)));
+ memcpy(Hash_GetValue(he), &arh, sizeof(struct ar_hdr));
}
fseek (arch, (size + 1) & ~1, SEEK_CUR);
}
@@ -659,11 +658,11 @@ ArchStatMember (archive, member, hash)
}
badarch:
- fclose (arch);
- Hash_DeleteTable (&ar->members);
+ fclose(arch);
+ Hash_DeleteTable(&ar->members);
efree(ar->fnametab);
- free ((Address)ar);
- return (NULL);
+ free(ar);
+ return NULL;
}
#ifdef SVR4ARCHIVES
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index baf71114f4e..73745dc2024 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat.c,v 1.26 2000/06/10 01:32:22 espie Exp $ */
+/* $OpenBSD: compat.c,v 1.27 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: compat.c,v 1.26 2000/06/10 01:32:22 espie Exp $";
+static char rcsid[] = "$OpenBSD: compat.c,v 1.27 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -84,8 +84,8 @@ static char meta[256];
static GNode *curTarg = NULL;
static GNode *ENDNode;
static void CompatInterrupt __P((int));
-static int CompatRunCommand __P((ClientData, ClientData));
-static void CompatMake __P((ClientData, ClientData));
+static int CompatRunCommand __P((void *, void *));
+static void CompatMake __P((void *, void *));
static int shellneed __P((char **av));
/*-
@@ -200,8 +200,8 @@ shellneed (av)
*/
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 */
char *cp, *bp = NULL;
@@ -430,8 +430,8 @@ CompatRunCommand (cmdp, gnp)
*/
static void
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;
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 7dfc9b29815..082a57a1c70 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cond.c,v 1.16 2000/04/17 23:50:45 espie Exp $ */
+/* $OpenBSD: cond.c,v 1.17 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: cond.c,v 1.7 1996/11/06 17:59:02 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: cond.c,v 1.16 2000/04/17 23:50:45 espie Exp $";
+static char rcsid[] = "$OpenBSD: cond.c,v 1.17 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -104,7 +104,7 @@ typedef enum {
static void CondPushBack __P((Token));
static Boolean CondGetArg __P((char **, char **, size_t *, char *, Boolean));
static Boolean CondDoDefined __P((size_t, char *));
-static int CondStrMatch __P((ClientData, ClientData));
+static int CondStrMatch __P((void *, void *));
static Boolean CondDoMake __P((size_t, char *));
static Boolean CondDoExists __P((size_t, char *));
static Boolean CondDoTarget __P((size_t, char *));
@@ -307,18 +307,14 @@ CondDoDefined(argLen, arg)
*
* Results:
* 0 if string matches pattern
- *
- * Side Effects:
- * None
- *
*-----------------------------------------------------------------------
*/
static int
CondStrMatch(string, pattern)
- ClientData string;
- ClientData pattern;
+ void *string;
+ void *pattern;
{
- return(!Str_Match((char *) string,(char *) pattern));
+ return !Str_Match((char *)string,(char *)pattern);
}
/*-
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index 3bbd7c98824..ee7dd6f1a31 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.18 2000/06/10 01:32:22 espie Exp $ */
+/* $OpenBSD: dir.c,v 1.19 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: dir.c,v 1.14 1997/03/29 16:51:26 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: dir.c,v 1.18 2000/06/10 01:32:22 espie Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.19 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -193,12 +193,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 void DirPrintWord __P((ClientData));
-static void DirPrintDir __P((ClientData));
+static void DirPrintWord __P((void *));
+static void DirPrintDir __P((void *));
/*-
*-----------------------------------------------------------------------
@@ -277,10 +277,10 @@ 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));
+ return strcmp(((Path *)p)->name, (char *)dname);
}
/*-
@@ -540,7 +540,7 @@ DirExpandInt(word, path, expansions)
*/
static void
DirPrintWord(word)
- ClientData word;
+ void *word;
{
printf("%s ", (char *)word);
}
@@ -872,7 +872,7 @@ Dir_FindFile (name, path)
entry = Hash_CreateEntry(&mtimes, (char *) file,
(Boolean *)NULL);
/* XXX */
- Hash_SetValue(entry, (ClientData)((long)stb.st_mtime));
+ Hash_SetValue(entry, (void *)((long)stb.st_mtime));
nearmisses += 1;
return (file);
} else {
@@ -951,7 +951,7 @@ Dir_FindFile (name, path)
name);
}
/* XXX */
- Hash_SetValue(entry, (ClientData)(long)stb.st_mtime);
+ Hash_SetValue(entry, (void *)(long)stb.st_mtime);
return (estrdup (name));
} else {
if (DEBUG(DIR)) {
@@ -1126,11 +1126,11 @@ Dir_AddDir (path, name)
*
*-----------------------------------------------------------------------
*/
-ClientData
+void *
Dir_CopyDir(p)
- ClientData p;
+ void *p;
{
- ((Path *) p)->refCount += 1;
+ ((Path *)p)->refCount += 1;
return p;
}
@@ -1193,7 +1193,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;
@@ -1205,8 +1205,8 @@ Dir_Destroy (pp)
Lst_Remove(openDirectories, ln);
Hash_DeleteTable (&p->files);
- free((Address)p->name);
- free((Address)p);
+ free(p->name);
+ free(p);
}
}
@@ -1287,8 +1287,9 @@ Dir_PrintDirectories()
}
}
-static void DirPrintDir(p)
- ClientData p;
+static void
+DirPrintDir(p)
+ void *p;
{
printf("%s ", ((Path *)p)->name);
}
diff --git a/usr.bin/make/dir.h b/usr.bin/make/dir.h
index 077530d4d63..114895faafb 100644
--- a/usr.bin/make/dir.h
+++ b/usr.bin/make/dir.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.h,v 1.5 2000/02/02 13:47:47 espie Exp $ */
+/* $OpenBSD: dir.h,v 1.6 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: dir.h,v 1.4 1996/11/06 17:59:05 christos Exp $ */
/*
@@ -67,7 +67,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/extern.h b/usr.bin/make/extern.h
index 7e144fdf54f..c45a9c871c5 100644
--- a/usr.bin/make/extern.h
+++ b/usr.bin/make/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.21 2000/06/10 01:32:22 espie Exp $ */
+/* $OpenBSD: extern.h,v 1.22 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: nonints.h,v 1.12 1996/11/06 17:59:19 christos Exp $ */
/*-
@@ -75,7 +75,7 @@ void Error __P((char *, ...));
void Fatal __P((char *, ...));
void Punt __P((char *, ...));
void DieHorribly __P((void));
-void PrintAddr __P((ClientData));
+void PrintAddr __P((void *));
void Finish __P((int));
/* make.c */
@@ -114,7 +114,7 @@ char *interval_dup __P((const char *begin, const char *end));
void Suff_ClearSuffixes __P((void));
Boolean Suff_IsTransform __P((char *));
GNode *Suff_AddTransform __P((char *));
-void Suff_EndTransform __P((ClientData));
+void Suff_EndTransform __P((void *));
void Suff_AddSuffix __P((char *));
Lst Suff_GetPath __P((char *));
void Suff_DoPaths __P((void));
@@ -136,7 +136,7 @@ Boolean Targ_Ignore __P((GNode *));
Boolean Targ_Silent __P((GNode *));
Boolean Targ_Precious __P((GNode *));
void Targ_SetMain __P((GNode *));
-void Targ_PrintCmd __P((ClientData));
+void Targ_PrintCmd __P((void *));
char *Targ_FmtTime __P((time_t));
void Targ_PrintType __P((int));
void Targ_PrintGraph __P((int));
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index f5b7d4654eb..846ac63553e 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: for.c,v 1.16 2000/06/10 01:32:22 espie Exp $ */
+/* $OpenBSD: for.c,v 1.17 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: for.c,v 1.4 1996/11/06 17:59:05 christos Exp $ */
/*
@@ -82,7 +82,7 @@
#if 0
static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: for.c,v 1.16 2000/06/10 01:32:22 espie Exp $";
+static char rcsid[] = "$OpenBSD: for.c,v 1.17 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -111,7 +111,7 @@ struct For_ {
unsigned long level; /* Nesting level */
};
-static void ForExec __P((ClientData, ClientData));
+static void ForExec __P((void *, void *));
static void build_words_list __P((Lst, const char *));
/* Cut a string into words, stuff that into list. */
@@ -270,8 +270,8 @@ For_Accumulate(arg, line)
*/
static void
ForExec(namep, argp)
- ClientData namep;
- ClientData argp;
+ void *namep;
+ void *argp;
{
char *name = (char *)namep;
For *arg = (For *)argp;
diff --git a/usr.bin/make/hash.h b/usr.bin/make/hash.h
index 16dc1c269fc..d43f8678b66 100644
--- a/usr.bin/make/hash.h
+++ b/usr.bin/make/hash.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hash.h,v 1.5 2000/03/26 16:21:32 espie Exp $ */
+/* $OpenBSD: hash.h,v 1.6 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: hash.h,v 1.5 1996/11/06 17:59:07 christos Exp $ */
/*
@@ -58,7 +58,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 */
@@ -88,7 +88,7 @@ typedef struct Hash_Search {
*/
/*
- * ClientData Hash_GetValue(h)
+ * void *Hash_GetValue(h)
* Hash_Entry *h;
*/
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 29aa6c952cd..db174089b7b 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: job.c,v 1.27 2000/06/10 01:32:22 espie Exp $ */
+/* $OpenBSD: job.c,v 1.28 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: job.c,v 1.27 2000/06/10 01:32:22 espie Exp $";
+static char rcsid[] = "$OpenBSD: job.c,v 1.28 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -292,14 +292,14 @@ STATIC Lst stoppedJobs; /* Lst of Job structures describing
#define W_SETEXITSTATUS(st, val) W_SETMASKED(st, val, WEXITSTATUS)
-static void JobCondPassSig __P((ClientData, ClientData));
+static void JobCondPassSig __P((void *, void *));
static void JobPassSig __P((int));
-static int JobCmpPid __P((ClientData, ClientData));
-static int JobPrintCommand __P((ClientData, ClientData));
-static void JobSaveCommand __P((ClientData, ClientData));
+static int JobCmpPid __P((void *, void *));
+static int JobPrintCommand __P((void *, void *));
+static void JobSaveCommand __P((void *, void *));
static void JobClose __P((Job *));
#ifdef REMOTE
-static int JobCmpRmtID __P((Job *, ClientData));
+static int JobCmpRmtID __P((Job *, void *));
# ifdef RMT_WILL_WATCH
static void JobLocalInput __P((int, Job *));
# endif
@@ -329,8 +329,8 @@ static void JobRestartJobs __P((void));
*/
static void
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;
@@ -450,10 +450,10 @@ 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;
+ return *(int *)pid - ((Job *)job)->pid;
}
#ifdef REMOTE
@@ -472,8 +472,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;
}
@@ -508,8 +508,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
@@ -666,11 +666,13 @@ JobPrintCommand(cmdp, jobp)
*/
static void
JobSaveCommand(cmd, gn)
- ClientData cmd;
- ClientData gn;
+ void *cmd;
+ void *gn;
{
- cmd = (ClientData) Var_Subst((char *) cmd, (GNode *) gn, FALSE);
- Lst_AtEnd(postCommands->commands, cmd);
+ char *result;
+
+ result = Var_Subst((char *)cmd, (GNode *)gn, FALSE);
+ Lst_AtEnd(postCommands->commands, result);
}
@@ -960,10 +962,10 @@ JobFinish(job, status)
Lst_ForEachFrom(job->tailCmds, JobSaveCommand, 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();
@@ -1841,11 +1843,11 @@ JobStart(gn, flags, previous)
Lst_ForEachFrom(job->tailCmds, JobSaveCommand, job->node);
Make_Update(job->node);
}
- free((Address)job);
- return(JOB_FINISHED);
+ free(job);
+ return JOB_FINISHED;
} else {
- free((Address)job);
- return(JOB_ERROR);
+ free(job);
+ return JOB_ERROR;
}
} else {
(void) fflush(job->cmdFILE);
@@ -2658,7 +2660,7 @@ Job_ParseShell(line)
words = brk_string(line, &wordCount, TRUE, &shellArgv);
- memset((Address)&newShell, 0, sizeof(newShell));
+ memset(&newShell, 0, sizeof(newShell));
/*
* Parse the specification by keyword
diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h
index 40c793060df..e91ba25d9ea 100644
--- a/usr.bin/make/lst.h
+++ b/usr.bin/make/lst.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lst.h,v 1.12 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: lst.h,v 1.13 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: lst.h,v 1.7 1996/11/06 17:59:12 christos Exp $ */
/*
@@ -60,10 +60,10 @@
typedef struct Lst *Lst;
typedef struct LstNode *LstNode;
-typedef int (*FindProc) __P((ClientData, ClientData));
-typedef void (*SimpleProc) __P((ClientData));
-typedef void (*ForEachProc) __P((ClientData, ClientData));
-typedef ClientData (*DuplicateProc) __P((ClientData));
+typedef int (*FindProc) __P((void *, void *));
+typedef void (*SimpleProc) __P((void *));
+typedef void (*ForEachProc) __P((void *, void *));
+typedef void * (*DuplicateProc) __P((void *));
/*
* NOFREE can be used as the freeProc to Lst_Destroy when the elements are
@@ -92,17 +92,17 @@ Boolean Lst_IsEmpty __P((Lst));
* Functions to modify a list
*/
/* Insert an element before another */
-void Lst_Insert __P((Lst, LstNode, ClientData));
+void Lst_Insert __P((Lst, LstNode, void *));
/* Insert an element after another */
-void Lst_Append __P((Lst, LstNode, ClientData));
+void Lst_Append __P((Lst, LstNode, void *));
/* Place an element at the front of a lst. */
-void Lst_AtFront __P((Lst, ClientData));
+void Lst_AtFront __P((Lst, void *));
/* Place an element at the end of a lst. */
-void Lst_AtEnd __P((Lst, ClientData));
+void Lst_AtEnd __P((Lst, void *));
/* Remove an element */
void Lst_Remove __P((Lst, LstNode));
/* Replace a node with a new value */
-void Lst_Replace __P((LstNode, ClientData));
+void Lst_Replace __P((LstNode, void *));
/* Concatenate two lists */
void Lst_Concat __P((Lst, Lst, int));
@@ -116,7 +116,7 @@ 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
@@ -126,12 +126,12 @@ ClientData Lst_Datum __P((LstNode));
#define Lst_Find(l, cProc, d) Lst_FindFrom(Lst_First(l), cProc, d)
/* Find an element starting from somewhere */
-LstNode Lst_FindFrom __P((LstNode, FindProc, ClientData));
+LstNode Lst_FindFrom __P((LstNode, FindProc, void *));
/* Apply a function to all elements of a lst */
#define Lst_ForEach(l, proc, d) Lst_ForEachFrom(Lst_First(l), proc, d)
/* Apply a function to all elements of a lst starting from a certain point. */
-void Lst_ForEachFrom __P((LstNode, ForEachProc, ClientData));
+void Lst_ForEachFrom __P((LstNode, ForEachProc, void *));
void Lst_Every __P((Lst, SimpleProc));
@@ -139,7 +139,7 @@ void Lst_Every __P((Lst, SimpleProc));
* 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 *));
/*
* these functions are for dealing with a list as a table, of sorts.
@@ -159,8 +159,8 @@ void Lst_Close __P((Lst));
* for using the list as a queue
*/
/* Place an element at tail of queue */
-void Lst_EnQueue __P((Lst, ClientData));
+void 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 19e57967dfc..fbc4d8daaab 100644
--- a/usr.bin/make/lst.lib/lstAppend.c
+++ b/usr.bin/make/lst.lib/lstAppend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstAppend.c,v 1.7 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstAppend.c,v 1.8 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstAppend.c,v 1.5 1996/11/06 17:59:31 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstAppend.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstAppend.c,v 1.7 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstAppend.c,v 1.8 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -72,7 +72,7 @@ void
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 b23f781ada2..63684eb27b7 100644
--- a/usr.bin/make/lst.lib/lstAtEnd.c
+++ b/usr.bin/make/lst.lib/lstAtEnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstAtEnd.c,v 1.5 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstAtEnd.c,v 1.6 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstAtEnd.c,v 1.5 1996/11/06 17:59:32 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstAtEnd.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstAtEnd.c,v 1.5 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstAtEnd.c,v 1.6 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -65,7 +65,7 @@ static char rcsid[] = "$OpenBSD: lstAtEnd.c,v 1.5 1999/12/18 21:58:08 espie Exp
void
Lst_AtEnd(l, d)
Lst l; /* List to which to add the datum */
- ClientData d; /* Datum to add */
+ void *d; /* Datum to add */
{
Lst_Append(l, Lst_Last(l), d);
}
diff --git a/usr.bin/make/lst.lib/lstAtFront.c b/usr.bin/make/lst.lib/lstAtFront.c
index 16fb97150e3..51b3860bcf6 100644
--- a/usr.bin/make/lst.lib/lstAtFront.c
+++ b/usr.bin/make/lst.lib/lstAtFront.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstAtFront.c,v 1.5 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstAtFront.c,v 1.6 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstAtFront.c,v 1.5 1996/11/06 17:59:33 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstAtFront.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstAtFront.c,v 1.5 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstAtFront.c,v 1.6 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -64,9 +64,9 @@ static char rcsid[] = "$OpenBSD: lstAtFront.c,v 1.5 1999/12/18 21:58:08 espie Ex
*-----------------------------------------------------------------------
*/
void
-Lst_AtFront (l, d)
+Lst_AtFront(l, d)
Lst l;
- ClientData d;
+ void *d;
{
Lst_Insert(l, Lst_First(l), d);
}
diff --git a/usr.bin/make/lst.lib/lstConcat.c b/usr.bin/make/lst.lib/lstConcat.c
index 265e0a9c6c0..9eb3847f05d 100644
--- a/usr.bin/make/lst.lib/lstConcat.c
+++ b/usr.bin/make/lst.lib/lstConcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstConcat.c,v 1.7 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstConcat.c,v 1.8 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstConcat.c,v 1.6 1996/11/06 17:59:34 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstConcat.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstConcat.c,v 1.7 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstConcat.c,v 1.8 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -114,7 +114,7 @@ Lst_Concat (l1, l2, flags)
}
list1->lastPtr = list2->lastPtr;
}
- 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 139ec86ebb3..5b11cd8eddb 100644
--- a/usr.bin/make/lst.lib/lstDatum.c
+++ b/usr.bin/make/lst.lib/lstDatum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstDatum.c,v 1.6 2000/03/26 16:21:33 espie Exp $ */
+/* $OpenBSD: lstDatum.c,v 1.7 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstDatum.c,v 1.5 1996/11/06 17:59:35 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstDatum.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstDatum.c,v 1.6 2000/03/26 16:21:33 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstDatum.c,v 1.7 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -65,7 +65,7 @@ static char rcsid[] = "$OpenBSD: lstDatum.c,v 1.6 2000/03/26 16:21:33 espie Exp
*
*-----------------------------------------------------------------------
*/
-ClientData
+void *
Lst_Datum(ln)
LstNode ln;
{
diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c
index 696360388ad..a0f87b25e2f 100644
--- a/usr.bin/make/lst.lib/lstDeQueue.c
+++ b/usr.bin/make/lst.lib/lstDeQueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstDeQueue.c,v 1.7 2000/03/26 16:21:33 espie Exp $ */
+/* $OpenBSD: lstDeQueue.c,v 1.8 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstDeQueue.c,v 1.5 1996/11/06 17:59:36 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstDeQueue.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.7 2000/03/26 16:21:33 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.8 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -66,11 +66,11 @@ static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.7 2000/03/26 16:21:33 espie Ex
*
*-----------------------------------------------------------------------
*/
-ClientData
+void *
Lst_DeQueue(l)
Lst l;
{
- ClientData rd;
+ void *rd;
LstNode tln;
tln = Lst_First(l);
diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c
index 87861d8417b..229621f01af 100644
--- a/usr.bin/make/lst.lib/lstDestroy.c
+++ b/usr.bin/make/lst.lib/lstDestroy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstDestroy.c,v 1.6 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: lstDestroy.c,v 1.7 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstDestroy.c,v 1.6 1996/11/06 17:59:37 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstDestroy.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstDestroy.c,v 1.6 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstDestroy.c,v 1.7 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -88,7 +88,7 @@ Lst_Destroy(l, freeProc)
if (list->lastPtr != NULL)
list->lastPtr->nextPtr = NULL;
else {
- free ((Address)l);
+ free(l);
return;
}
@@ -96,14 +96,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 1ae98f2983f..c826050e28d 100644
--- a/usr.bin/make/lst.lib/lstDupl.c
+++ b/usr.bin/make/lst.lib/lstDupl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstDupl.c,v 1.8 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: lstDupl.c,v 1.9 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: lstDupl.c,v 1.6 1996/11/06 17:59:37 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstDupl.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.8 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.9 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -56,7 +56,7 @@ static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.8 2000/06/10 01:32:23 espie Exp $
/*-
*-----------------------------------------------------------------------
* 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:
diff --git a/usr.bin/make/lst.lib/lstEnQueue.c b/usr.bin/make/lst.lib/lstEnQueue.c
index 2fa56654e00..6a26bfba7ca 100644
--- a/usr.bin/make/lst.lib/lstEnQueue.c
+++ b/usr.bin/make/lst.lib/lstEnQueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstEnQueue.c,v 1.5 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstEnQueue.c,v 1.6 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstEnQueue.c,v 1.5 1996/11/06 17:59:38 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstEnQueue.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstEnQueue.c,v 1.5 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstEnQueue.c,v 1.6 2000/06/10 01:41:07 espie Exp $";
#endif
#endif /* not lint */
@@ -66,7 +66,7 @@ static char rcsid[] = "$OpenBSD: lstEnQueue.c,v 1.5 1999/12/18 21:58:08 espie Ex
void
Lst_EnQueue(l, d)
Lst l;
- ClientData d;
+ void *d;
{
if (LstValid(l) == FALSE)
return;
diff --git a/usr.bin/make/lst.lib/lstFindFrom.c b/usr.bin/make/lst.lib/lstFindFrom.c
index 8ef31a77330..dc416e89340 100644
--- a/usr.bin/make/lst.lib/lstFindFrom.c
+++ b/usr.bin/make/lst.lib/lstFindFrom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstFindFrom.c,v 1.6 1999/12/19 00:04:26 espie Exp $ */
+/* $OpenBSD: lstFindFrom.c,v 1.7 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstFindFrom.c,v 1.6 1996/11/06 17:59:40 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstFindFrom.c 8.1 (Berkeley) 6/6/93";
#else
-static char *rcsid = "$OpenBSD: lstFindFrom.c,v 1.6 1999/12/19 00:04:26 espie Exp $";
+static char *rcsid = "$OpenBSD: lstFindFrom.c,v 1.7 2000/06/10 01:41:07 espie Exp $";
#endif
#endif /* not lint */
@@ -70,7 +70,7 @@ LstNode
Lst_FindFrom(ln, cProc, d)
LstNode ln;
FindProc cProc;
- ClientData d;
+ void *d;
{
ListNode tln;
diff --git a/usr.bin/make/lst.lib/lstForEachFrom.c b/usr.bin/make/lst.lib/lstForEachFrom.c
index 563d6023fee..238e0f7e8a5 100644
--- a/usr.bin/make/lst.lib/lstForEachFrom.c
+++ b/usr.bin/make/lst.lib/lstForEachFrom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstForEachFrom.c,v 1.6 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: lstForEachFrom.c,v 1.7 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstForEachFrom.c,v 1.5 1996/11/06 17:59:42 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstForEachFrom.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstForEachFrom.c,v 1.6 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstForEachFrom.c,v 1.7 2000/06/10 01:41:07 espie Exp $";
#endif
#endif /* not lint */
@@ -67,7 +67,7 @@ void
Lst_ForEachFrom(ln, proc, d)
LstNode ln;
ForEachProc proc;
- ClientData d;
+ void *d;
{
ListNode tln;
diff --git a/usr.bin/make/lst.lib/lstInsert.c b/usr.bin/make/lst.lib/lstInsert.c
index 92d3f0c12ab..e6d1fbf6e9a 100644
--- a/usr.bin/make/lst.lib/lstInsert.c
+++ b/usr.bin/make/lst.lib/lstInsert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstInsert.c,v 1.7 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstInsert.c,v 1.8 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstInsert.c,v 1.5 1996/11/06 17:59:44 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstInsert.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstInsert.c,v 1.7 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstInsert.c,v 1.8 2000/06/10 01:41:07 espie Exp $";
#endif
#endif /* not lint */
@@ -65,10 +65,10 @@ static char rcsid[] = "$OpenBSD: lstInsert.c,v 1.7 1999/12/18 21:58:08 espie Exp
*-----------------------------------------------------------------------
*/
void
-Lst_Insert (l, ln, d)
+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 d1033808117..be021cbe175 100644
--- a/usr.bin/make/lst.lib/lstInt.h
+++ b/usr.bin/make/lst.lib/lstInt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstInt.h,v 1.8 1999/12/18 21:53:34 espie Exp $ */
+/* $OpenBSD: lstInt.h,v 1.9 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstInt.h,v 1.7 1996/11/06 17:59:44 christos Exp $ */
/*
@@ -56,7 +56,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 0cbed448fcf..6cbaeed47bc 100644
--- a/usr.bin/make/lst.lib/lstMember.c
+++ b/usr.bin/make/lst.lib/lstMember.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstMember.c,v 1.5 1999/12/18 21:53:34 espie Exp $ */
+/* $OpenBSD: lstMember.c,v 1.6 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstMember.c,v 1.5 1996/11/06 17:59:48 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstMember.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstMember.c,v 1.5 1999/12/18 21:53:34 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstMember.c,v 1.6 2000/06/10 01:41:07 espie Exp $";
#endif
#endif /* not lint */
@@ -53,9 +53,9 @@ static char rcsid[] = "$OpenBSD: lstMember.c,v 1.5 1999/12/18 21:53:34 espie Exp
#include "lstInt.h"
LstNode
-Lst_Member (l, d)
+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 e2a9075cc8f..f875a7adaa5 100644
--- a/usr.bin/make/lst.lib/lstRemove.c
+++ b/usr.bin/make/lst.lib/lstRemove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstRemove.c,v 1.6 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstRemove.c,v 1.7 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstRemove.c,v 1.5 1996/11/06 17:59:50 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstRemove.c,v 1.6 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstRemove.c,v 1.7 2000/06/10 01:41:07 espie Exp $";
#endif
#endif /* not lint */
@@ -128,7 +128,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 d638c3a7f1d..f7008cbece8 100644
--- a/usr.bin/make/lst.lib/lstReplace.c
+++ b/usr.bin/make/lst.lib/lstReplace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstReplace.c,v 1.6 1999/12/18 21:58:08 espie Exp $ */
+/* $OpenBSD: lstReplace.c,v 1.7 2000/06/10 01:41:07 espie Exp $ */
/* $NetBSD: lstReplace.c,v 1.5 1996/11/06 17:59:51 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstReplace.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstReplace.c,v 1.6 1999/12/18 21:58:08 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstReplace.c,v 1.7 2000/06/10 01:41:07 espie Exp $";
#endif
#endif /* not lint */
@@ -63,10 +63,10 @@ static char rcsid[] = "$OpenBSD: lstReplace.c,v 1.6 1999/12/18 21:58:08 espie Ex
*-----------------------------------------------------------------------
*/
void
-Lst_Replace (ln, d)
+Lst_Replace(ln, d)
LstNode ln;
- ClientData d;
+ void *d;
{
if (ln != NULL)
- ((ListNode) ln)->datum = d;
+ ((ListNode)ln)->datum = d;
}
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index 1806e58fb15..25745f2e59f 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.31 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: main.c,v 1.32 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */
/*
@@ -49,7 +49,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.31 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.32 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -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));
int main __P((int, char **));
@@ -189,7 +189,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
break;
case 'V':
printVars = TRUE;
- Lst_AtEnd(variables, (ClientData)optarg);
+ Lst_AtEnd(variables, optarg);
Var_Append(MAKEFLAGS, "-V", VAR_GLOBAL);
Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL);
break;
@@ -280,7 +280,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
Var_Append(MAKEFLAGS, "-e", VAR_GLOBAL);
break;
case 'f':
- Lst_AtEnd(makefiles, (ClientData)optarg);
+ Lst_AtEnd(makefiles, optarg);
break;
case 'i':
ignoreErrors = TRUE;
@@ -371,7 +371,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
optind = 1; /* - */
goto rearg;
}
- Lst_AtEnd(create, (ClientData)estrdup(*argv));
+ Lst_AtEnd(create, estrdup(*argv));
}
}
@@ -771,7 +771,7 @@ main(argc, argv)
*cp = savec;
path = cp + 1;
} while (savec == ':');
- (void)free((Address)vpath);
+ free(vpath);
}
/*
@@ -866,7 +866,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;
@@ -1213,7 +1214,7 @@ usage()
void
PrintAddr(a)
- ClientData a;
+ void *a;
{
printf("%lx ", (unsigned long) a);
}
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index e45a0e550ef..fd8bfec8ddb 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: make.c,v 1.15 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: make.c,v 1.16 2000/06/10 01:41:05 espie Exp $ */
/* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: make.c,v 1.15 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: make.c,v 1.16 2000/06/10 01:41:05 espie Exp $";
#endif
#endif /* not lint */
@@ -93,12 +93,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 void MakeAddChild __P((ClientData, ClientData));
-static void MakeAddAllSrc __P((ClientData, ClientData));
-static void MakeTimeStamp __P((ClientData, ClientData));
-static void MakeHandleUse __P((ClientData, ClientData));
+static void MakeAddChild __P((void *, void *));
+static void MakeAddAllSrc __P((void *, void *));
+static void MakeTimeStamp __P((void *, void *));
+static void MakeHandleUse __P((void *, void *));
static Boolean MakeStartJobs __P((void));
-static void MakePrintStatus __P((ClientData, ClientData));
+static void MakePrintStatus __P((void *, void *));
/*-
*-----------------------------------------------------------------------
* Make_TimeStamp --
@@ -124,8 +124,8 @@ Make_TimeStamp(pgn, cgn)
static void
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 */
{
Make_TimeStamp((GNode *)pgn, (GNode *)cgn);
}
@@ -285,8 +285,8 @@ Make_OODate (gn)
*/
static void
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;
@@ -361,8 +361,8 @@ Make_HandleUse(cgn, pgn)
}
static void
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 */
{
Make_HandleUse((GNode *)pgn, (GNode *)cgn);
}
@@ -551,8 +551,8 @@ Make_Update (cgn)
*/
static void
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;
@@ -730,8 +730,8 @@ MakeStartJobs ()
*/
static void
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 */
{
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 04576113cba..e471f28574a 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.41 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: parse.c,v 1.42 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: parse.c,v 1.41 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: parse.c,v 1.42 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -248,18 +248,18 @@ static struct {
static void ParseErrorInternal __P((char *, unsigned long, int, char *, ...));
static void ParseVErrorInternal __P((char *, unsigned long, int, char *, va_list));
static int ParseFindKeyword __P((char *));
-static void ParseLinkSrc __P((ClientData, ClientData));
-static int ParseDoOp __P((ClientData, ClientData));
-static int ParseAddDep __P((ClientData, ClientData));
+static void 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 void ParseAddDir __P((ClientData, ClientData));
-static void ParseClearPath __P((ClientData));
+static int ParseFindMain __P((void *, void *));
+static void ParseAddDir __P((void *, void *));
+static void ParseClearPath __P((void *));
static void ParseDoDependency __P((char *));
-static void ParseAddCmd __P((ClientData, ClientData));
+static void ParseAddCmd __P((void *, void *));
static int __inline ParseReadc __P((void));
static void ParseUnreadc __P((int));
-static void ParseHasCommands __P((ClientData));
+static void ParseHasCommands __P((void *));
static void ParseDoInclude __P((char *));
#ifdef SYSVINCLUDE
static void ParseTraditionalInclude __P((char *));
@@ -430,8 +430,8 @@ Parse_Error(va_alist)
*/
static void
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;
@@ -461,9 +461,9 @@ ParseLinkSrc(pgnp, cgnp)
*/
static int
ParseDoOp (gnp, opp)
- ClientData gnp; /* The node to which the operator is to be
- * applied */
- ClientData opp; /* The operator to apply */
+ void *gnp; /* The node to which the operator is to be
+ * applied */
+ void *opp; /* The operator to apply */
{
GNode *gn = (GNode *) gnp;
int op = *(int *) opp;
@@ -538,8 +538,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;
@@ -691,8 +691,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_NOTARGET) == 0) {
@@ -716,8 +716,8 @@ ParseFindMain(gnp, dummy)
*/
static void
ParseAddDir(path, name)
- ClientData path;
- ClientData name;
+ void *path;
+ void *name;
{
Dir_AddDir((Lst)path, (char *)name);
}
@@ -734,7 +734,7 @@ ParseAddDir(path, name)
*/
static void
ParseClearPath(path)
- ClientData path;
+ void *path;
{
Dir_ClearPath((Lst)path);
}
@@ -1568,8 +1568,8 @@ Parse_DoVar (line, ctxt)
*/
static void
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 */
@@ -1600,7 +1600,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)) {
@@ -2027,12 +2027,12 @@ ParseEOF (opened)
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);
}
@@ -2359,7 +2359,7 @@ test_char:
break;
/*FALLTHRU*/
case COND_PARSE:
- free ((Address) line);
+ free(line);
line = ParseReadLine();
break;
case COND_INVALID:
diff --git a/usr.bin/make/sprite.h b/usr.bin/make/sprite.h
index 661c41ed020..7fa763a7f89 100644
--- a/usr.bin/make/sprite.h
+++ b/usr.bin/make/sprite.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sprite.h,v 1.7 2000/03/26 16:21:33 espie Exp $ */
+/* $OpenBSD: sprite.h,v 1.8 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: sprite.h,v 1.6 1996/11/06 17:59:22 christos Exp $ */
/*
@@ -41,12 +41,6 @@
* from: @(#)sprite.h 8.1 (Berkeley) 6/6/93
*/
-/*
- * sprite.h --
- *
- * Common constants and type declarations for Sprite.
- */
-
#ifndef _SPRITE
#define _SPRITE
@@ -55,7 +49,6 @@
* 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.
*/
-
typedef int Boolean;
#ifndef TRUE
#define TRUE 1
@@ -64,36 +57,8 @@ 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
-
-
-#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;
-
-typedef void *ClientData;
+#define SUCCESS 0
+#define FAILURE 1
#endif /* _SPRITE */
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 4a6c8984cbb..96315279702 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: suff.c,v 1.27 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: suff.c,v 1.28 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
-static char rcsid[] = "$OpenBSD: suff.c,v 1.27 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: suff.c,v 1.28 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -162,29 +162,29 @@ 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 SuffUnRef __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 SuffUnRef __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 void SuffRebuildGraph __P((ClientData, ClientData));
-static void SuffAddSrc __P((ClientData, ClientData));
+static void SuffRebuildGraph __P((void *, void *));
+static void 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 void SuffExpandChildren __P((ClientData, ClientData));
+static void 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 void SuffPrintName __P((ClientData));
-static void SuffPrintSuff __P((ClientData));
-static void SuffPrintTrans __P((ClientData));
+static void SuffPrintName __P((void *));
+static void SuffPrintSuff __P((void *));
+static void SuffPrintTrans __P((void *));
/*************** Lst Predicates ****************/
/*-
@@ -261,10 +261,10 @@ SuffSuffIsSuffix (s, str)
*/
static int
SuffSuffIsSuffixP(s, str)
- ClientData s;
- ClientData str;
+ void *s;
+ void *str;
{
- return(!SuffSuffIsSuffix((Suff *) s, (char *) str));
+ return !SuffSuffIsSuffix((Suff *)s, (char *)str);
}
/*-
@@ -282,8 +282,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));
}
@@ -304,11 +304,11 @@ SuffSuffHasNameP (s, sname)
*-----------------------------------------------------------------------
*/
static int
-SuffSuffIsPrefix (s, str)
- ClientData s; /* suffix to compare */
- ClientData str; /* string to examine */
+SuffSuffIsPrefix(s, str)
+ void *s; /* suffix to compare */
+ void *str; /* string to examine */
{
- return (SuffStrIsPrefix (((Suff *) s)->name, (char *) str) == NULL ? 1 : 0);
+ return SuffStrIsPrefix (((Suff *)s)->name, (char *)str) == NULL ? 1 : 0;
}
/*-
@@ -324,19 +324,19 @@ SuffSuffIsPrefix (s, str)
*-----------------------------------------------------------------------
*/
static int
-SuffGNHasNameP (gn, name)
- ClientData gn; /* current node we're looking at */
- ClientData name; /* name we're looking for */
+SuffGNHasNameP(gn, name)
+ void *gn; /* current node we're looking at */
+ void *name; /* name we're looking for */
{
- return (strcmp ((char *) name, ((GNode *) gn)->name));
+ return strcmp((char *)name, ((GNode *)gn)->name);
}
/*********** Maintenance Functions ************/
static void
SuffUnRef(lp, sp)
- ClientData lp;
- ClientData sp;
+ void *lp;
+ void *sp;
{
Lst l = (Lst) lp;
@@ -358,8 +358,8 @@ SuffUnRef(lp, sp)
*-----------------------------------------------------------------------
*/
static void
-SuffFree (sp)
- ClientData sp;
+SuffFree(sp)
+ void *sp;
{
Suff *s = (Suff *) sp;
@@ -374,8 +374,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);
}
/*-
@@ -653,7 +653,7 @@ Suff_AddTransform (line)
*/
void
Suff_EndTransform(gnp)
- ClientData gnp; /* Node for transformation */
+ void *gnp; /* Node for transformation */
{
GNode *gn = (GNode *)gnp;
@@ -704,8 +704,8 @@ Suff_EndTransform(gnp)
*/
static void
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;
@@ -967,8 +967,8 @@ Suff_AddLib (sname)
*/
static void
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;
@@ -1076,9 +1076,9 @@ 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, s);
@@ -1092,7 +1092,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;
@@ -1279,8 +1279,8 @@ SuffFindCmds (targ, slst)
*/
static void
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;
@@ -2299,14 +2299,14 @@ Suff_End()
/********************* DEBUGGING FUNCTIONS **********************/
static void SuffPrintName(s)
- ClientData s;
+ void *s;
{
printf("%s ", ((Suff *)s)->name);
}
static void
SuffPrintSuff(sp)
- ClientData sp;
+ void *sp;
{
Suff *s = (Suff *)sp;
int flags;
@@ -2345,7 +2345,7 @@ SuffPrintSuff(sp)
static void
SuffPrintTrans(tp)
- ClientData tp;
+ void *tp;
{
GNode *t = (GNode *)tp;
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index f7bc0b65b62..16c9656b8e7 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: targ.c,v 1.17 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: targ.c,v 1.18 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
#else
-static char *rcsid = "$OpenBSD: targ.c,v 1.17 2000/06/10 01:32:23 espie Exp $";
+static char *rcsid = "$OpenBSD: targ.c,v 1.18 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -102,11 +102,11 @@ static Hash_Table targets; /* a hash table of same */
#define HTSIZE 191 /* initial size of hash table */
-static void TargPrintOnlySrc __P((ClientData));
-static void TargPrintName __P((ClientData));
-static void TargPrintNode __P((ClientData, ClientData));
+static void TargPrintOnlySrc __P((void *));
+static void TargPrintName __P((void *));
+static void TargPrintNode __P((void *, void *));
#ifdef CLEANUP
-static void TargFreeGN __P((ClientData));
+static void TargFreeGN __P((void *));
#endif
/*-
@@ -219,8 +219,8 @@ Targ_NewGN (name)
*-----------------------------------------------------------------------
*/
static void
-TargFreeGN (gnp)
- ClientData gnp;
+TargFreeGN(gnp)
+ void *gnp;
{
GNode *gn = (GNode *) gnp;
@@ -236,7 +236,7 @@ TargFreeGN (gnp)
Lst_Destroy(gn->preds, NOFREE);
Lst_Destroy(gn->context, NOFREE);
Lst_Destroy(gn->commands, NOFREE);
- free((Address)gn);
+ free(gn);
}
#endif
@@ -431,7 +431,7 @@ Targ_SetMain (gn)
static void
TargPrintName(gnp)
- ClientData gnp;
+ void *gnp;
{
GNode *gn = (GNode *)gnp;
@@ -441,7 +441,7 @@ TargPrintName(gnp)
void
Targ_PrintCmd(cmd)
- ClientData cmd;
+ void *cmd;
{
printf("\t%s\n", (char *)cmd);
}
@@ -532,8 +532,8 @@ Targ_PrintType (type)
*/
static void
TargPrintNode(gnp, passp)
- ClientData gnp;
- ClientData passp;
+ void *gnp;
+ void *passp;
{
GNode *gn = (GNode *)gnp;
int pass = *(int *)passp;
@@ -606,7 +606,7 @@ TargPrintNode(gnp, passp)
*/
static void
TargPrintOnlySrc(gnp)
- ClientData gnp;
+ void *gnp;
{
GNode *gn = (GNode *)gnp;
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index baf2662bea2..71f0b191565 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.31 2000/06/10 01:32:23 espie Exp $ */
+/* $OpenBSD: var.c,v 1.32 2000/06/10 01:41:06 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -70,7 +70,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: var.c,v 1.31 2000/06/10 01:32:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: var.c,v 1.32 2000/06/10 01:41:06 espie Exp $";
#endif
#endif /* not lint */
@@ -203,33 +203,31 @@ typedef struct {
#endif
#define VarValue(v) Buf_Retrieve(&((v)->val))
-static int VarCmp __P((ClientData, ClientData));
+static int VarCmp __P((void *, void *));
static Var *VarFind __P((char *, GNode *, int));
static Var *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 *));
#ifndef MAKE_BOOTSTRAP
static void VarREError __P((int, regex_t *, const char *));
-static Boolean VarRESubstitute __P((char *, Boolean, Buffer, ClientData));
+static Boolean VarRESubstitute __P((char *, Boolean, Buffer, void *));
#endif
-static Boolean VarSubstitute __P((char *, Boolean, Buffer, ClientData));
+static Boolean VarSubstitute __P((char *, Boolean, Buffer, void *));
static char *VarGetPattern __P((GNode *, int, char **, int, int *, size_t *,
VarPattern *));
static char *VarQuote __P((char *));
-static char *VarModify __P((char *, Boolean (*)(char *, Boolean, Buffer,
- ClientData),
- ClientData));
-static void VarPrintVar __P((ClientData));
-static Boolean VarUppercase __P((char *word, Boolean addSpace, Buffer buf, ClientData dummy));
-static Boolean VarLowercase __P((char *word, Boolean addSpace, Buffer buf, ClientData dummy));
+static char *VarModify __P((char *, Boolean (*)(char *, Boolean, Buffer, void *), void *));
+static void VarPrintVar __P((void *));
+static Boolean VarUppercase __P((char *word, Boolean addSpace, Buffer buf, void *dummy));
+static Boolean VarLowercase __P((char *word, Boolean addSpace, Buffer buf, void *dummy));
/*-
*-----------------------------------------------------------------------
@@ -245,11 +243,11 @@ static Boolean VarLowercase __P((char *word, Boolean addSpace, Buffer buf, Clien
*-----------------------------------------------------------------------
*/
static int
-VarCmp (v, name)
- ClientData v; /* VAR structure to compare */
- ClientData name; /* name to look for */
+VarCmp(v, name)
+ void *v; /* VAR structure to compare */
+ void *name; /* name to look for */
{
- return (strcmp ((char *) name, ((Var *) v)->name));
+ return strcmp((char *)name, ((Var *)v)->name);
}
/*-
@@ -402,7 +400,7 @@ VarAdd(name, val, ctxt)
*/
static void
VarDelete(vp)
- ClientData vp;
+ void *vp;
{
Var *v = (Var *) vp;
free(v->name);
@@ -624,7 +622,7 @@ VarUppercase (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;
{
size_t len = strlen(word);
@@ -655,7 +653,7 @@ VarLowercase (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;
{
size_t len = strlen(word);
@@ -682,12 +680,12 @@ VarLowercase (word, addSpace, buf, dummy)
*-----------------------------------------------------------------------
*/
static Boolean
-VarHead (word, addSpace, buf, dummy)
+VarHead(word, addSpace, buf, dummy)
char *word; /* Word to trim */
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;
@@ -723,12 +721,12 @@ VarHead (word, addSpace, buf, dummy)
*-----------------------------------------------------------------------
*/
static Boolean
-VarTail (word, addSpace, buf, dummy)
+VarTail(word, addSpace, buf, dummy)
char *word; /* Word to trim */
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;
@@ -757,12 +755,12 @@ VarTail (word, addSpace, buf, dummy)
*-----------------------------------------------------------------------
*/
static Boolean
-VarSuffix (word, addSpace, buf, dummy)
+VarSuffix(word, addSpace, buf, dummy)
char *word; /* Word to trim */
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;
{
char *dot;
@@ -792,12 +790,12 @@ VarSuffix (word, addSpace, buf, dummy)
*-----------------------------------------------------------------------
*/
static Boolean
-VarRoot (word, addSpace, buf, dummy)
+VarRoot(word, addSpace, buf, dummy)
char *word; /* Word to trim */
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;
{
char *dot;
@@ -828,13 +826,13 @@ VarRoot (word, addSpace, buf, dummy)
*-----------------------------------------------------------------------
*/
static Boolean
-VarMatch (word, addSpace, buf, pattern)
+VarMatch(word, addSpace, buf, pattern)
char *word; /* Word to examine */
Boolean addSpace; /* TRUE if need to add a space to the
* 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)
@@ -863,13 +861,13 @@ VarMatch (word, addSpace, buf, pattern)
*-----------------------------------------------------------------------
*/
static Boolean
-VarSYSVMatch (word, addSpace, buf, patp)
+VarSYSVMatch(word, addSpace, buf, patp)
char *word; /* Word to examine */
Boolean addSpace; /* TRUE if need to add a space to the
* 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;
@@ -907,13 +905,13 @@ VarSYSVMatch (word, addSpace, buf, patp)
*-----------------------------------------------------------------------
*/
static Boolean
-VarNoMatch (word, addSpace, buf, pattern)
+VarNoMatch(word, addSpace, buf, pattern)
char *word; /* Word to examine */
Boolean addSpace; /* TRUE if need to add a space to the
* 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)
@@ -940,12 +938,12 @@ VarNoMatch (word, addSpace, buf, pattern)
*-----------------------------------------------------------------------
*/
static Boolean
-VarSubstitute (word, addSpace, buf, patternp)
+VarSubstitute(word, addSpace, buf, patternp)
char *word; /* Word to modify */
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 size_t wordLen; /* Length of word */
register char *cp; /* General pointer */
@@ -1137,7 +1135,7 @@ VarRESubstitute(word, addSpace, buf, patternp)
char *word;
Boolean addSpace;
Buffer buf;
- ClientData patternp;
+ void *patternp;
{
VarREPattern *pat;
int xrv;
@@ -1257,8 +1255,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
@@ -2332,7 +2330,7 @@ Var_End ()
/****************** PRINT DEBUGGING INFO *****************/
static void
VarPrintVar(vp)
- ClientData vp;
+ void *vp;
{
Var *v = (Var *)vp;