X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lua%2Flua-token.sh;h=ddc28474409c1215bbd96f92688c5887547ad2d1;hp=654ff546fcf25b55d529995f7257a723db8fed51;hb=892df7e70376da43374d834b8a825ea2d59efd06;hpb=6f1bd3d49f9bb02c57e2c7a1ba8e5507edb28ad5 diff --git a/lib-lua/lua-token.sh b/lib-lua/lua-token.sh index 654ff54..ddc2847 100644 --- a/lib-lua/lua-token.sh +++ b/lib-lua/lua-token.sh @@ -37,14 +37,16 @@ do_h() { #ifndef MUTT_LIB_LUA_LUA_TOKEN_H #define MUTT_LIB_LUA_LUA_TOKEN_H -enum lua_token { +typedef enum mlua_token { LTK_UNKNOWN = -1, -`tr 'a-z-/' 'A-Z__' | sed -e 's/.*/ LTK_&,/'` +`grep_self "$0" | tr 'a-z-/' 'A-Z__' | sed -e 's/.*/ LTK_&,/'` LTK_count, -}; +} mlua_token; + +extern const char *__mlua_token[LTK_count]; __attribute__((pure)) -enum lua_token lua_which_token(const char *s, ssize_t len); +mlua_token mlua_which_token(const char *s, ssize_t len); #endif /* MUTT_LIB_LUA_LUA_TOKEN_H */ EOF } @@ -56,7 +58,7 @@ do_tokens() { } do_c() { - cat <val : LTK_UNKNOWN; } else { return LTK_UNKNOWN; @@ -95,8 +101,8 @@ trap "rm -f $1" 1 2 3 15 rm -f $1 case "$1" in - *.h) grep_self "$0" | do_h > $1;; - *.c) grep_self "$0" | do_c > $1;; + *.h) do_h > $1;; + *.c) do_c > $1;; *) die "you must ask for the 'h' or 'c' generation";; esac chmod -w $1 @@ -104,7 +110,17 @@ chmod -w $1 exit 0 ############ Put tokens here ############ +## beep +## beep_new +## bindir +## docdir ## dotlock +## dsn_notify +## dsn_return +## editor +## hcache_backend +## quit ## sendmail ## shell -## tmpdir +## sysconfdir +## version