comparison src/input.cc @ 339:94f0f219a946

[project @ 1994-02-07 07:26:24 by jwe]
author jwe
date Mon, 07 Feb 1994 07:29:19 +0000
parents 82d30a23c979
children 7ea224e713cd
comparison
equal deleted inserted replaced
338:82d30a23c979 339:94f0f219a946
101 101
102 // Nonzero means we're parsing a script file. 102 // Nonzero means we're parsing a script file.
103 int reading_script_file = 0; 103 int reading_script_file = 0;
104 104
105 // If we are reading from an M-file, this is it. 105 // If we are reading from an M-file, this is it.
106 FILE *mf_instream = (FILE *) NULL; 106 FILE *ff_instream = (FILE *) NULL;
107 107
108 // Nonzero means we are using readline. 108 // Nonzero means we are using readline.
109 int using_readline = 1; 109 int using_readline = 1;
110 110
111 // Nonzero means commands are echoed as they are executed (-x). 111 // Nonzero means commands are echoed as they are executed (-x).
222 } 222 }
223 else 223 else
224 { 224 {
225 FILE *curr_stream = rl_instream; 225 FILE *curr_stream = rl_instream;
226 if (reading_fcn_file || reading_script_file) 226 if (reading_fcn_file || reading_script_file)
227 curr_stream = mf_instream; 227 curr_stream = ff_instream;
228 228
229 assert (curr_stream != (FILE *) NULL); 229 assert (curr_stream != (FILE *) NULL);
230 230
231 // Why is this required? 231 // Why is this required?
232 buf[0] = '\0'; 232 buf[0] = '\0';
281 281
282 if (instream == (FILE *) NULL && warn) 282 if (instream == (FILE *) NULL && warn)
283 warning ("%s: no such file or directory", name); 283 warning ("%s: no such file or directory", name);
284 284
285 if (reading_fcn_file || reading_script_file) 285 if (reading_fcn_file || reading_script_file)
286 mf_instream = instream; 286 ff_instream = instream;
287 else 287 else
288 rl_instream = instream; 288 rl_instream = instream;
289 289
290 return instream; 290 return instream;
291 } 291 }