summaryrefslogtreecommitdiff
path: root/lib/readtokens.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-01-27 05:37:03 +0000
committerJim Meyering <jim@meyering.net>1995-01-27 05:37:03 +0000
commit1a41e74d32f45f7208a87aa641e12bae69278dac (patch)
tree7d69cd4b27f25132f22bda311ac3b6e83390e76f /lib/readtokens.h
parent66444bdafb3fad56f9b8c8cb888468c6e7a89683 (diff)
downloadcoreutils-1a41e74d32f45f7208a87aa641e12bae69278dac.tar.xz
.
Diffstat (limited to 'lib/readtokens.h')
-rw-r--r--lib/readtokens.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/readtokens.h b/lib/readtokens.h
new file mode 100644
index 000000000..101faa42e
--- /dev/null
+++ b/lib/readtokens.h
@@ -0,0 +1,29 @@
+#ifndef H_READTOKENS_H
+#define H_READTOKENS_H
+
+#ifndef INITIAL_TOKEN_LENGTH
+#define INITIAL_TOKEN_LENGTH 20
+#endif
+
+#ifndef TOKENBUFFER_DEFINED
+#define TOKENBUFFER_DEFINED
+struct tokenbuffer
+{
+ long 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,
+ token_buffer *tokenbuffer);
+int
+ readtokens (FILE *stream, int projected_n_tokens,
+ const char *delim, int n_delim,
+ char ***tokens_out, long **token_lengths);
+
+#endif /* not H_READTOKENS_H */