~kevin8t8/mutt

ref: mutt-1-11-4-rel mutt/gen_defs -rwxr-xr-x 635 bytes View raw
207b9306Kevin McCarthy automatic post-release commit for mutt-1.11.4 1 year, 3 months ago
                                                                                
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
36
37
38
#!/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='i\
	/* L10N: Help screen function description.\
	         Generated from one of the OPS files. */
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