Back to index

texmacs  1.0.7.15
Functions
maxima_filter.c File Reference
#include <stdio.h>

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 14 of file maxima_filter.c.

{ int c,first;
  /* first */
  fputs("\2verbatim:",stdout);
  while (1)
  { c=getchar();
    if (c==3) break;
    putchar(c);
  }
  /* other */
  while (1)
  { /* prompt */
    fputs("\2channel:prompt\5\2latex:\\red ",stdout);
    while (1)
    { c=getchar();
      if (c==4) break;
      putchar(c);
    }
    fputs("\\black\5\5",stdout);
    fflush(stdout);
    /* main output loop */
    first=1;
    c=getchar();
    while (1)
    { if (c==EOF) break;
      if (first)
      { fputs("\2verbatim:",stdout);
        if (c==3) break;
        if (c!='\n') putchar(c);
        first=0;
      }
      else if (c==3) break;
      else if (c=='%') { putchar('\\'); putchar(c); }
      else putchar(c);
      c=getchar();
    }
    if (c==EOF) break;
  }
  if (first) fputs("\2verbatim:",stdout);
  fputs("\2latex:\\red The end\\black\5\5",stdout);
  return 0;
}

Here is the call graph for this function: