home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8710 / 18 / awk-width next >
Encoding:
Text File  |  1990-07-13  |  317 b   |  15 lines

  1. BEGIN        {
  2.             char = 0
  3.             printf "char xxW [256-32] = {\n"
  4.         }
  5. $2 == "POINTS"    { ps = $1 }
  6. $1 == "32"    { char = 1 }
  7. $1 == "127"    { char = 0 }
  8. NF > 0         {
  9.             if (char == 1) {
  10.                 width = int ($9 * 8.64 / ps + 0.5)
  11.                 printf "%d,    /* %c */\n", width, $1
  12.             }
  13.         }
  14. END        { printf "}    /* from file %s, ps=%f */\n", FILENAME, ps }
  15.