5 echo "usage: genassym [-o outfile] objfile"
12 ${NM:='nm'} ${NMFLAGS} "$1" | ${AWK:='awk'} '
14 sign = substr($1, length($1) - 3, 4)
20 w0 = substr($1, length($1) - 3, 4)
23 w1 = substr($1, length($1) - 3, 4)
26 w2 = substr($1, length($1) - 3, 4)
29 w3 = substr($1, length($1) - 3, 4)
38 # This still has minor problems representing INT_MIN, etc.
40 # with 32-bit 2''s complement ints, this prints -0x80000000,
41 # which has the wrong type (unsigned int).
42 printf("#define\t%s\t%s%s%s\n", $3, sign, hex, w)
51 while getopts "o:" option
65 if [ "$use_outfile" = "yes" ]
67 work "$1" 3>"$outfile" >&3 3>&-