Mercurial > hg > octave-terminal
changeset 1606:2d0541468991
[project @ 1995-11-02 12:57:17 by jwe]
author | jwe |
---|---|
date | Thu, 02 Nov 1995 12:58:59 +0000 |
parents | a77f2df21864 |
children | 795527e9db19 |
files | src/input.cc src/input.h src/pt-const.h src/variables.cc |
diffstat | 4 files changed, 18 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/input.cc +++ b/src/input.cc @@ -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;
--- a/src/input.h +++ b/src/input.h @@ -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;
--- a/src/pt-const.h +++ b/src/pt-const.h @@ -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 ()
--- a/src/variables.cc +++ b/src/variables.cc @@ -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);