@@ -7,7 +7,7 @@ needcomma=0
IFS="
"
sed -e 's,["],\\&,g' | while read -r line; do
- if [ -z "${line%%:*}" ]; then
+ if [ -n "${line}" -a -z "${line%%:*}" ]; then
if [ ${needcomma} -eq 1 ]; then
printf "\""
[ ${garble} -eq 1 ] && printf ")"
@@ -5,7 +5,7 @@ needcomma=0
types=
while read -r line; do
[ -z "${line%%#*}" ] && continue # skip comments
[ ${needcomma} -eq 1 ] && printf ",\n};\n\n"
type="${line#:}"
[ "${type}" = "end" ] && break
@@ -4,7 +4,7 @@ echo "/* Generated by $0 */"
needcomma=0
[ ${needcomma} -eq 1 ] && printf "\"\n\n"