From cbca3d6f744e39d812817405f1eeef72480bf89c Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Mon, 28 May 2018 00:17:39 +0800 Subject: expand: Merge syntax/quotes in memtodest with flags The function arguments syntax and quotes are both derived from the expansion flags. As syntax is only used by memtodest we do not need to maintain it outside of the function at all. The only place that uses something other than BASESYNTAX or DQSYNTAX is exptilde. However in that case DQSYNTAX has exactly the same effect as SQSYNTAX. This patch merges these two arguments into a single flags. The macro QUOTES_KEEPNUL has been renamed to EXP_KEEPNUL in order to keep the namespace separate. Signed-off-by: Herbert Xu --- src/expand.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/expand.h') diff --git a/src/expand.h b/src/expand.h index 90f5328..617b851 100644 --- a/src/expand.h +++ b/src/expand.h @@ -58,6 +58,7 @@ struct arglist { #define EXP_VARTILDE2 0x40 /* expand tildes after colons only */ #define EXP_WORD 0x80 /* expand word in parameter expansion */ #define EXP_QUOTED 0x100 /* expand word in double quotes */ +#define EXP_KEEPNUL 0x200 /* do not skip NUL characters */ union node; -- cgit 1.4.1