/************************************************************************/
/*                                                                      */
/* mccfilt.c:  This is the filter program for use with McC V2.0.  It    */
/*             removes the control characters from the output of the    */
/*             Lattice C compiler V5.0x.                                */
/*                                                                      */
/* Written:  2/20/89                      By:  John McClennan           */
/*                                                                      */
/************************************************************************/

#include <stdio.h>

void main()
   {
      int   c;

      do
         {
            c = getchar();             /* get character */
            if (c == 0x9b)             /* escape character */
               {
                  do
                     c = getchar();
                  while (c != 'm');
               }
            else if ((c != EOF) && (c != NULL) && (c != 0x0f) && (c != 0x07))
               putchar(c);             /* if not special char, write it */
         }
      while (c != EOF);
   }
