Mercurial > octave-nkf
comparison src/variables.cc @ 4143:62afb31c1f85
[project @ 2002-11-01 17:27:38 by jwe]
author | jwe |
---|---|
date | Fri, 01 Nov 2002 17:27:38 +0000 |
parents | 63a5613cca00 |
children | 8734ba917fea |
comparison
equal
deleted
inserted
replaced
4142:0739d46e778c | 4143:62afb31c1f85 |
---|---|
289 prefix = text.substr (0, pos); | 289 prefix = text.substr (0, pos); |
290 } | 290 } |
291 | 291 |
292 int parse_status; | 292 int parse_status; |
293 | 293 |
294 unwind_protect::begin_frame ("generate_struct_completions"); | |
295 | |
294 unwind_protect_str (Vwarning_option); | 296 unwind_protect_str (Vwarning_option); |
297 unwind_protect_bool (discard_error_messages); | |
298 unwind_protect_int (error_state); | |
295 | 299 |
296 Vwarning_option = "off"; | 300 Vwarning_option = "off"; |
301 discard_error_messages = true; | |
297 | 302 |
298 octave_value tmp = eval_string (prefix, true, parse_status); | 303 octave_value tmp = eval_string (prefix, true, parse_status); |
299 | 304 |
300 unwind_protect::run (); | 305 unwind_protect::run_frame ("generate_struct_completions"); |
301 | 306 |
302 if (tmp.is_defined () && tmp.is_map ()) | 307 if (tmp.is_defined () && tmp.is_map ()) |
303 names = tmp.map_keys (); | 308 names = tmp.map_keys (); |
304 | 309 |
305 return names; | 310 return names; |
314 | 319 |
315 if (sr && ! sr->is_function ()) | 320 if (sr && ! sr->is_function ()) |
316 { | 321 { |
317 int parse_status; | 322 int parse_status; |
318 | 323 |
324 unwind_protect::begin_frame ("looks_like_struct"); | |
325 | |
326 unwind_protect_str (Vwarning_option); | |
327 unwind_protect_bool (discard_error_messages); | |
328 unwind_protect_int (error_state); | |
329 | |
330 Vwarning_option = "off"; | |
331 discard_error_messages = true; | |
332 | |
319 octave_value tmp = eval_string (text, true, parse_status); | 333 octave_value tmp = eval_string (text, true, parse_status); |
334 | |
335 unwind_protect::run_frame ("looks_like_struct"); | |
320 | 336 |
321 retval = (tmp.is_defined () && tmp.is_map ()); | 337 retval = (tmp.is_defined () && tmp.is_map ()); |
322 } | 338 } |
323 | 339 |
324 return retval; | 340 return retval; |