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 /******************************************************************************/
41 /***** THIS FILE IS AUTOGENERATED DO NOT MODIFY DIRECTLY ! *****/
49 #ifndef PFIXTOOLS_HOOKS_TOKENS_H
50 #define PFIXTOOLS_HOOKS_TOKENS_H
52 typedef enum hook_token {
54 `grep_self "$0" | tr 'a-z-/' 'A-Z__' | sed -e 's/.*/ HTK_&,/'`
58 extern const char *htokens[HTK_count];
61 hook_token hook_tokenize(const char *s, ssize_t len);
62 #endif /* PFIXTOOLS_HOOKS_TOKENS_H */
68 echo "$tok, HTK_`echo $tok | tr 'a-z-' 'A-Z_'`"
74 cat <<EOF | gperf -m16 -l -t -C -F",0" -Ntokenize_aux | \
75 sed -e '/__gnu_inline__/d;s/\<\(__\|\)inline\>//g'
80 #include "`echo "${this%.sh}"`.h"
82 static const struct tok *
83 tokenize_aux(const char *str, unsigned int len);
86 struct tok { const char *name; int val; };
88 `grep_self "$0" | do_tokens`
91 const char *htokens[HTK_count] = {
92 `grep_self "$0" | sed -e 's/.*/ "&",/'`
95 hook_token hook_tokenize(const char *s, ssize_t len)
101 const struct tok *res = tokenize_aux(s, len);
102 return res ? res->val : HTK_UNKNOWN;
111 grep 'filter_hook_register(.*, *"' *.c | sed 's/.*filter_hook_register(.*, *"\(.*\)" *).*/\1/' | sort | uniq
114 trap "rm -f $1" 1 2 3 15
119 *) die "you must ask for the 'h' or 'c' generation";;