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 REGENTS AND CONTRIBUTORS ``AS IS'' AND */
29 /* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE */
30 /* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
31 /* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS */
32 /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR */
33 /* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF */
34 /* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS */
35 /* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN */
36 /* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) */
37 /* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF */
38 /* THE POSSIBILITY OF SUCH DAMAGE. */
39 /******************************************************************************/
41 /***** THIS FILE IS AUTOGENERATED DO NOT MODIFY DIRECTLY ! *****/
49 #ifndef PFIXTOOLS_TOKENS_H
50 #define PFIXTOOLS_TOKENS_H
52 typedef enum postlicyd_token {
54 `grep_self "$0" | tr 'a-z-/' 'A-Z__' | sed -e 's/.*/ PTK_&,/'`
58 extern const char *ptokens[PTK_count];
61 postlicyd_token tokenize(const char *s, ssize_t len);
62 #endif /* MUTT_LIB_LUA_LUA_TOKEN_H */
68 echo "$tok, PTK_`echo $tok | tr 'a-z-' 'A-Z_'`"
73 cat <<EOF | gperf -m16 -l -t -C -F",0" -Ntokenize_aux | \
74 sed -e '/__gnu_inline__/d;s/\<\(__\|\)inline\>//g'
81 static const struct tok *
82 tokenize_aux(const char *str, unsigned int len);
85 struct tok { const char *name; int val; };
87 `grep_self "$0" | do_tokens`
90 const char *ptokens[PTK_count] = {
91 `grep_self "$0" | sed -e 's/.*/ "&",/'`
94 postlicyd_token tokenize(const char *s, ssize_t len)
100 const struct tok *res = tokenize_aux(s, len);
101 return res ? res->val : PTK_UNKNOWN;
110 grep '^## ' "$1" | cut -d' ' -f2
113 trap "rm -f $1" 1 2 3 15
118 *) die "you must ask for the 'h' or 'c' generation";;
124 ############ Put tokens here ############
136 ## reverse_client_name
149 ## encryption_protocol
151 ## encryption_keysize
158 ## smtpd_access_policy
160 # protocol_name values
164 # protocol_state values