#!/bin/sh
# $0 event_names.list > event_names_table.h

enames=$1

# Header
echo '/*'
echo ' * AUTOGENERATED FILE -- DO NOT EDIT'
echo ' * This file is generated automatically by the build process from'
echo " * ${enames}"
echo ' */'
echo
echo 'static const char *event_names[] = {'

# Generate the string of the designated initializer for the array
for i in `cat $enames`; do
	echo "    [$i] = \"$i\","
done

echo '};'
