Changeset 1017


Ignore:
Timestamp:
2000-03-06T11:58:24+13:00 (23 years ago)
Author:
sjboddie
Message:

compiler complained about using stdin and stdout to do global
initialization - variables were never changed so they were
replaced with #defines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/packages/mg/src/text/bool_tester.c

    r439 r1017  
    2424/*
    2525   $Log$
     26   Revision 1.2  2000/03/05 22:58:24  sjboddie
     27   compiler complained about using stdin and stdout to do global
     28   initialization - variables were never changed so they were
     29   replaced with #defines
     30
    2631   Revision 1.1  1999/08/10 21:17:45  sjboddie
    2732   renamed mg-1.3d directory mg
     
    7378#define STEM_METHOD 3
    7479
     80/* Newer compilers complain when you use stdin and stdout to do global
     81initialization. Since they're static we'll just use #defines instead
    7582static FILE *file_in = stdin;
    7683static FILE *file_out = stdout;
     84*/
     85#define FILE_IN stdin
     86#define FILE_OUT stdout
     87
    7788static char line[MAX_LINE_LEN + 1];
    7889
     
    144155      if (res == 0)
    145156    {
    146       fprintf (file_out, "\n***Parsed Expression***\n");
    147       PrintBoolTree (tree, file_out);
    148       fputc ('\n', file_out);
     157      fprintf (FILE_OUT, "\n***Parsed Expression***\n");
     158      PrintBoolTree (tree, FILE_OUT);
     159      fputc ('\n', FILE_OUT);
    149160      OptimiseBoolTree (tree, term_list, opt_type);
    150       fprintf (file_out, "\n***Optimised Expression ***\n");
    151       PrintBoolTree (tree, file_out);
    152       fputc ('\n', file_out);
     161      fprintf (FILE_OUT, "\n***Optimised Expression ***\n");
     162      PrintBoolTree (tree, FILE_OUT);
     163      fputc ('\n', FILE_OUT);
    153164    }
    154165
     
    167178prompt (char *str)
    168179{
    169   fprintf (file_out, "\n%s\n", str);
    170   return fgets (line, MAX_LINE_LEN, file_in);
     180  fprintf (FILE_OUT, "\n%s\n", str);
     181  return fgets (line, MAX_LINE_LEN, FILE_IN);
    171182}
Note: See TracChangeset for help on using the changeset viewer.