output-item: Fix memory leak in output_item_dump().
[pspp.git] / build-aux / icon-list
blob3abeaa15006715ad2df08d2f17562a743b27044e
1 #! /bin/sh
3 id=$1
4 name=$2
5 shift; shift
7 cat <<EOF
8 static const char *${id}_icon_name[] =
10 EOF
11 for i
13 echo $i
14 done \
15 | sed -e 's%[a-zA-Z/]*/[1-9]*x[1-9]*/\([^ ]*\)\.png%\1%g' \
16 | sort -u \
17 | while read f
19 printf ' "%s", \n' $f
20 done
21 cat <<EOF
24 const struct icon_context ${id}_icon_context = {
25 ${id}_icon_name,
26 sizeof (${id}_icon_name) / sizeof (${id}_icon_name[0]),
27 "$name"
30 EOF