Mercurial > octave-nkf
diff src/input.cc @ 1750:fd0d12493223
[project @ 1996-01-13 09:31:07 by jwe]
author | jwe |
---|---|
date | Sat, 13 Jan 1996 09:31:07 +0000 |
parents | a02f140ed897 |
children | 3a9462b655f1 |
line wrap: on
line diff
--- a/src/input.cc Sat Jan 13 09:31:07 1996 +0000 +++ b/src/input.cc Sat Jan 13 09:31:07 1996 +0000 @@ -618,15 +618,15 @@ // warning if the file doesn't exist. FILE * -get_input_from_file (const char *name, int warn) +get_input_from_file (const string& name, int warn) { FILE *instream = 0; - if (name && *name) - instream = fopen (name, "r"); + if (name.length () > 0) + instream = fopen (name.c_str (), "r"); if (! instream && warn) - warning ("%s: no such file or directory", name); + warning ("%s: no such file or directory", name.c_str ()); if (reading_fcn_file || reading_script_file) ff_instream = instream;