diff options
Diffstat (limited to 'src/wordsplit.h')
-rw-r--r-- | src/wordsplit.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/wordsplit.h b/src/wordsplit.h index eee262d..a531ac0 100644 --- a/src/wordsplit.h +++ b/src/wordsplit.h @@ -26,6 +26,7 @@ struct wordsplit size_t ws_offs; size_t ws_wordn; int ws_flags; + int ws_options; const char *ws_delim; const char *ws_comment; const char *ws_escape; @@ -122,11 +123,20 @@ struct wordsplit #define WRDSF_INCREMENTAL 0x20000000 /* ws_command needs argv parameter */ #define WRDSF_ARGV 0x40000000 +/* Perform pathname and tilde expansion */ +#define WRDSF_PATHEXPAND 0x80000000 #define WRDSF_DEFFLAGS \ (WRDSF_NOVAR | WRDSF_NOCMD | \ WRDSF_QUOTE | WRDSF_SQUEEZE_DELIMS | WRDSF_CESCAPES) +/* Remove the word that produces empty string after path expansion */ +#define WRDSO_NULLGLOB 0x01 +/* Print error message if path expansion produces empty string */ +#define WRDSO_FAILGLOB 0x02 +/* Allow a leading period to be matched by metacharacters. */ +#define WRDSO_DOTGLOB 0x04 + #define WRDSE_OK 0 #define WRDSE_EOF WRDSE_OK #define WRDSE_QUOTE 1 @@ -136,7 +146,8 @@ struct wordsplit #define WRDSE_UNDEF 5 #define WRDSE_NOINPUT 6 #define WRDSE_PAREN 7 -#define WRDSE_USERERR 8 +#define WRDSE_GLOBERR 8 +#define WRDSE_USERERR 9 int wordsplit (const char *s, struct wordsplit *p, int flags); int wordsplit_len (const char *s, size_t len, |