diff options
author | Jim Meyering <jim@meyering.net> | 2003-09-10 09:08:01 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-09-10 09:08:01 +0000 |
commit | 17019d2056791c09f17f003ed34f025584e1d94c (patch) | |
tree | 4e4b7980ab90aeedc9d2fe990e311825b54cefb0 /lib | |
parent | 548b033dd6a3698befd21e5d928e4129a8538688 (diff) | |
download | coreutils-17019d2056791c09f17f003ed34f025584e1d94c.tar.xz |
Include readtokens.h first, to test interface.
Include <stdlib.h>, <string.h> unconditionally.
(init_tokenbuffer): Define with a prototype.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/readtokens.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/lib/readtokens.c b/lib/readtokens.c index bb427729c..e826c8daa 100644 --- a/lib/readtokens.c +++ b/lib/readtokens.c @@ -31,24 +31,12 @@ # include <config.h> #endif -#include <stdio.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif +#include "readtokens.h" -#if defined (STDC_HEADERS) || defined(HAVE_STRING_H) -# include <string.h> -/* An ANSI string.h and pre-ANSI memory.h might conflict. */ -# if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) -# include <memory.h> -# endif /* not STDC_HEADERS and HAVE_MEMORY_H */ -#else /* not STDC_HEADERS and not HAVE_STRING_H */ -# include <strings.h> -/* memory.h and strings.h conflict on some systems. */ -#endif /* not STDC_HEADERS and not HAVE_STRING_H */ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> -#include "readtokens.h" #include "unlocked-io.h" #include "xalloc.h" @@ -58,8 +46,7 @@ /* Initialize a tokenbuffer. */ void -init_tokenbuffer (tokenbuffer) - token_buffer *tokenbuffer; +init_tokenbuffer (token_buffer *tokenbuffer) { tokenbuffer->size = INITIAL_TOKEN_LENGTH; tokenbuffer->buffer = xmalloc (INITIAL_TOKEN_LENGTH); |