Mercurial > hg > octave-terminal
changeset 1421:3b77015d7f42
[project @ 1995-09-16 01:39:45 by jwe]
author | jwe |
---|---|
date | Sat, 16 Sep 1995 01:39:45 +0000 |
parents | 9ce9e4f1e5b5 |
children | afde7233c4dc |
files | src/variables.cc |
diffstat | 1 files changed, 20 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/variables.cc +++ b/src/variables.cc @@ -258,8 +258,14 @@ } } } - else if (sr && sr->is_function ()) - retval = 2.0; + else if (sr && sr->is_builtin_function ()) + { + retval = 5.0; + } + else if (sr && sr->is_user_function ()) + { + retval = 2.0; + } else { char *path = fcn_file_in_path (name); @@ -270,9 +276,18 @@ } else { - struct stat buf; - if (stat (name, &buf) == 0 && S_ISREG (buf.st_mode)) - retval = 2.0; + path = oct_file_in_path (name); + if (path) + { + delete [] path; + retval = 3.0; + } + else + { + struct stat buf; + if (stat (name, &buf) == 0 && S_ISREG (buf.st_mode)) + retval = 2.0; + } } }