~ubuntu-branches/ubuntu/vivid/mutt/vivid-updates

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

# $Id$

echo '/* Automatically generated by gen_defs.  Do not edit! */'
echo ''

for mode in help defs; do
	case $mode in
		help)
			echo "#ifdef HELP_C"
			echo "const char *HelpStrings[] = {"
			expr='s;^[^ ]* *\(.*\);	N_(\1),;'
			;;
		*)
			echo "enum {"
			expr='s;^\([^ ]*\).*;	\1,;'
			;;
	esac
	for i in $*; do
		sed -e '/^\/\*/d' -e "$expr" < $i
	done
	if test $mode = help; then
		echo '	NULL'
	else
		echo '	OP_MAX'
	fi
	echo "};"
	if test $mode = help; then
		echo "#endif /* MAIN_C */"
		echo ''
	fi
done

exit 0