home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / star.lzh / star.1 / starchart / postconv.awk < prev    next >
Encoding:
AWK Script  |  1990-03-27  |  642 b   |  19 lines

  1. # This awk program takes a "mapwin" file produced by starXaw or
  2. # starX11 and changes the variables width, height, x_offset, and y_offset
  3. # to match the scale of starpost.
  4. # the numbers 4, 36, and 72 in this file as distributed are constants
  5. # in starpost.  If starpost is changed, these numbers also must change
  6. #
  7. # This may be wrapped in a shell script, e.g.
  8. # awk -f /usr/local/lib/star/postconv.awk
  9. #
  10. BEGIN {FS="="}
  11. {if (($1 == "width") || ($1 == "height"))
  12.         {printf "%s=%.0f\n", $1, $2*4}
  13.     else if ($1 == "x_offset")
  14.         {printf "%s=%.0f\n", $1, $2*4+36}
  15.     else if ($1 == "y_offset")
  16.         {printf "%s=%.0f\n", $1, $2*4+72}
  17.     else {print $0}
  18. }
  19.