X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Freadtokens.c;h=f66bd21c5df9f7001aa62917fd4f68325f2f73a1;hb=8d7314ae9fde9984d9cebe27a96806e02f77be64;hp=ccd8f4b653a871a20dadb6eacbbc2fee342bdea5;hpb=5d08444ebcbd08cd195e1d9f52937a862c92efaa;p=gnulib.git diff --git a/lib/readtokens.c b/lib/readtokens.c index ccd8f4b65..f66bd21c5 100644 --- a/lib/readtokens.c +++ b/lib/readtokens.c @@ -1,5 +1,5 @@ /* readtokens.c -- Functions for reading tokens from an input stream. - Copyright (C) 1990-1991 Jim Meyering. + Copyright (C) 1990-1991, 1999 Jim Meyering. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,23 +28,23 @@ */ #ifdef HAVE_CONFIG_H -#include +# include #endif #include #ifdef STDC_HEADERS -#include +# include #endif #if defined (STDC_HEADERS) || defined(HAVE_STRING_H) -#include +# include /* An ANSI string.h and pre-ANSI memory.h might conflict. */ -#if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) -#include -#endif /* not STDC_HEADERS and HAVE_MEMORY_H */ +# if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) +# include +# endif /* not STDC_HEADERS and HAVE_MEMORY_H */ #else /* not STDC_HEADERS and not HAVE_STRING_H */ -#include +# include /* memory.h and strings.h conflict on some systems. */ #endif /* not STDC_HEADERS and not HAVE_STRING_H */ @@ -77,11 +77,10 @@ init_tokenbuffer (tokenbuffer) and on files that aren't newline-terminated. */ long -readtoken (stream, delim, n_delim, tokenbuffer) - FILE *stream; - const char *delim; - int n_delim; - token_buffer *tokenbuffer; +readtoken (FILE *stream, + const char *delim, + int n_delim, + token_buffer *tokenbuffer) { char *p; int c, i, n; @@ -164,14 +163,12 @@ readtoken (stream, delim, n_delim, tokenbuffer) %%% realloc() of `tokens' just before returning? */ int -readtokens (stream, projected_n_tokens, delim, n_delim, - tokens_out, token_lengths) - FILE *stream; - int projected_n_tokens; - const char *delim; - int n_delim; - char ***tokens_out; - long **token_lengths; +readtokens (FILE *stream, + int projected_n_tokens, + const char *delim, + int n_delim, + char ***tokens_out, + long **token_lengths) { token_buffer tb, *token = &tb; int token_length;