Mercurial > hg > octave-nkf
comparison src/variables.cc @ 4437:0a59e4de215e
[project @ 2003-06-24 19:28:48 by jwe]
author | jwe |
---|---|
date | Tue, 24 Jun 2003 19:28:48 +0000 |
parents | dd7af4fa1942 |
children | 4cc739e3cbd8 |
comparison
equal
deleted
inserted
replaced
4436:689f730954b3 | 4437:0a59e4de215e |
---|---|
601 } | 601 } |
602 } | 602 } |
603 | 603 |
604 if (! retval) | 604 if (! retval) |
605 { | 605 { |
606 std::string file_name = fcn_file_in_path (name); | 606 string_vector names (2); |
607 | 607 |
608 if ((type == "any" || type == "file") && ! file_name.empty ()) | 608 names(0) = name + ".oct"; |
609 { | 609 names(1) = name + ".m"; |
610 retval = 2; | 610 |
611 } | 611 std::string file_name = Vload_path_dir_path.find_first_of (names); |
612 } | 612 |
613 | 613 size_t len = file_name.length (); |
614 if (! retval) | 614 |
615 { | 615 if (! file_name.empty ()) |
616 std::string file_name = oct_file_in_path (name); | 616 { |
617 | 617 if (type == "any" || type == "file") |
618 if ((type == "any" || type == "file") && ! file_name.empty ()) | 618 { |
619 { | 619 if (file_name.substr (len-4) == ".oct") |
620 retval = 3; | 620 retval = 3; |
621 else | |
622 retval = 2; | |
623 } | |
621 } | 624 } |
622 } | 625 } |
623 | 626 |
624 if (! retval) | 627 if (! retval) |
625 { | 628 { |