# HG changeset patch # User jwe # Date 815317139 0 # Node ID 2d0541468991a1e84e52acd855b64c8bcaf953bd # Parent a77f2df218641939ef56aa9bd47f22520c5d03f3 [project @ 1995-11-02 12:57:17 by jwe] diff -r a77f2df21864 -r 2d0541468991 src/input.cc --- a/src/input.cc Thu Nov 02 10:47:56 1995 +0000 +++ b/src/input.cc Thu Nov 02 12:58:59 1995 +0000 @@ -129,7 +129,10 @@ int reading_fcn_file = 0; // Simple name of function file we are reading. -char *curr_fcn_file_name = 0; +const char *curr_fcn_file_name = 0; + +// Full name of file we are reading. +const char *curr_fcn_file_full_name = 0; // Nonzero means we're parsing a script file. int reading_script_file = 0; diff -r a77f2df21864 -r 2d0541468991 src/input.h --- a/src/input.h Thu Nov 02 10:47:56 1995 +0000 +++ b/src/input.h Thu Nov 02 12:58:59 1995 +0000 @@ -42,8 +42,11 @@ // Nonzero means we're parsing a function file. extern int reading_fcn_file; -// Simple name of M-file we are reading. -extern char *curr_fcn_file_name; +// Simple name of function file we are reading. +extern const char *curr_fcn_file_name; + +// Full name of file we are reading. +extern const char *curr_fcn_file_full_name; // Nonzero means we're parsing a script file. extern int reading_script_file; diff -r a77f2df21864 -r 2d0541468991 src/pt-const.h --- a/src/pt-const.h Thu Nov 02 10:47:56 1995 +0000 +++ b/src/pt-const.h Thu Nov 02 12:58:59 1995 +0000 @@ -352,7 +352,7 @@ tree_constant (void) : tree_fvc () { rep = new tree_constant_rep (); rep->count = 1; } - tree_constant (double d) : tree_fvc () + tree_constant (double d, int l = -1, int c = -1) : tree_fvc (l, c) { rep = new tree_constant_rep (d); rep->count = 1; } tree_constant (const Matrix& m) : tree_fvc () @@ -367,8 +367,8 @@ tree_constant (const ColumnVector& v, int pcv = -1) : tree_fvc () { rep = new tree_constant_rep (v, pcv); rep->count = 1; } - tree_constant (const Complex& c) : tree_fvc () - { rep = new tree_constant_rep (c); rep->count = 1; } + tree_constant (const Complex& C, int l = -1, int c = -1) : tree_fvc (l, c) + { rep = new tree_constant_rep (C); rep->count = 1; } tree_constant (const ComplexMatrix& m) : tree_fvc () { rep = new tree_constant_rep (m); rep->count = 1; } @@ -382,7 +382,7 @@ tree_constant (const ComplexColumnVector& v, int pcv = -1) : tree_fvc () { rep = new tree_constant_rep (v, pcv); rep->count = 1; } - tree_constant (const char *s) : tree_fvc () + tree_constant (const char *s, int l = -1, int c = -1) : tree_fvc (l, c) { rep = new tree_constant_rep (s); rep->count = 1; } tree_constant (const charMatrix& chm, int is_string = 0) : tree_fvc () diff -r a77f2df21864 -r 2d0541468991 src/variables.cc --- a/src/variables.cc Thu Nov 02 10:47:56 1995 +0000 +++ b/src/variables.cc Thu Nov 02 12:58:59 1995 +0000 @@ -777,10 +777,6 @@ char *nm = sym_rec->name (); - // This is needed by yyparse. - - curr_fcn_file_name = nm; - #ifdef WITH_DLD if (load_octave_oct_file (nm)) @@ -794,6 +790,11 @@ { char *ff = fcn_file_in_path (nm); + // These are needed by yyparse. + + curr_fcn_file_name = nm; + curr_fcn_file_full_name = ff; + if (ff) { script_file_executed = parse_fcn_file (exec_script, ff);