diff options
author | harti <harti@FreeBSD.org> | 2004-11-29 08:38:16 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-11-29 08:38:16 +0000 |
commit | d5b4f65a8216257f046436c3c0ac72f8c8099131 (patch) | |
tree | bde3042541b06db5578bb35a6e09b846114bd06c /usr.bin/make/lst.lib/lstOpen.c | |
parent | f0a7bdfddcf63921df4dcc4d26441e33dfdf7630 (diff) | |
download | FreeBSD-src-d5b4f65a8216257f046436c3c0ac72f8c8099131.zip FreeBSD-src-d5b4f65a8216257f046436c3c0ac72f8c8099131.tar.gz |
Merge the contents of lstInt.h into the public lst.h. This let's us get
rid of a lot of uneccesary casts and temporary variables that have just
obfuscated the code. This also let's us implement a couple of the one-
liner list functions as macros (the first one is Lst_IsEmpty) and
simplify life once we start to throw consts on the code.
Diffstat (limited to 'usr.bin/make/lst.lib/lstOpen.c')
-rw-r--r-- | usr.bin/make/lst.lib/lstOpen.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/make/lst.lib/lstOpen.c b/usr.bin/make/lst.lib/lstOpen.c index a35f714..11559ab 100644 --- a/usr.bin/make/lst.lib/lstOpen.c +++ b/usr.bin/make/lst.lib/lstOpen.c @@ -50,7 +50,8 @@ __FBSDID("$FreeBSD$"); * the list forever. Lst_IsAtEnd must be used to determine when to stop. */ -#include "lstInt.h" +#include "make.h" +#include "lst.h" /*- *----------------------------------------------------------------------- @@ -72,12 +73,12 @@ ReturnStatus Lst_Open(Lst l) { - if (LstValid (l) == FALSE) { + if (Lst_Valid (l) == FALSE) { return (FAILURE); } - ((List) l)->isOpen = TRUE; - ((List) l)->atEnd = LstIsEmpty (l) ? Head : Unknown; - ((List) l)->curPtr = NULL; + l->isOpen = TRUE; + l->atEnd = Lst_IsEmpty (l) ? LstHead : LstUnknown; + l->curPtr = NULL; return (SUCCESS); } |