mutt stable branch with some hacks
1#!/bin/sh
2
3# $Id$
4
5echo '/* Automatically generated by gen_defs. Do not edit! */'
6echo ''
7
8for mode in help defs; do
9 case $mode in
10 help)
11 echo "#ifdef HELP_C"
12 echo "const char *HelpStrings[] = {"
13 expr='s;^[^ ]* *\(.*\); N_(\1),;'
14 ;;
15 *)
16 echo "enum {"
17 expr='s;^\([^ ]*\).*; \1,;'
18 ;;
19 esac
20 for i in $*; do
21 sed -e '/^\/\*/d' -e "$expr" < $i
22 done
23 if test $mode = help; then
24 echo ' NULL'
25 else
26 echo ' OP_MAX'
27 fi
28 echo "};"
29 if test $mode = help; then
30 echo "#endif /* MAIN_C */"
31 echo ''
32 fi
33done
34
35exit 0