# Convert the output of wri-nm-64 to a list of exports in DEF file format
#
# Lines ending with a colon are object file names in a multi-file output.
/:$/d
# Lines starting with @ are debug-related symbols.
/^@/d
# Lines starting with ? are constants.
/^?/d
# Lines starting with __real@ are floating point constants.
/^__real@/d
# Lines of the form id D/C/R/B .... are exported data.  Convert and go.
s/^\([^ ][^ ]*\) [DCRB] .*$/        \1 DATA/
t
s/^\([^ ][^ ]*\) [DCRB]$/        \1 DATA/
t
# Lines of the form id T .... are exported functions.  Convert and go.
s/^\([^ ][^ ]*\) T .*$/        \1/
t
s/^\([^ ][^ ]*\) T$/        \1/
t
# Delete all other lines.
d
