Mercurial > hg > octave-nkf
diff src/variables.cc @ 1421:3b77015d7f42
[project @ 1995-09-16 01:39:45 by jwe]
author | jwe |
---|---|
date | Sat, 16 Sep 1995 01:39:45 +0000 |
parents | 0bdbc15a112b |
children | 2d88758ed94b |
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; + } } }