diff options
author | Jim Meyering <jim@meyering.net> | 2004-03-21 18:48:54 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-03-21 18:48:54 +0000 |
commit | 7c3d57a267e7c2488907a7af32e369ce2c98b2b4 (patch) | |
tree | 21b6f2e0b805a6153e82c5758124e82e0fb57582 /lib | |
parent | e5150544f5c5215ce210104ea77bc8d87e96c5e3 (diff) | |
download | coreutils-7c3d57a267e7c2488907a7af32e369ce2c98b2b4.tar.xz |
(readtoken, readtokens): Update prototypes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/readtokens.h | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/lib/readtokens.h b/lib/readtokens.h index 4d6e5b509..79582074a 100644 --- a/lib/readtokens.h +++ b/lib/readtokens.h @@ -1,6 +1,6 @@ /* readtokens.h -- Functions for reading tokens from an input stream. - Copyright (C) 1990, 1991, 1999, 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1999, 2001-2004 Free Software Foundation, Inc. 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 @@ -18,34 +18,26 @@ Written by Jim Meyering. */ -#ifndef H_READTOKENS_H -# define H_READTOKENS_H +#ifndef READTOKENS_H +# define READTOKENS_H # include <stdio.h> -# ifndef INITIAL_TOKEN_LENGTH -# define INITIAL_TOKEN_LENGTH 20 -# endif - -# ifndef TOKENBUFFER_DEFINED -# define TOKENBUFFER_DEFINED struct tokenbuffer { - long size; + size_t size; char *buffer; }; typedef struct tokenbuffer token_buffer; -# endif /* not TOKENBUFFER_DEFINED */ - void init_tokenbuffer (token_buffer *tokenbuffer); -long - readtoken (FILE *stream, const char *delim, int n_delim, +size_t + readtoken (FILE *stream, const char *delim, size_t n_delim, token_buffer *tokenbuffer); -int - readtokens (FILE *stream, int projected_n_tokens, - const char *delim, int n_delim, - char ***tokens_out, long **token_lengths); +size_t + readtokens (FILE *stream, size_t projected_n_tokens, + const char *delim, size_t n_delim, + char ***tokens_out, size_t **token_lengths); -#endif /* not H_READTOKENS_H */ +#endif /* not READTOKENS_H */ |