Changeset 1017
- Timestamp:
- 2000-03-06T11:58:24+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/packages/mg/src/text/bool_tester.c
r439 r1017 24 24 /* 25 25 $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 26 31 Revision 1.1 1999/08/10 21:17:45 sjboddie 27 32 renamed mg-1.3d directory mg … … 73 78 #define STEM_METHOD 3 74 79 80 /* Newer compilers complain when you use stdin and stdout to do global 81 initialization. Since they're static we'll just use #defines instead 75 82 static FILE *file_in = stdin; 76 83 static FILE *file_out = stdout; 84 */ 85 #define FILE_IN stdin 86 #define FILE_OUT stdout 87 77 88 static char line[MAX_LINE_LEN + 1]; 78 89 … … 144 155 if (res == 0) 145 156 { 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); 149 160 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); 153 164 } 154 165 … … 167 178 prompt (char *str) 168 179 { 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); 171 182 }
Note:
See TracChangeset
for help on using the changeset viewer.