1# $Header: /home/yav/xpx/RCS/icondef.awk,v 1.1 1996/03/25 08:45:20 yav Exp $ 2# Icon number define for xpx 3# written by yav (UHD98984@pcvan.or.jp) 4# 5# input: 6# |mars.xbm up.xbm ... 7# 8# output: 9# |#define ICON_mars 1 10# |#define ICON_up 2 11# | : 12# 13 14BEGIN { 15 n = 1; 16 prestr = "#define ICON_"; 17} 18 19{ 20 for (i = 1; i <= NF; i++) { 21 split($i, a, "."); # cut suffix, store basename into a[1] 22 printf("%s%s\t%d\n", prestr, a[1], n); 23 n++; 24 } 25} 26 27