home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / cmplngmg / cl_jun89.arc / AWK210.ARC / ASMGEN.AWK < prev    next >
Text File  |  1988-02-23  |  511b  |  35 lines

  1. NF < 1 || /^;/   {
  2.     print
  3.     next
  4. }
  5. $1 ~ /^;/ {
  6.     i = 2; 
  7.     printf ("\t%s\t", $1)
  8.     while (i <= NF) {
  9.         printf ("%s ", $i)
  10.         i++
  11.     }
  12.     printf ("\n")
  13.     next
  14. }
  15. {
  16.     if ($0 ~ /^[ \t]/)
  17.         i = 1
  18.     else {
  19.         printf ("%s", $1)
  20.         i = 2
  21.     }
  22.     if (i <= NF) {
  23.         printf ("\t%s\t", $i)
  24.         i++
  25.     }
  26.     while (i <= NF) {
  27.         if ($i ~ /;/)
  28.             break
  29.         printf ("%s ", $i)
  30.         i++
  31.     }
  32.     printf ("\n")
  33. }
  34.  
  35.