11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or (at
14 * your option) any later version.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 * Copyright © 2007 Pierre Habouzit
29 /***** THIS FILE IS AUTOGENERATED DO NOT MODIFY DIRECTLY ! *****/
37 #ifndef MUTT_LIB_LUA_LUA_TOKEN_H
38 #define MUTT_LIB_LUA_LUA_TOKEN_H
40 typedef enum mlua_token {
42 `grep_self "$0" | tr 'a-z-/' 'A-Z__' | sed -e 's/.*/ LTK_&,/'`
46 extern const char *__mlua_token[LTK_count];
49 mlua_token mlua_which_token(const char *s, ssize_t len);
50 #endif /* MUTT_LIB_LUA_LUA_TOKEN_H */
56 echo "$tok, LTK_`echo $tok | tr 'a-z-' 'A-Z_'`"
61 cat <<EOF | gperf -m16 -l -t -C -F",0" -Nmlua_which_token_aux
65 #include <lib-lib/lib-lib.h>
66 #include "lua-token.h"
68 static const struct tok *
69 mlua_which_token_aux(const char *str, unsigned int len);
72 struct tok { const char *name; int val; };
74 `grep_self "$0" | do_tokens`
77 const char *__mlua_token[LTK_count] = {
78 `grep_self "$0" | sed -e 's/.*/ "&",/'`
81 mlua_token mlua_which_token(const char *s, ssize_t len)
87 const struct tok *res = mlua_which_token_aux(s, len);
88 return res ? res->val : LTK_UNKNOWN;
97 grep '^## ' "$1" | cut -d' ' -f2
100 trap "rm -f $1" 1 2 3 15
106 *) die "you must ask for the 'h' or 'c' generation";;
112 ############ Put tokens here ############
125 ## ca_certificates_file
133 ## envelope_from_address
152 ## replysignencrypted