Mercurial > octave-nkf
diff src/variables.cc @ 4604:cba347c642e2
[project @ 2003-11-13 04:38:05 by jwe]
author | jwe |
---|---|
date | Thu, 13 Nov 2003 04:38:05 +0000 |
parents | 7b957b442818 |
children | ca3a1d687bba |
line wrap: on
line diff
--- a/src/variables.cc Wed Nov 12 18:54:11 2003 +0000 +++ b/src/variables.cc Thu Nov 13 04:38:05 2003 +0000 @@ -32,6 +32,7 @@ #include "file-stat.h" #include "oct-env.h" +#include "file-ops.h" #include "glob-match.h" #include "str-vec.h" @@ -466,7 +467,11 @@ bool looks_like_struct (const std::string& text) { - bool retval = false; + bool retval = (! text.empty () + && text != "." + && text.find_first_of (file_ops::dir_sep_chars) == NPOS + && text.find ("..") == NPOS + && text.rfind ('.') != NPOS); #if 0 symbol_record *sr = curr_sym_tab->lookup (text);