Mercurial > hg > octave-nkf
comparison src/load-path.cc @ 5864:e884ab4f29ee
[project @ 2006-06-22 00:57:27 by jwe]
author | jwe |
---|---|
date | Thu, 22 Jun 2006 00:57:28 +0000 |
parents | 68f8017ef077 |
children | b305874f50ef |
comparison
equal
deleted
inserted
replaced
5863:4c16f3104aa5 | 5864:e884ab4f29ee |
---|---|
144 | 144 |
145 if (pos != NPOS) | 145 if (pos != NPOS) |
146 { | 146 { |
147 std::string ext = fname.substr (pos); | 147 std::string ext = fname.substr (pos); |
148 | 148 |
149 if (ext == ".m" || ext == ".oct") | 149 if (ext == ".m" || ext == ".oct" || ext == ".mex") |
150 { | 150 { |
151 std::string base = fname.substr (0, pos); | 151 std::string base = fname.substr (0, pos); |
152 | 152 |
153 if (valid_identifier (base)) | 153 if (valid_identifier (base)) |
154 fcn_files[fcn_files_count++] = fname; | 154 fcn_files[fcn_files_count++] = fname; |
201 | 201 |
202 if (ext == ".m") | 202 if (ext == ".m") |
203 t = load_path::M_FILE; | 203 t = load_path::M_FILE; |
204 else if (ext == ".oct") | 204 else if (ext == ".oct") |
205 t = load_path::OCT_FILE; | 205 t = load_path::OCT_FILE; |
206 else if (ext == ".mex") | |
207 t = load_path::MEX_FILE; | |
206 | 208 |
207 private_function_map[base] |= t; | 209 private_function_map[base] |= t; |
208 } | 210 } |
209 } | 211 } |
210 } | 212 } |
628 { | 630 { |
629 retval += ".m"; | 631 retval += ".m"; |
630 break; | 632 break; |
631 } | 633 } |
632 } | 634 } |
635 else if (type == load_path::MEX_FILE) | |
636 { | |
637 if ((type & t) == load_path::MEX_FILE) | |
638 { | |
639 retval += ".mex"; | |
640 break; | |
641 } | |
642 } | |
633 else if (type == (load_path::M_FILE | load_path::OCT_FILE)) | 643 else if (type == (load_path::M_FILE | load_path::OCT_FILE)) |
634 { | 644 { |
635 if (t & load_path::OCT_FILE) | 645 if (t & load_path::OCT_FILE) |
636 { | 646 { |
637 retval += ".oct"; | 647 retval += ".oct"; |
648 break; | |
649 } | |
650 else if (t & load_path::M_FILE) | |
651 { | |
652 retval += ".m"; | |
653 break; | |
654 } | |
655 } | |
656 else if (type == (load_path::M_FILE | load_path::MEX_FILE)) | |
657 { | |
658 if (t & load_path::MEX_FILE) | |
659 { | |
660 retval += ".mex"; | |
661 break; | |
662 } | |
663 else if (t & load_path::M_FILE) | |
664 { | |
665 retval += ".m"; | |
666 break; | |
667 } | |
668 } | |
669 else if (type == (load_path::OCT_FILE | load_path::MEX_FILE)) | |
670 { | |
671 if (t & load_path::OCT_FILE) | |
672 { | |
673 retval += ".oct"; | |
674 break; | |
675 } | |
676 else if (t & load_path::MEX_FILE) | |
677 { | |
678 retval += ".mex"; | |
679 break; | |
680 } | |
681 } | |
682 else if (type == (load_path::M_FILE | load_path::OCT_FILE | |
683 | load_path::MEX_FILE)) | |
684 { | |
685 if (t & load_path::OCT_FILE) | |
686 { | |
687 retval += ".oct"; | |
688 break; | |
689 } | |
690 else if (t & load_path::MEX_FILE) | |
691 { | |
692 retval += ".mex"; | |
638 break; | 693 break; |
639 } | 694 } |
640 else if (t & load_path::M_FILE) | 695 else if (t & load_path::M_FILE) |
641 { | 696 { |
642 retval += ".m"; | 697 retval += ".m"; |
926 { | 981 { |
927 os << "oct"; | 982 os << "oct"; |
928 printed_type = true; | 983 printed_type = true; |
929 } | 984 } |
930 | 985 |
986 if (types & load_path::MEX_FILE) | |
987 { | |
988 if (printed_type) | |
989 os << "|"; | |
990 os << "mex"; | |
991 printed_type = true; | |
992 } | |
993 | |
931 if (types & load_path::M_FILE) | 994 if (types & load_path::M_FILE) |
932 { | 995 { |
933 if (printed_type) | 996 if (printed_type) |
934 os << "|"; | 997 os << "|"; |
935 os << "m"; | 998 os << "m"; |
963 bool printed_type = false; | 1026 bool printed_type = false; |
964 | 1027 |
965 if (p->types & load_path::OCT_FILE) | 1028 if (p->types & load_path::OCT_FILE) |
966 { | 1029 { |
967 os << "oct"; | 1030 os << "oct"; |
1031 printed_type = true; | |
1032 } | |
1033 | |
1034 if (p->types & load_path::MEX_FILE) | |
1035 { | |
1036 if (printed_type) | |
1037 os << "|"; | |
1038 os << "mex"; | |
968 printed_type = true; | 1039 printed_type = true; |
969 } | 1040 } |
970 | 1041 |
971 if (p->types & load_path::M_FILE) | 1042 if (p->types & load_path::M_FILE) |
972 { | 1043 { |
1024 int t = 0; | 1095 int t = 0; |
1025 if (ext == ".m") | 1096 if (ext == ".m") |
1026 t = load_path::M_FILE; | 1097 t = load_path::M_FILE; |
1027 else if (ext == ".oct") | 1098 else if (ext == ".oct") |
1028 t = load_path::OCT_FILE; | 1099 t = load_path::OCT_FILE; |
1100 else if (ext == ".mex") | |
1101 t = load_path::MEX_FILE; | |
1029 | 1102 |
1030 if (p == file_info_list.end ()) | 1103 if (p == file_info_list.end ()) |
1031 { | 1104 { |
1032 file_info fi (dir_name, t); | 1105 file_info fi (dir_name, t); |
1033 | 1106 |