diff options
Diffstat (limited to 'src/mailfromd.h')
-rw-r--r-- | src/mailfromd.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mailfromd.h b/src/mailfromd.h index 20e2d360..54449c43 100644 --- a/src/mailfromd.h +++ b/src/mailfromd.h @@ -1,5 +1,5 @@ /* This file is part of mailfromd. - Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff + Copyright (C) 2005, 2006, 2007, 2008 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 @@ -587,6 +587,9 @@ struct constant { #define SYM_VARIABLE 3 /* The entry holds a variable */ #define SYM_LITERAL 4 /* A literal */ #define SYM_CONSTANT 5 /* A constant */ +#define _SYM_COUNT 6 +#define SYM_MASK(n) (1<<(n)) +#define SYM_BITS SYM_MASK(_SYM_COUNT) typedef int (*symbol_enumerator_t)(void *sym, void *data); int symbol_enumerate(int state, symbol_enumerator_t fun, void *data); @@ -628,6 +631,8 @@ struct variable *builtin_variable_install(const char *name, unsigned flags); void defer_initialize_variable(char *arg, char *val); +int variable_or_constant_lookup(const char *name, void **dptr); + struct function *function_install(const char *name, size_t parmcnt, size_t optcnt, data_type_t *parmtypes, @@ -636,7 +641,8 @@ struct function *function_install(const char *name, struct function *function_lookup(const char *name); struct literal *literal_lookup(const char *text); void define_constant(const char *name, struct value *value, struct locus *loc); -struct value *constant_lookup(const char *name); +const struct constant *constant_lookup(const char *name); +const struct value *constant_lookup_value(const char *name); struct sym_regex { struct literal *lit; /* Corresponding literal */ |