comparison src/utils.cc @ 5823:080c08b192d8

[project @ 2006-05-19 05:32:17 by jwe]
author jwe
date Fri, 19 May 2006 05:32:19 +0000
parents 67bf9b4f2ae2
children 5e41e06f6a78
comparison
equal deleted inserted replaced
5822:4fdc2515ebad 5823:080c08b192d8
105 return retval; 105 return retval;
106 106
107 if (argc == 2) 107 if (argc == 2)
108 retval = valid_identifier (argv[1]); 108 retval = valid_identifier (argv[1]);
109 else 109 else
110 print_usage ("isvarname"); 110 print_usage ();
111 111
112 return retval; 112 return retval;
113 } 113 }
114 114
115 int 115 int
315 } 315 }
316 else 316 else
317 error ("file_in_loadpath: expecting string as first argument"); 317 error ("file_in_loadpath: expecting string as first argument");
318 } 318 }
319 else 319 else
320 print_usage ("file_in_loadpath"); 320 print_usage ();
321 321
322 return retval; 322 return retval;
323 } 323 }
324 324
325 DEFUN (file_in_path, args, , 325 DEFUN (file_in_path, args, ,
384 } 384 }
385 else 385 else
386 error ("file_in_path: expecting string as first argument"); 386 error ("file_in_path: expecting string as first argument");
387 } 387 }
388 else 388 else
389 print_usage ("file_in_path"); 389 print_usage ();
390 390
391 return retval; 391 return retval;
392 } 392 }
393 393
394 std::string 394 std::string
546 retval = do_string_escapes (args(0).string_value ()); 546 retval = do_string_escapes (args(0).string_value ());
547 else 547 else
548 error ("do_string_escapes: argument must be a string"); 548 error ("do_string_escapes: argument must be a string");
549 } 549 }
550 else 550 else
551 print_usage ("do_string_escapes"); 551 print_usage ();
552 552
553 return retval; 553 return retval;
554 } 554 }
555 555
556 const char * 556 const char *
650 retval = undo_string_escapes (args(0).string_value ()); 650 retval = undo_string_escapes (args(0).string_value ());
651 else 651 else
652 error ("undo_string_escapes: argument must be a string"); 652 error ("undo_string_escapes: argument must be a string");
653 } 653 }
654 else 654 else
655 print_usage ("undo_string_escapes"); 655 print_usage ();
656 656
657 return retval; 657 return retval;
658 } 658 }
659 659
660 DEFUN (find_first_of_in_loadpath, args, , "") 660 DEFUN (find_first_of_in_loadpath, args, , "")
667 667
668 if (! error_state) 668 if (! error_state)
669 retval = Vload_path_dir_path.find_all_first_of (names); 669 retval = Vload_path_dir_path.find_all_first_of (names);
670 } 670 }
671 else 671 else
672 print_usage ("find_first_of_in_loadpath"); 672 print_usage ();
673 673
674 return retval; 674 return retval;
675 } 675 }
676 676
677 DEFUNX ("errno", Ferrno, args, , 677 DEFUNX ("errno", Ferrno, args, ,
711 } 711 }
712 } 712 }
713 else if (nargin == 0) 713 else if (nargin == 0)
714 retval = octave_errno::get (); 714 retval = octave_errno::get ();
715 else 715 else
716 print_usage ("errno"); 716 print_usage ();
717 717
718 return retval; 718 return retval;
719 } 719 }
720 720
721 DEFUN (errno_list, args, , 721 DEFUN (errno_list, args, ,
727 octave_value retval; 727 octave_value retval;
728 728
729 if (args.length () == 0) 729 if (args.length () == 0)
730 retval = octave_errno::list (); 730 retval = octave_errno::list ();
731 else 731 else
732 print_usage ("errno_list"); 732 print_usage ();
733 733
734 return retval; 734 return retval;
735 } 735 }
736 736
737 static void 737 static void