aboutsummaryrefslogtreecommitdiff
path: root/include/wordsplit.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-06-13 14:20:20 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-06-13 14:20:20 +0300
commit12304127b52650588877f00b0c4b32dae083e852 (patch)
treee6a2fa21b66d16a82a7913933b88bd091f633dc6 /include/wordsplit.h
parentdbe318987cf3a36fe63893205d3df0dc3be7fa4a (diff)
downloadgrecs-12304127b52650588877f00b0c4b32dae083e852.tar.gz
grecs-12304127b52650588877f00b0c4b32dae083e852.tar.bz2
wordsplit: configurable order of lookups if both WRDSF_ENV and WRDSF_GETVAR are set
* lib/wordsplit.h (WRDSO_GETVARPREF): New option. * lib/wordsplit.c (wordsplit_find_env): Rewrite as wsplt_env_lookup wsplt_env_getvar): New function. (expvar): Select preference of wsplt_env_lookup vs. wsplt_env_getvar depending on the value if WRDSO_GETVARPREF option.
Diffstat (limited to 'include/wordsplit.h')
-rw-r--r--include/wordsplit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/wordsplit.h b/include/wordsplit.h
index 0d6eef3..3451979 100644
--- a/include/wordsplit.h
+++ b/include/wordsplit.h
@@ -216,7 +216,8 @@ struct wordsplit
#define WRDSO_FAILGLOB 0x00000002
/* Allow a leading period to be matched by metacharacters. */
#define WRDSO_DOTGLOB 0x00000004
-/* Unused value: 0x00000008 */
+/* Prefer ws_getvar over lookup in ws_env, if both are supplied */
+#define WRDSO_GETVARPREF 0x00000008
/* Keep backslash in unrecognized escape sequences in words */
#define WRDSO_BSKEEP_WORD 0x00000010
/* Handle octal escapes in words */

Return to:

Send suggestions and report system problems to the System administrator.