Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 36 lines (31 sloc) 537 Bytes
#!/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