diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-06-17 14:34:12 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-06-17 14:34:12 +0000 |
commit | 93fa2e228c8792a5468e8d398b5bb6c290eecb73 (patch) | |
tree | c0ea5557fc5eeb30f54bbf940c06762e68e76895 /usr.bin/make/lst.lib/lstReplace.c | |
parent | 73501d656ca05164437c542734297118885750b9 (diff) |
This patch moves the definition of lists and list nodes to lst.h.
C is not well-suited for opaque data structures.
Then it proceeds by removing a lot of non-sensical casts and white space.
There are two motivations behind this change:
* small functions like Lst_First can now be redefined as macros safely
(otherwise, the cast would mean that you might write Lst_First(5) and
find out about it rather late)
* the size of the Lst data structure is exposed to user code. This will
be used to allocate lists statically, instead of malloc/free them like
crazy.
Diffstat (limited to 'usr.bin/make/lst.lib/lstReplace.c')
-rw-r--r-- | usr.bin/make/lst.lib/lstReplace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/lst.lib/lstReplace.c b/usr.bin/make/lst.lib/lstReplace.c index f7008cbece8..5a449e64944 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.7 2000/06/10 01:41:07 espie Exp $ */ +/* $OpenBSD: lstReplace.c,v 1.8 2000/06/17 14:34:10 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.7 2000/06/10 01:41:07 espie Exp $"; +static char rcsid[] = "$OpenBSD: lstReplace.c,v 1.8 2000/06/17 14:34:10 espie Exp $"; #endif #endif /* not lint */ @@ -68,5 +68,5 @@ Lst_Replace(ln, d) void *d; { if (ln != NULL) - ((ListNode)ln)->datum = d; + ln->datum = d; } |