Mercurial > hg > octave-lyh
comparison src/error.cc @ 7202:ffdbdf53665c
[project @ 2007-11-27 20:14:41 by jwe]
author | jwe |
---|---|
date | Tue, 27 Nov 2007 20:16:19 +0000 |
parents | 120f3135952f |
children | 6e4ceeeb1940 |
comparison
equal
deleted
inserted
replaced
7201:76341ffda11e | 7202:ffdbdf53665c |
---|---|
1072 | 1072 |
1073 if (arg2 == "all") | 1073 if (arg2 == "all") |
1074 { | 1074 { |
1075 Octave_map tmp; | 1075 Octave_map tmp; |
1076 | 1076 |
1077 tmp.assign ("identifier", arg2); | 1077 Cell id (1, 1); |
1078 tmp.assign ("state", arg1); | 1078 Cell st (1, 1); |
1079 | |
1080 id(0) = arg2; | |
1081 st(0) = arg1; | |
1082 | |
1083 // Since internal Octave functions are not | |
1084 // compatible, turning all warnings into errors | |
1085 // should leave the state of | |
1086 // Octave:matlab-incompatible alone. | |
1087 | |
1088 if (arg1 == "error" | |
1089 && warning_options.contains ("identifier")) | |
1090 { | |
1091 Cell tid = warning_options.contents ("identifier"); | |
1092 Cell tst = warning_options.contents ("state"); | |
1093 | |
1094 for (octave_idx_type i = 0; i < tid.numel (); i++) | |
1095 { | |
1096 octave_value vid = tid(i); | |
1097 | |
1098 if (vid.is_string () | |
1099 && (vid.string_value () | |
1100 == "Octave:matlab-incompatible")) | |
1101 { | |
1102 id.resize (dim_vector (1, 2)); | |
1103 st.resize (dim_vector (1, 2)); | |
1104 | |
1105 id(1) = tid(i); | |
1106 st(1) = tst(i); | |
1107 | |
1108 break; | |
1109 } | |
1110 } | |
1111 } | |
1112 | |
1113 tmp.assign ("identifier", id); | |
1114 tmp.assign ("state", st); | |
1079 | 1115 |
1080 warning_options = tmp; | 1116 warning_options = tmp; |
1081 | 1117 |
1082 done = true; | 1118 done = true; |
1083 } | 1119 } |