aboutsummaryrefslogtreecommitdiff
path: root/mfd/lex.l
diff options
context:
space:
mode:
Diffstat (limited to 'mfd/lex.l')
-rw-r--r--mfd/lex.l14
1 files changed, 13 insertions, 1 deletions
diff --git a/mfd/lex.l b/mfd/lex.l
index 40821b9a..3ceabfce 100644
--- a/mfd/lex.l
+++ b/mfd/lex.l
@@ -176,3 +176,5 @@ LOCUS __file__|__line__|__function__
VCONST __package__|__version__|__major__|__minor__|__patch__
-ICONST {LOCUS}|{VCONST}|__statedir__|__preproc__
+STATEDIR __(def)?statedir__
+PREPROC __(def)?preproc__
+ICONST {LOCUS}|{VCONST}|{STATEDIR}|{PREPROC}
%%
@@ -828,2 +830,5 @@ builtin_const(const char *s)
} else if (strcmp(s, "__statedir__") == 0) {
+ string(mailfromd_state_dir, strlen(mailfromd_state_dir));
+ return STRING;
+ } else if (strcmp(s, "__defstatedir__") == 0) {
string(DEFAULT_STATE_DIR, sizeof DEFAULT_STATE_DIR - 1);
@@ -836,2 +841,9 @@ builtin_const(const char *s)
return STRING;
+ } else if (strcmp(s, "__defpreproc__") == 0) {
+ if (DEFAULT_PREPROCESSOR)
+ string(DEFAULT_PREPROCESSOR,
+ sizeof DEFAULT_PREPROCESSOR - 1);
+ else
+ string("", 0);
+ return STRING;
}

Return to:

Send suggestions and report system problems to the System administrator.