Check for these headers: locale.h unistd.h mach/mach.h fcntl.h.
[gnulib.git] / lib / readtokens.h
1 #ifndef H_READTOKENS_H
2 # define H_READTOKENS_H
3
4 # ifndef INITIAL_TOKEN_LENGTH
5 #  define INITIAL_TOKEN_LENGTH 20
6 # endif
7
8 # ifndef TOKENBUFFER_DEFINED
9 #  define TOKENBUFFER_DEFINED
10 struct tokenbuffer
11 {
12   long size;
13   char *buffer;
14 };
15 typedef struct tokenbuffer token_buffer;
16
17 # endif /* not TOKENBUFFER_DEFINED */
18
19 # undef __P
20 # if defined (__STDC__) && __STDC__
21 #  define       __P(x) x
22 # else
23 #  define       __P(x) ()
24 # endif
25
26 void init_tokenbuffer __P ((token_buffer *tokenbuffer));
27
28 long
29   readtoken __P ((FILE *stream, const char *delim, int n_delim,
30              token_buffer *tokenbuffer));
31 int
32   readtokens __P ((FILE *stream, int projected_n_tokens,
33               const char *delim, int n_delim,
34               char ***tokens_out, long **token_lengths));
35
36 #endif /* not H_READTOKENS_H */