home *** CD-ROM | disk | FTP | other *** search
- ### An AWK script to create the stkref.doc from the include files
- BEGIN { no_print= in_comment= 0;
- for (i=0; i<75; i++) separator=separator "-";
- titles[0]="GRTYPES"
- titles[1]="The SPR functions"
- titles[2]="The SPR_FIO functions"
- titles[3]="The SPR_HIT functions"
- titles[4]="The SPR_ANIM functions"
- titles[5]="The GR functions"
- titles[6]="The MOUSE functions"
- }
-
- /^#define _/ { next }
- /^#define/ { print $0; next }
- /^#/ { next }
- /^\*\*\*\*\**$/ { if (no_print)
- no_print=0
- else
- no_print=1
- no_comment=0;
- next
- }
- /^\/\*\**$/ { in_comment=1; print ""; next }
- /^\*\**\/$/ { in_comment=0; print "\n"; next }
- /^\*.*\.h[ \t]*$/ { if (title!=0)
- print "\f\n" separator
- print titles[title++];
- print separator;
- next
- }
- /./ { empty_line=empty_previous=0 }
- /^[ \n]*$/ { empty_line=1 }
- {
- if (no_print || empty_previous)
- next;
- if (in_comment)
- print " " substr($0,3,78);
- else
- print $0;
- empty_previous = empty_line;
- }
-