1#!/bin/bash
2for i in "$@"; do
3	n=$(basename "$i" .txt|sed -e 's/s$//')
4	if test "$n" == "shortfile"; then continue; fi
5	echo "enum sm4_$n"
6	echo "{"
7	while read j; do
8		echo $'\t'"SM4_${n}_$j",
9	done < "$i" |tr '[a-z]' '[A-Z]'|tr ' ' '_'
10	echo $'\t'"SM4_${n}_COUNT"|tr '[a-z]' '[A-Z]'
11	echo "};"
12	echo
13done
14