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 © 2006 Pierre Habouzit
29 /***** THIS FILE IS AUTOGENERATED DO NOT MODIFY DIRECTLY ! *****/
37 #ifndef MUTT_LIB_MIME_MIME_TOKEN_H
38 #define MUTT_LIB_MIME_MIME_TOKEN_H
41 MUTT_MIME_TOKEN_UNKNOWN,
42 `tr 'a-z-' 'A-Z_' | sed -e 's/.*/ MIME_&,/'`
46 enum mime_token mime_which_token(const char *s, ssize_t len);
47 #endif /* MUTT_LIB_MIME_MIME_TOKEN_H */
52 cat <<EOF | gperf --ignore-case -l -t -C -F,0
56 #include <lib-lib/str.h>
57 #include "mime-token.h"
60 struct tok { const char *name; int val; };
62 `awk '{print $0 ", " NR }'`
65 enum mime_token mime_which_token(const char *s, ssize_t len) {
66 const struct tok *res;
71 return MUTT_MIME_TOKEN_UNKNOWN;
73 res = in_word_set(s, len);
74 return res ? res->val : MUTT_MIME_TOKEN_UNKNOWN;
79 trap "rm -f $1" 1 2 3 15
84 *) die "you must ask for the 'h' or 'c' generation";;