10 /******************************************************************************/
11 /* postlicyd: a postfix policy daemon with a lot of features */
13 /* ________________________________________________________________________ */
15 /* Redistribution and use in source and binary forms, with or without */
16 /* modification, are permitted provided that the following conditions */
19 /* 1. Redistributions of source code must retain the above copyright */
20 /* notice, this list of conditions and the following disclaimer. */
21 /* 2. Redistributions in binary form must reproduce the above copyright */
22 /* notice, this list of conditions and the following disclaimer in the */
23 /* documentation and/or other materials provided with the distribution. */
24 /* 3. The names of its contributors may not be used to endorse or promote */
25 /* products derived from this software without specific prior written */
28 /* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS */
29 /* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */
30 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
31 /* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY */
32 /* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL */
33 /* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS */
34 /* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) */
35 /* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, */
36 /* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */
37 /* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
38 /* POSSIBILITY OF SUCH DAMAGE. */
39 /******************************************************************************/
42 /***** THIS FILE IS AUTOGENERATED DO NOT MODIFY DIRECTLY ! *****/
50 #ifndef PFIXTOOLS_PARAMS_TOKENS_H
51 #define PFIXTOOLS_PARAMS_TOKENS_H
53 typedef enum param_token {
55 `grep_self "$0" | tr 'a-z-/' 'A-Z__' | sed -e 's/.*/ ATK_&,/'`
59 extern const char *atokens[ATK_count];
62 param_token param_tokenize(const char *s, ssize_t len);
63 #endif /* PFIXTOOLS_PARAMS_TOKENS_H */
69 echo "$tok, ATK_`echo $tok | tr 'a-z-' 'A-Z_'`"
75 cat <<EOF | gperf -m16 -l -t -C -F",0" -Ntokenize_aux | \
76 sed -e '/__gnu_inline__/d;s/\<\(__\|\)inline\>//g'
81 #include "`echo "${this%.sh}"`.h"
83 static const struct tok *
84 tokenize_aux(const char *str, unsigned int len);
87 struct tok { const char *name; int val; };
89 `grep_self "$0" | do_tokens`
92 const char *atokens[ATK_count] = {
93 `grep_self "$0" | sed -e 's/.*/ "&",/'`
96 param_token param_tokenize(const char *s, ssize_t len)
102 const struct tok *res = tokenize_aux(s, len);
103 return res ? res->val : ATK_UNKNOWN;
112 ( ( grep 'filter_param_register(.*, *"' *.c | sed 's/.*filter_param_register(.*, *"\(.*\)" *).*/\1/' ) &&
113 ( grep 'config_param_register( *".*' config.c | sed 's/.*config_param_register( *"\(.*\)".*/\1/' ) ) | sort | uniq
116 trap "rm -f $1" 1 2 3 15
121 *) die "you must ask for the 'h' or 'c' generation";;