aboutsummaryrefslogtreecommitdiff
path: root/include/wordsplit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/wordsplit.h')
-rw-r--r--include/wordsplit.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/wordsplit.h b/include/wordsplit.h
index 8726cf1..d13ec3c 100644
--- a/include/wordsplit.h
+++ b/include/wordsplit.h
@@ -1,5 +1,5 @@
/* wordsplit - a word splitter
- Copyright (C) 2009-2016 Sergey Poznyakoff
+ Copyright (C) 2009-2018 Sergey Poznyakoff
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 the
@@ -41,6 +41,11 @@ struct wordsplit
int ws_flags; /* [Input] Flags passed to wordsplit. */
int ws_options; /* [Input] (WRDSF_OPTIONS)
Additional options. */
+ size_t ws_maxwords; /* [Input] (WRDSO_MAXWORDS) Return at most that
+ many words */
+ size_t ws_wordi; /* [Output] (WRDSF_INCREMENTAL) Total number of
+ words returned so far */
+
const char *ws_delim; /* [Input] (WRDSF_DELIM) Word delimiters. */
const char *ws_comment; /* [Input] (WRDSF_COMMENT) Comment characters. */
const char *ws_escape[2]; /* [Input] (WRDSF_ESCAPE) Characters to be escaped
@@ -198,6 +203,9 @@ struct wordsplit
/* Handle hex escapes in words */
#define WRDSO_XESC_WORD 0x00000040
+/* ws_maxwords field is initialized */
+#define WRDSO_MAXWORDS 0x00000080
+
/* Keep backslash in unrecognized escape sequences in quoted strings */
#define WRDSO_BSKEEP_QUOTE 0x00000100
/* Handle octal escapes in quoted strings */

Return to:

Send suggestions and report system problems to the System administrator.