home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1938 / ckptcvt < prev    next >
Encoding:
Text File  |  1990-12-28  |  689 b   |  29 lines

  1. #!/bin/sh
  2. awk '{
  3.   if ($1 == "CKPT")
  4.    {
  5.     if ($2 == "VARS")
  6.      { print " CKPT_VAR1";
  7.        print "#undef CKPT_HEAD";
  8.        print "#define CKPT_HEAD CKPT_head";
  9.        print " CKPT_VAR4"; }
  10.     else if ($2 == "TOPS")
  11.      { print " CKPT_TOP1";
  12.        print "#undef CKPT_SPOT";
  13.        print "#define CKPT_SPOT CKPT_spot";
  14.        print " CKPT_TOP4" }
  15.     else if ($2 == "POINT")
  16.      { print " CKPT_1("$3")";
  17.        print "#undef CKPT_HEAD";
  18.        print "#define CKPT_HEAD "$3;
  19.        print " CKPT_4("$4")";
  20.        print "#undef CKPT_SPOT";
  21.        print "#define CKPT_SPOT "$4;
  22.        print " CKPT_7" }
  23.     else if ($2 == "BOTS")
  24.      { print " CKPT_BOT1" }
  25.    }
  26.   else
  27.     print
  28. }'
  29.