~ctwm/ctwm/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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 '};'