summaryrefslogtreecommitdiffstats
path: root/scilab/modules/output_stream
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-05-07 12:04:48 +0200
committerSylvestre Ledru <sylvestre.ledru@scilab.org>2010-05-11 11:25:09 +0200
commite55ecc1a17777c5f8eb6f41a25097f6a1b83e8a7 (patch)
treec255261d37a95ff98b8a298d13fa767a6a48883b /scilab/modules/output_stream
parent64c6d2da6a04c0be1273fef864155b67fbd519a1 (diff)
downloadscilab-e55ecc1a17777c5f8eb6f41a25097f6a1b83e8a7.zip
scilab-e55ecc1a17777c5f8eb6f41a25097f6a1b83e8a7.tar.gz
bug 7006
Change-Id: I8576e3444ac99bf6be874ca7b8bf87f26bd936ea
Diffstat (limited to 'scilab/modules/output_stream')
-rw-r--r--scilab/modules/output_stream/src/c/errmsg.c3222
1 files changed, 1612 insertions, 1610 deletions
diff --git a/scilab/modules/output_stream/src/c/errmsg.c b/scilab/modules/output_stream/src/c/errmsg.c
index 43ad66c..9c47b78 100644
--- a/scilab/modules/output_stream/src/c/errmsg.c
+++ b/scilab/modules/output_stream/src/c/errmsg.c
@@ -42,1679 +42,1681 @@ static char *defaultStringError(void);
42#endif 42#endif
43/*--------------------------------------------------------------------------*/ 43/*--------------------------------------------------------------------------*/
44typedef enum { 44typedef enum {
45 CVNAME_READING_TYPE_1 = 0, 45 CVNAME_READING_TYPE_1 = 0,
46 CVNAME_READING_TYPE_2 = 1, 46 CVNAME_READING_TYPE_2 = 1,
47 CVNAME_READING_TYPE_3 = 2, 47 CVNAME_READING_TYPE_3 = 2,
48 CVNAME_READING_TYPE_4 = 3, 48 CVNAME_READING_TYPE_4 = 3,
49 CVNAME_READING_TYPE_5 = 4, 49 CVNAME_READING_TYPE_5 = 4,
50 CVNAME_READING_TYPE_6 = 5, 50 CVNAME_READING_TYPE_6 = 5,
51} CVNAME_TYPE; 51} CVNAME_TYPE;
52/*--------------------------------------------------------------------------*/ 52/*--------------------------------------------------------------------------*/
53int C2F(errmsg)(int *n,int *errtyp) 53int C2F(errmsg)(int *n,int *errtyp)
54{ 54{
55 resetLastError(); 55 resetLastError();
56
57 /* store error code (lasterror) */
58 C2F(errstore)(n);
59 56
60 *errtyp = 0; /* by default errors are recoverable */ 57 /* store error code (lasterror) */
61 /* errors not recoverable aren't catchable by top 58 C2F(errstore)(n);
62 try,catch */ 59
63 /* errors 2,3,16,26,31,34,35,40,46,47,276*/ 60 *errtyp = 0; /* by default errors are recoverable */
61 /* errors not recoverable aren't catchable by top
62 try,catch */
63 /* errors 2,3,16,26,31,34,35,40,46,47,276*/
64 64
65 switch ((int)*n) 65 switch ((int)*n)
66 { 66 {
67 case 1: 67 case 1:
68 { 68 {
69 displayAndStoreError(_("Incorrect assignment.\n")); 69 displayAndStoreError(_("Incorrect assignment.\n"));
70
71 }
72 break;
73 case 2:
74 {
75 displayAndStoreError(_("Invalid factor.\n"));
76 *errtyp = 1;
77 }
78 break;
79 case 3:
80 {
81 displayAndStoreError(_("Waiting for right parenthesis.\n"));
82 *errtyp = 1;
83 }
84 break;
85 case 4:
86 {
87 /* bug 6435 */
88 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_6);
89 if (NameVarOnStack)
90 {
91 if (NameVarOnStack[0] != '0')
92 {
93 displayAndStoreError(_("Undefined variable: %s\n"), NameVarOnStack);
94 FREE(NameVarOnStack);
95 NameVarOnStack = NULL;
96 break;
97 }
98
99 FREE(NameVarOnStack);
100 NameVarOnStack = NULL;
101 }
102 displayAndStoreError(_("Undefined variable.\n"));
103 }
104 break;
105 case 5:
106 {
107 displayAndStoreError(_("Inconsistent column/row dimensions.\n"));
108 }
109 break;
110 case 6:
111 {
112 displayAndStoreError(_("Inconsistent row/column dimensions.\n"));
113 }
114 break;
115 case 7:
116 {
117 displayAndStoreError(_("Dot cannot be used as modifier for this operator.\n"));
118 }
119 break;
120 case 8:
121 {
122 displayAndStoreError(_("Inconsistent addition.\n"));
123 }
124 break;
125 case 9:
126 {
127 displayAndStoreError(_("Inconsistent subtraction.\n"));
128 }
129 break;
130 case 10:
131 {
132 displayAndStoreError(_("Inconsistent multiplication.\n"));
133 }
134 break;
135 case 11:
136 {
137 displayAndStoreError(_("Inconsistent right division.\n"));
138 }
139 break;
140 case 12:
141 {
142 displayAndStoreError(_("Inconsistent left division.\n"));
143 }
144 break;
145 case 13:
146 {
147 displayAndStoreError(_("Redefining permanent variable.\n"));
148 }
149 break;
150 case 14:
151 {
152 displayAndStoreError(_("Eye variable undefined in this context.\n"));
153 }
154 break;
155 case 15:
156 {
157 displayAndStoreError(_("Submatrix incorrectly defined.\n"));
158 }
159 break;
160 case 16:
161 {
162 displayAndStoreError(_("Incorrect command!\n"));
163 *errtyp = 1; /* error not recoverable */
164 }
165 break;
166 case 17:
167 {
168 int Memory_used_for_variables = 0;
169 int Intermediate_Memory = 0;
170 int Total_Memory_available = 0;
70 171
71 } 172 Intermediate_Memory = getIntermediateMemoryNeeded();
72 break; 173 C2F(getstackinfo)(&Total_Memory_available,&Memory_used_for_variables);
73 case 2:
74 {
75 displayAndStoreError(_("Invalid factor.\n"));
76 *errtyp = 1;
77 }
78 break;
79 case 3:
80 {
81 displayAndStoreError(_("Waiting for right parenthesis.\n"));
82 *errtyp = 1;
83 }
84 break;
85 case 4:
86 {
87 /* bug 6435 */
88 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_6);
89 if (NameVarOnStack)
90 {
91 if (NameVarOnStack[0] != '0')
92 {
93 displayAndStoreError(_("Undefined variable: %s\n"), NameVarOnStack);
94 FREE(NameVarOnStack);
95 NameVarOnStack = NULL;
96 break;
97 }
98 174
99 FREE(NameVarOnStack); 175 displayAndStoreError(_("stack size exceeded!\n"));
100 NameVarOnStack = NULL; 176 displayAndStoreError(_("Use stacksize function to increase it.\n"));
101 } 177 displayAndStoreError(_("Memory used for variables: %d\n"),Memory_used_for_variables);
102 displayAndStoreError(_("Undefined variable.\n")); 178 displayAndStoreError(_("Intermediate memory needed: %d\n"),Intermediate_Memory);
103 } 179 displayAndStoreError(_("Total memory available: %d\n"),Total_Memory_available);
104 break; 180 }
105 case 5: 181 break;
106 { 182 case 18:
107 displayAndStoreError(_("Inconsistent column/row dimensions.\n")); 183 {
108 } 184 displayAndStoreError(_("Too many variables!\n"));
109 break; 185 }
110 case 6: 186 break;
111 { 187 case 19:
112 displayAndStoreError(_("Inconsistent row/column dimensions.\n")); 188 {
113 } 189 displayAndStoreError(_("Problem is singular.\n"));
114 break; 190 }
115 case 7: 191 break;
116 { 192 case 20:
117 displayAndStoreError(_("Dot cannot be used as modifier for this operator.\n")); 193 {
118 } 194 if (Err == 1)
119 break; 195 {
120 case 8: 196 displayAndStoreError(_("Wrong type for first argument: Square matrix expected.\n"));
121 { 197 }
122 displayAndStoreError(_("Inconsistent addition.\n")); 198 else
123 } 199 {
124 break; 200 displayAndStoreError(_("Wrong type for argument %d: Square matrix expected.\n"),Err);
125 case 9: 201 }
126 { 202 }
127 displayAndStoreError(_("Inconsistent subtraction.\n")); 203 break;
128 } 204 case 21:
129 break; 205 {
130 case 10: 206 displayAndStoreError(_("Invalid index.\n"));
131 { 207 }
132 displayAndStoreError(_("Inconsistent multiplication.\n")); 208 break;
133 } 209 case 22:
134 break; 210 {
135 case 11: 211 displayAndStoreError(_("Recursion problems. Sorry...\n"));
136 { 212 }
137 displayAndStoreError(_("Inconsistent right division.\n")); 213 break;
138 } 214 case 23:
139 break; 215 {
140 case 12: 216 displayAndStoreError(_("Matrix norms available are 1, 2, inf, and fro.\n"));
141 { 217 }
142 displayAndStoreError(_("Inconsistent left division.\n")); 218 break;
143 } 219 case 24:
144 break; 220 {
145 case 13: 221 displayAndStoreError(_("Convergence problem...\n"));
146 { 222 }
147 displayAndStoreError(_("Redefining permanent variable.\n")); 223 break;
148 } 224 case 25:
149 break; 225 {
150 case 14: 226 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
151 { 227 if (NameVarOnStack)
152 displayAndStoreError(_("Eye variable undefined in this context.\n")); 228 {
153 } 229 displayAndStoreError(_("Bad call to primitive: %s\n"),NameVarOnStack);
154 break; 230 FREE(NameVarOnStack);
155 case 15: 231 NameVarOnStack = NULL;
156 { 232 }
157 displayAndStoreError(_("Submatrix incorrectly defined.\n")); 233 }
158 } 234 break;
159 break; 235 case 26:
160 case 16: 236 {
161 { 237 displayAndStoreError(_("Too complex recursion! (recursion tables are full)\n"));
162 displayAndStoreError(_("Incorrect command!\n")); 238 /* break recursion */
163 *errtyp = 1; /* error not recoverable */ 239 C2F(recu).pt = Min(C2F(recu).pt,psiz);
164 } 240 *errtyp = 1; /* error not recoverable */
165 break; 241 }
166 case 17: 242 break;
167 { 243 case 27:
168 int Memory_used_for_variables = 0; 244 {
169 int Intermediate_Memory = 0; 245 displayAndStoreError(_("Division by zero...\n"));
170 int Total_Memory_available = 0; 246 }
247 break;
248 case 28:
249 {
250 displayAndStoreError(_("Empty function...\n"));
251 }
252 break;
253 case 29:
254 {
255 displayAndStoreError(_("Matrix is not positive definite.\n"));
256 }
257 break;
258 case 30:
259 {
260 displayAndStoreError(_("Invalid exponent.\n"));
261 }
262 break;
263 case 31:
264 {
265 displayAndStoreError(_( "Incorrect string.\n"));
266 *errtyp = 1; /* error not recoverable */
267 }
268 break;
269 case 32:
270 {
271 displayAndStoreError(_("Singularity of log or tan function.\n"));
272 }
273 break;
274 case 33:
275 {
276 displayAndStoreError(_("Too many ':'\n"));
277 }
278 break;
279 case 34:
280 {
281 displayAndStoreError(_("Incorrect control instruction syntax.\n"));
282 *errtyp = 1; /* error not recoverable */
283 }
284 break;
285 case 35:
286 {
287 switch (C2F(recu).ids[C2F(recu).pt * nsiz - nsiz]) /* find instruction type */
288 {
289 case 1: /* if */
290 displayAndStoreError(_("Syntax error in a '%s' instruction.\n"),"if");
291 break;
171 292
172 Intermediate_Memory = getIntermediateMemoryNeeded(); 293 case 2: /* while */
173 C2F(getstackinfo)(&Total_Memory_available,&Memory_used_for_variables); 294 displayAndStoreError(_("Syntax error in a '%s' instruction.\n"),"while");
295 break;
174 296
175 displayAndStoreError(_("stack size exceeded!\n")); 297 default: /* select/case */
176 displayAndStoreError(_("Use stacksize function to increase it.\n")); 298 displayAndStoreError(_("Syntax error in a '%s' instruction.\n"),"select/case");
177 displayAndStoreError(_("Memory used for variables: %d\n"),Memory_used_for_variables); 299 break;
178 displayAndStoreError(_("Intermediate memory needed: %d\n"),Intermediate_Memory); 300 }
179 displayAndStoreError(_("Total memory available: %d\n"),Total_Memory_available); 301 *errtyp = 1; /* error not recoverable */
180 } 302 }
181 break; 303 break;
182 case 18: 304 case 36:
183 { 305 {
184 displayAndStoreError(_("Too many variables!\n")); 306 if (Err == 1)
185 } 307 {
186 break; 308 displayAndStoreError(_("Wrong first argument.\n"));
187 case 19: 309 }
188 { 310 else
189 displayAndStoreError(_("Problem is singular.\n")); 311 {
190 } 312 displayAndStoreError(_("Wrong input argument %d.\n"),Err);
191 break; 313 }
192 case 20: 314 }
193 { 315 break;
194 if (Err == 1) 316 case 37:
195 { 317 {
196 displayAndStoreError(_("Wrong type for first argument: Square matrix expected.\n")); 318 if (Err>0)
197 } 319 displayAndStoreError(_("Incorrect function at line %d.\n"),Err);
198 else 320 else
199 { 321 displayAndStoreError(_("Incorrect function.\n"));
200 displayAndStoreError(_("Wrong type for argument %d: Square matrix expected.\n"),Err); 322 }
201 } 323 break;
202 } 324 case 38:
203 break; 325 {
204 case 21: 326 displayAndStoreError(_("Wrong file name.\n"));
205 { 327 }
206 displayAndStoreError(_("Invalid index.\n")); 328 break;
207 } 329 case 39:
208 break; 330 {
209 case 22: 331 displayAndStoreError(_("Incorrect number of input arguments.\n"));
210 { 332 }
211 displayAndStoreError(_("Recursion problems. Sorry...\n")); 333 break;
212 } 334 case 40:
213 break; 335 {
214 case 23: 336 displayAndStoreError(_("Waiting for end of command.\n"));
215 { 337 *errtyp = 1; /* error not recoverable */
216 displayAndStoreError(_("Matrix norms available are 1, 2, inf, and fro.\n")); 338 }
217 } 339 break;
218 break; 340 case 41:
219 case 24: 341 {
220 { 342 displayAndStoreError(_("Incompatible output argument.\n"));
221 displayAndStoreError(_("Convergence problem...\n")); 343 }
222 } 344 break;
223 break; 345 case 42:
224 case 25: 346 {
225 { 347 displayAndStoreError(_("Incompatible input argument.\n"));
226 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2); 348 }
227 if (NameVarOnStack) 349 break;
228 { 350 case 43:
229 displayAndStoreError(_("Bad call to primitive: %s\n"),NameVarOnStack); 351 {
230 FREE(NameVarOnStack); 352 displayAndStoreError(_("Not implemented in scilab...\n"));
231 NameVarOnStack = NULL; 353 }
232 } 354 break;
233 } 355 case 44:
234 break; 356 {
235 case 26: 357 if (Err == 1)
236 { 358 {
237 displayAndStoreError(_("Too complex recursion! (recursion tables are full)\n")); 359 displayAndStoreError(_("Wrong first argument.\n"));
238 /* break recursion */ 360 }
239 C2F(recu).pt = Min(C2F(recu).pt,psiz); 361 else
240 *errtyp = 1; /* error not recoverable */ 362 {
241 } 363 displayAndStoreError(_("Wrong argument %d.\n"),Err);
242 break; 364 }
243 case 27:
244 {
245 displayAndStoreError(_("Division by zero...\n"));
246 }
247 break;
248 case 28:
249 {
250 displayAndStoreError(_("Empty function...\n"));
251 }
252 break;
253 case 29:
254 {
255 displayAndStoreError(_("Matrix is not positive definite.\n"));
256 }
257 break;
258 case 30:
259 {
260 displayAndStoreError(_("Invalid exponent.\n"));
261 }
262 break;
263 case 31:
264 {
265 displayAndStoreError(_( "Incorrect string.\n"));
266 *errtyp = 1; /* error not recoverable */
267 }
268 break;
269 case 32:
270 {
271 displayAndStoreError(_("Singularity of log or tan function.\n"));
272 }
273 break;
274 case 33:
275 {
276 displayAndStoreError(_("Too many ':'\n"));
277 }
278 break;
279 case 34:
280 {
281 displayAndStoreError(_("Incorrect control instruction syntax.\n"));
282 *errtyp = 1; /* error not recoverable */
283 }
284 break;
285 case 35:
286 {
287 switch (C2F(recu).ids[C2F(recu).pt * nsiz - nsiz]) /* find instruction type */
288 {
289 case 1: /* if */
290 displayAndStoreError(_("Syntax error in a '%s' instruction.\n"),"if");
291 break;
292 365
293 case 2: /* while */ 366 }
294 displayAndStoreError(_("Syntax error in a '%s' instruction.\n"),"while"); 367 break;
295 break; 368 case 45:
369 {
370 displayAndStoreError(_("null matrix (argument # %d).\n"),Err);
371 }
372 break;
373 case 46:
374 {
375 displayAndStoreError(_("Incorrect syntax.\n"));
376 *errtyp = 1; /* error not recoverable */
377 }
378 break;
379 case 47:
380 {
381 displayAndStoreError(_(" end or else is missing...\n"));
382 *errtyp = 1; /* error not recoverable */
383 }
384 break;
385 case 48:
386 {
387 displayAndStoreError(_(" input line longer than buffer size: %d\n"),bsiz);
388 }
389 break;
390 case 49:
391 {
392 displayAndStoreError(_("Incorrect file or format.\n"));
393 }
394 break;
395 case 50:
396 {
397 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_5);
398 if (NameVarOnStack)
399 {
400 displayAndStoreError(_("subroutine not found: %s\n"),NameVarOnStack);
401 FREE(NameVarOnStack);
402 NameVarOnStack = NULL;
403 }
404 }
405 break;
406 case 51:
407 {
408 /* no message */
409 }
410 break;
411 case 52:
412 {
413 displayAndStoreError(_("Wrong type for argument %d: Real matrix expected.\n"),Err);
414 }
415 break;
416 case 53:
417 {
418 displayAndStoreError(_("Wrong type for input argument %d: Real or complex matrix expected.\n"),Err);
419 }
420 break;
421 case 54:
422 {
423 displayAndStoreError(_("Wrong type for input argument %d: Polynomial expected.\n"),Err);
424 }
425 break;
426 case 55:
427 {
428 displayAndStoreError(_("Wrong type for argument %d: String expected.\n"),Err);
429 }
430 break;
431 case 56:
432 {
433 displayAndStoreError(_("Wrong type for argument %d: List expected.\n"),Err);
434 }
435 break;
436 case 57:
437 {
438 displayAndStoreError(_("Problem with comparison symbol...\n"));
439 }
440 break;
441 case 58:
442 {
443 if (Rhs == 0)
444 {
445 displayAndStoreError(_("Wrong number of input arguments: This function has no input argument.\n"));
446 }
447 else
448 {
449 displayAndStoreError(_("Wrong number of input arguments:\n"));
450 displayAndStoreError(_("Arguments are :\n"));
451 /* print variables name on stack :( */
452 C2F(prntid)(istk(C2F(recu).pstk[C2F(recu).pt - 1]), &Rhs, &C2F(iop).wte);
453 }
296 454
297 default: /* select/case */ 455 }
298 displayAndStoreError(_("Syntax error in a '%s' instruction.\n"),"select/case"); 456 break;
299 break; 457 case 59:
300 } 458 {
301 *errtyp = 1; /* error not recoverable */ 459 if (Lhs == 0)
302 } 460 {
303 break; 461 displayAndStoreError(_("Wrong number of output arguments: This function has no output argument.\n"));
304 case 36: 462 }
305 { 463 else
306 if (Err == 1) 464 {
307 { 465 displayAndStoreError(_("Wrong number of output arguments\n"));
308 displayAndStoreError(_("Wrong first argument.\n")); 466 displayAndStoreError(_("Arguments are :\n"));
309 } 467 /* print variables name on stack :( */
310 else 468 C2F(prntid)(istk(C2F(recu).pstk[C2F(recu).pt - 1]), &Lhs, &C2F(iop).wte);
311 { 469 }
312 displayAndStoreError(_("Wrong input argument %d.\n"),Err); 470 }
313 } 471 break;
314 } 472 case 60:
315 break; 473 {
316 case 37: 474 displayAndStoreError(_("Wrong size for argument: Incompatible dimensions.\n"));
317 { 475 }
318 if (Err>0) 476 break;
319 displayAndStoreError(_("Incorrect function at line %d.\n"),Err); 477 case 61:
320 else 478 {
321 displayAndStoreError(_("Incorrect function.\n")); 479 displayAndStoreError(_("Direct access : give format.\n"));
322 } 480 }
323 break; 481 break;
324 case 38: 482 case 62:
325 { 483 {
326 displayAndStoreError(_("Wrong file name.\n")); 484 displayAndStoreError(_("End of file at line %d.\n"),Err);
327 } 485 }
328 break; 486 break;
329 case 39: 487 case 63:
330 { 488 {
331 displayAndStoreError(_("Incorrect number of input arguments.\n")); 489 displayAndStoreError(_("%d graphic terminal?\n"),Err);
332 } 490 }
333 break; 491 break;
334 case 40: 492 case 64:
335 { 493 {
336 displayAndStoreError(_("Waiting for end of command.\n")); 494 displayAndStoreError(_("Integration fails.\n"));
337 *errtyp = 1; /* error not recoverable */ 495 }
338 } 496 break;
339 break; 497 case 65:
340 case 41: 498 {
341 { 499 displayAndStoreError(_("%d: logical unit already used.\n"),Err);
342 displayAndStoreError(_("Incompatible output argument.\n")); 500 }
343 } 501 break;
344 break; 502 case 66:
345 case 42: 503 {
346 { 504 displayAndStoreError(_("Too many files opened!\n"));
347 displayAndStoreError(_("Incompatible input argument.\n")); 505 }
348 } 506 break;
349 break; 507 case 67:
350 case 43: 508 {
351 { 509 displayAndStoreError(_("Unknown file format.\n"));
352 displayAndStoreError(_("Not implemented in scilab...\n")); 510 }
353 } 511 break;
354 break; 512 case 68:
355 case 44: 513 {
356 { 514 displayAndStoreError(_("Fatal error!!! Your variables have been saved in the file : %s\n\
357 if (Err == 1) 515 Bad call to a scilab function ?\n\
358 { 516 Otherwise, send a bug report to :\n"),get_sci_data_strings(SAVE_ID));
359 displayAndStoreError(_("Wrong first argument.\n")); 517 displayAndStoreError("http://bugzilla.scilab.org/\n");
360 } 518 }
361 else 519 break;
362 { 520 case 69:
363 displayAndStoreError(_("Wrong argument %d.\n"),Err); 521 {
364 } 522 displayAndStoreError(_("Floating point exception.\n"));
523 }
524 break;
525 case 70:
526 {
527 displayAndStoreError(_("Too many arguments in fort (max 30).\n"));
528 }
529 break;
530 case 71:
531 {
532 displayAndStoreError(_("This variable is not valid in fort.\n"));
533 }
534 break;
535 case 72:
536 {
537 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
538 if (NameVarOnStack)
539 {
540 displayAndStoreError(_("%s is not valid in this context.\n"),NameVarOnStack);
541 FREE(NameVarOnStack);
542 NameVarOnStack = NULL;
543 }
544 }
545 break;
546 case 73:
547 {
548 displayAndStoreError(_("Error while linking.\n"));
549 }
550 break;
551 case 74:
552 {
553 displayAndStoreError(_("Leading coefficient is zero.\n"));
554 }
555 break;
556 case 75:
557 {
558 displayAndStoreError(_("Too high degree (max 100).\n"));
559 }
560 break;
561 case 76:
562 {
563 displayAndStoreError(_("for x=val with type(val)=%d is not implemented in Scilab.\n"),Err);
564 }
565 break;
566 case 77:
567 {
568 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
569 if (NameVarOnStack)
570 {
571 displayAndStoreError(_("%s: Wrong number of input arguments.\n"),NameVarOnStack);
572 FREE(NameVarOnStack);
573 NameVarOnStack = NULL;
574 }
575 }
576 break;
577 case 78:
578 {
579 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
580 if (NameVarOnStack)
581 {
582 displayAndStoreError(_("%s: Wrong number of output arguments.\n"),NameVarOnStack);
583 FREE(NameVarOnStack);
584 NameVarOnStack = NULL;
585 }
586 }
587 break;
588 case 79:
589 {
590 displayAndStoreError(_("Indexing not allowed for output arguments of resume.\n"),Err);
365 591
366 } 592 }
367 break; 593 break;
368 case 45: 594 case 80:
369 { 595 {
370 displayAndStoreError(_("null matrix (argument # %d).\n"),Err); 596 displayAndStoreError(_("Incorrect function (argument n: %d).\n"),Err);
371 } 597 }
372 break; 598 break;
373 case 46: 599 case 81:
374 { 600 {
375 displayAndStoreError(_("Incorrect syntax.\n")); 601 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
376 *errtyp = 1; /* error not recoverable */ 602 if (NameVarOnStack)
377 } 603 {
378 break; 604 displayAndStoreError(_("%s: Wrong type for argument %d: Real or complex matrix expected.\n"),NameVarOnStack,Err);
379 case 47: 605 FREE(NameVarOnStack);
380 { 606 NameVarOnStack = NULL;
381 displayAndStoreError(_(" end or else is missing...\n")); 607 }
382 *errtyp = 1; /* error not recoverable */ 608 }
383 } 609 break;
384 break; 610 case 82:
385 case 48: 611 {
386 { 612 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
387 displayAndStoreError(_(" input line longer than buffer size: %d\n"),bsiz); 613 if (NameVarOnStack)
388 } 614 {
389 break; 615 displayAndStoreError(_("%s: Wrong type for argument %d: Real matrix expected.\n"),NameVarOnStack, Err);
390 case 49: 616 FREE(NameVarOnStack);
391 { 617 NameVarOnStack = NULL;
392 displayAndStoreError(_("Incorrect file or format.\n")); 618 }
393 } 619 }
394 break; 620 break;
395 case 50: 621 case 83:
396 { 622 {
397 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_5); 623 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
398 if (NameVarOnStack) 624 if (NameVarOnStack)
399 { 625 {
400 displayAndStoreError(_("subroutine not found: %s\n"),NameVarOnStack); 626 displayAndStoreError(_("%s: Wrong type for argument %d: Real vector expected.\n"),NameVarOnStack,Err);
401 FREE(NameVarOnStack); 627 FREE(NameVarOnStack);
402 NameVarOnStack = NULL; 628 NameVarOnStack = NULL;
403 } 629 }
404 } 630 }
405 break; 631 break;
406 case 51: 632 case 84:
407 { 633 {
408 /* no message */ 634 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
409 } 635 if (NameVarOnStack)
410 break; 636 {
411 case 52: 637 displayAndStoreError(_("%s: Wrong type for argument %d: Scalar expected.\n"),NameVarOnStack,Err);
412 { 638 FREE(NameVarOnStack);
413 displayAndStoreError(_("Wrong type for argument %d: Real matrix expected.\n"),Err); 639 NameVarOnStack = NULL;
414 } 640 }
415 break; 641 }
416 case 53: 642 break;
417 { 643 case 85:
418 displayAndStoreError(_("Wrong type for input argument %d: Real or complex matrix expected.\n"),Err); 644 {
419 } 645 displayAndStoreError(_("Host does not answer...\n"));
420 break; 646 }
421 case 54: 647 break;
422 { 648 case 86:
423 displayAndStoreError(_("Wrong type for input argument %d: Polynomial expected.\n"),Err); 649 {
424 } 650 displayAndStoreError(_("Uncontrollable system.\n"));
425 break; 651 }
426 case 55: 652 break;
427 { 653 case 87:
428 displayAndStoreError(_("Wrong type for argument %d: String expected.\n"),Err); 654 {
429 } 655 displayAndStoreError(_("Unobservable system.\n"));
430 break; 656 }
431 case 56: 657 break;
432 { 658 case 88:
433 displayAndStoreError(_("Wrong type for argument %d: List expected.\n"),Err); 659 {
434 } 660 displayAndStoreError(_("%s: singular or asymmetric problem.\n"),"sfact");
435 break; 661 }
436 case 57: 662 break;
437 { 663 case 89:
438 displayAndStoreError(_("Problem with comparison symbol...\n")); 664 {
439 } 665 displayAndStoreError(_("Wrong size for argument %d.\n"),Err);
440 break; 666 }
441 case 58: 667 break;
442 { 668 case 90:
443 if (Rhs == 0) 669 {
444 { 670 displayAndStoreError(_("Wrong type for argument %d: Transfer matrix expected.\n"),Err);
445 displayAndStoreError(_("Wrong number of input arguments: This function has no input argument.\n")); 671 }
446 } 672 break;
447 else 673 case 91:
448 { 674 {
449 displayAndStoreError(_("Wrong number of input arguments:\n")); 675 displayAndStoreError(_("Wrong type for argument %d: In state space form expected.\n"),Err);
450 displayAndStoreError(_("Arguments are :\n")); 676 }
451 /* print variables name on stack :( */ 677 break;
452 C2F(prntid)(istk(C2F(recu).pstk[C2F(recu).pt - 1]), &Rhs, &C2F(iop).wte); 678 case 92:
453 } 679 {
680 displayAndStoreError(_("Wrong type for argument %d: Rational matrix expected.\n"),Err);
681 }
682 break;
683 case 93:
684 {
685 displayAndStoreError(_("Wrong type for argument %d: In continuous time expected.\n"),Err);
686 }
687 break;
688 case 94:
689 {
690 displayAndStoreError(_("Wrong type for argument %d: In discrete time expected.\n"),Err);
691 }
692 break;
693 case 95:
694 {
695 displayAndStoreError(_("Wrong type for argument %d: SISO expected.\n"),Err);
696 }
697 break;
698 case 96:
699 {
700 displayAndStoreError(_("time domain of argument %d is not defined.\n"),Err);
701 }
702 break;
703 case 97:
704 {
705 displayAndStoreError(_("Wrong type for argument %d: A system in state space or transfer matrix form expected.\n"),Err);
706 }
707 break;
708 case 98:
709 {
710 displayAndStoreError(_("Variable returned by scilab argument function is incorrect.\n"));
711 }
712 break;
713 case 99:
714 {
715 if (Err != 1)
716 {
717 displayAndStoreError(_("Elements of %dth argument must be in increasing order.\n"),Err);
718 }
719 else
720 {
721 displayAndStoreError(_("Elements of first argument are not (strictly) increasing.\n"));
722 }
723 }
724 break;
725 case 100:
726 {
727 if (Err != 1)
728 {
729 displayAndStoreError(_("Elements of %dth argument are not in (strictly) decreasing order.\n"),Err);
730 }
731 else
732 {
733 displayAndStoreError(_("Elements of first argument are not in (strictly) decreasing order.\n"));
734 }
735 }
736 break;
737 case 101:
738 {
739 if (Err != 1)
740 {
741 displayAndStoreError(_("Last element of %dth argument <> first.\n"),Err);
742 }
743 else
744 {
745 displayAndStoreError(_("Last element of first argument does not match the first one.\n"));
746 }
747 }
748 break;
749 case 102:
750 {
751 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
752 if (NameVarOnStack)
753 {
754 displayAndStoreError(_("Variable or function %s are not in file.\n"),NameVarOnStack);
755 FREE(NameVarOnStack);
756 NameVarOnStack = NULL;
757 }
758 }
759 break;
760 case 103:
761 {
762 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_3);
763 if (NameVarOnStack)
764 {
765 displayAndStoreError(_("Variable %s is not a valid rational function.\n"),NameVarOnStack);
766 FREE(NameVarOnStack);
767 NameVarOnStack = NULL;
768 }
769 }
770 break;
771 case 104:
772 {
773 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_3);
774 if (NameVarOnStack)
775 {
776 displayAndStoreError(_("Variable %s is not a valid state space representation.\n"),NameVarOnStack);
777 FREE(NameVarOnStack);
778 NameVarOnStack = NULL;
779 }
780 }
781 break;
782 case 105:
783 {
784 displayAndStoreError(_("Undefined fonction.\n"));
785 }
786 break;
787 case 106:
788 {
789 displayAndStoreError(_("Function name already used.\n"));
790 }
791 break;
792 case 107:
793 {
794 displayAndStoreError(_("Too many functions are defined (maximum #:%d).\n"),Err);
795 }
796 break;
797 case 108:
798 {
799 displayAndStoreError(_("Too complex for scilab, may be a too long control instruction.\n"));
800 }
801 break;
802 case 109:
803 {
804 displayAndStoreError(_("Too large, can't be displayed.\n"));
805 }
806 break;
807 case 110:
808 {
809 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
810 if (NameVarOnStack)
811 {
812 displayAndStoreError(_("%s was a function when compiled but is now a primitive!\n"),NameVarOnStack);
813 FREE(NameVarOnStack);
814 NameVarOnStack = NULL;
815 }
816 }
817 break;
818 case 111:
819 {
820 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
821 if (NameVarOnStack)
822 {
823 displayAndStoreError(_("Trying to re-define function %s.\n"),NameVarOnStack);
824 FREE(NameVarOnStack);
825 NameVarOnStack = NULL;
826 }
827 }
828 break;
829 case 112:
830 {
831 displayAndStoreError(_("No more memory.\n"));
832 }
833 break;
834 case 113:
835 {
836 displayAndStoreError(_("Too large string.\n"));
837 }
838 break;
839 case 114:
840 {
841 displayAndStoreError(_("Too many linked routines.\n"));
842 }
843 break;
844 case 115:
845 {
846 displayAndStoreError(_("Stack problem detected within a loop.\nA primitive function has been called with a wrong number of output arguments.\nNo output argument test has been made for this function.\nPlease report this bug :\n"));
847 displayAndStoreError("http://bugzilla.scilab.org/\n");
454 848
455 } 849 C2F(showstack)(); /* display of calling tree */
456 break; 850 }
457 case 59: 851 break;
458 { 852 case 116:
459 if (Lhs == 0) 853 {
460 {
461 displayAndStoreError(_("Wrong number of output arguments: This function has no output argument.\n"));
462 }
463 else
464 {
465 displayAndStoreError(_("Wrong number of output arguments\n"));
466 displayAndStoreError(_("Arguments are :\n"));
467 /* print variables name on stack :( */
468 C2F(prntid)(istk(C2F(recu).pstk[C2F(recu).pt - 1]), &Lhs, &C2F(iop).wte);
469 }
470 }
471 break;
472 case 60:
473 {
474 displayAndStoreError(_("Wrong size for argument: Incompatible dimensions.\n"));
475 }
476 break;
477 case 61:
478 {
479 displayAndStoreError(_("Direct access : give format.\n"));
480 }
481 break;
482 case 62:
483 {
484 displayAndStoreError(_("End of file at line %d.\n"),Err);
485 }
486 break;
487 case 63:
488 {
489 displayAndStoreError(_("%d graphic terminal?\n"),Err);
490 }
491 break;
492 case 64:
493 {
494 displayAndStoreError(_("Integration fails.\n"));
495 }
496 break;
497 case 65:
498 {
499 displayAndStoreError(_("%d: logical unit already used.\n"),Err);
500 }
501 break;
502 case 66:
503 {
504 displayAndStoreError(_("Too many files opened!\n"));
505 }
506 break;
507 case 67:
508 {
509 displayAndStoreError(_("Unknown file format.\n"));
510 }
511 break;
512 case 68:
513 {
514 displayAndStoreError(_("Fatal error!!! Your variables have been saved in the file : %s\n\
515Bad call to a scilab function ?\n\
516Otherwise, send a bug report to :\n"),get_sci_data_strings(SAVE_ID));
517 displayAndStoreError("http://bugzilla.scilab.org/\n");
518 }
519 break;
520 case 69:
521 {
522 displayAndStoreError(_("Floating point exception.\n"));
523 }
524 break;
525 case 70:
526 {
527 displayAndStoreError(_("Too many arguments in fort (max 30).\n"));
528 }
529 break;
530 case 71:
531 {
532 displayAndStoreError(_("This variable is not valid in fort.\n"));
533 }
534 break;
535 case 72:
536 {
537 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
538 if (NameVarOnStack)
539 {
540 displayAndStoreError(_("%s is not valid in this context.\n"),NameVarOnStack);
541 FREE(NameVarOnStack);
542 NameVarOnStack = NULL;
543 }
544 }
545 break;
546 case 73:
547 {
548 displayAndStoreError(_("Error while linking.\n"));
549 }
550 break;
551 case 74:
552 {
553 displayAndStoreError(_("Leading coefficient is zero.\n"));
554 }
555 break;
556 case 75:
557 {
558 displayAndStoreError(_("Too high degree (max 100).\n"));
559 }
560 break;
561 case 76:
562 {
563 displayAndStoreError(_("for x=val with type(val)=%d is not implemented in Scilab.\n"),Err);
564 }
565 break;
566 case 77:
567 {
568 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
569 if (NameVarOnStack)
570 {
571 displayAndStoreError(_("%s: Wrong number of input arguments.\n"),NameVarOnStack);
572 FREE(NameVarOnStack);
573 NameVarOnStack = NULL;
574 }
575 }
576 break;
577 case 78:
578 {
579 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
580 if (NameVarOnStack)
581 {
582 displayAndStoreError(_("%s: Wrong number of output arguments.\n"),NameVarOnStack);
583 FREE(NameVarOnStack);
584 NameVarOnStack = NULL;
585 }
586 }
587 break;
588 case 79:
589 {
590 displayAndStoreError(_("Indexing not allowed for output arguments of resume.\n"),Err);
591 854
592 } 855 displayAndStoreError(_("Wrong value for argument %d.\n"),Err);
593 break; 856 }
594 case 80: 857 break;
595 { 858 case 117:
596 displayAndStoreError(_("Incorrect function (argument n: %d).\n"),Err); 859 {
597 } 860 displayAndStoreError(_("List element number %d is Undefined.\n"),Err);
598 break; 861 }
599 case 81: 862 break;
600 { 863 case 118:
601 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4); 864 {
602 if (NameVarOnStack)
603 {
604 displayAndStoreError(_("%s: Wrong type for argument %d: Real or complex matrix expected.\n"),NameVarOnStack,Err);
605 FREE(NameVarOnStack);
606 NameVarOnStack = NULL;
607 }
608 }
609 break;
610 case 82:
611 {
612 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
613 if (NameVarOnStack)
614 {
615 displayAndStoreError(_("%s: Wrong type for argument %d: Real matrix expected.\n"),NameVarOnStack, Err);
616 FREE(NameVarOnStack);
617 NameVarOnStack = NULL;
618 }
619 }
620 break;
621 case 83:
622 {
623 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
624 if (NameVarOnStack)
625 {
626 displayAndStoreError(_("%s: Wrong type for argument %d: Real vector expected.\n"),NameVarOnStack,Err);
627 FREE(NameVarOnStack);
628 NameVarOnStack = NULL;
629 }
630 }
631 break;
632 case 84:
633 {
634 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
635 if (NameVarOnStack)
636 {
637 displayAndStoreError(_("%s: Wrong type for argument %d: Scalar expected.\n"),NameVarOnStack,Err);
638 FREE(NameVarOnStack);
639 NameVarOnStack = NULL;
640 }
641 }
642 break;
643 case 85:
644 {
645 displayAndStoreError(_("Host does not answer...\n"));
646 }
647 break;
648 case 86:
649 {
650 displayAndStoreError(_("Uncontrollable system.\n"));
651 }
652 break;
653 case 87:
654 {
655 displayAndStoreError(_("Unobservable system.\n"));
656 }
657 break;
658 case 88:
659 {
660 displayAndStoreError(_("%s: singular or asymmetric problem.\n"),"sfact");
661 }
662 break;
663 case 89:
664 {
665 displayAndStoreError(_("Wrong size for argument %d.\n"),Err);
666 }
667 break;
668 case 90:
669 {
670 displayAndStoreError(_("Wrong type for argument %d: Transfer matrix expected.\n"),Err);
671 }
672 break;
673 case 91:
674 {
675 displayAndStoreError(_("Wrong type for argument %d: In state space form expected.\n"),Err);
676 }
677 break;
678 case 92:
679 {
680 displayAndStoreError(_("Wrong type for argument %d: Rational matrix expected.\n"),Err);
681 }
682 break;
683 case 93:
684 {
685 displayAndStoreError(_("Wrong type for argument %d: In continuous time expected.\n"),Err);
686 }
687 break;
688 case 94:
689 {
690 displayAndStoreError(_("Wrong type for argument %d: In discrete time expected.\n"),Err);
691 }
692 break;
693 case 95:
694 {
695 displayAndStoreError(_("Wrong type for argument %d: SISO expected.\n"),Err);
696 }
697 break;
698 case 96:
699 {
700 displayAndStoreError(_("time domain of argument %d is not defined.\n"),Err);
701 }
702 break;
703 case 97:
704 {
705 displayAndStoreError(_("Wrong type for argument %d: A system in state space or transfer matrix form expected.\n"),Err);
706 }
707 break;
708 case 98:
709 {
710 displayAndStoreError(_("Variable returned by scilab argument function is incorrect.\n"));
711 }
712 break;
713 case 99:
714 {
715 if (Err != 1)
716 {
717 displayAndStoreError(_("Elements of %dth argument must be in increasing order.\n"),Err);
718 }
719 else
720 {
721 displayAndStoreError(_("Elements of first argument are not (strictly) increasing.\n"));
722 }
723 }
724 break;
725 case 100:
726 {
727 if (Err != 1)
728 {
729 displayAndStoreError(_("Elements of %dth argument are not in (strictly) decreasing order.\n"),Err);
730 }
731 else
732 {
733 displayAndStoreError(_("Elements of first argument are not in (strictly) decreasing order.\n"));
734 }
735 }
736 break;
737 case 101:
738 {
739 if (Err != 1)
740 {
741 displayAndStoreError(_("Last element of %dth argument <> first.\n"),Err);
742 }
743 else
744 {
745 displayAndStoreError(_("Last element of first argument does not match the first one.\n"));
746 }
747 }
748 break;
749 case 102:
750 {
751 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
752 if (NameVarOnStack)
753 {
754 displayAndStoreError(_("Variable or function %s are not in file.\n"),NameVarOnStack);
755 FREE(NameVarOnStack);
756 NameVarOnStack = NULL;
757 }
758 }
759 break;
760 case 103:
761 {
762 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_3);
763 if (NameVarOnStack)
764 {
765 displayAndStoreError(_("Variable %s is not a valid rational function.\n"),NameVarOnStack);
766 FREE(NameVarOnStack);
767 NameVarOnStack = NULL;
768 }
769 }
770 break;
771 case 104:
772 {
773 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_3);
774 if (NameVarOnStack)
775 {
776 displayAndStoreError(_("Variable %s is not a valid state space representation.\n"),NameVarOnStack);
777 FREE(NameVarOnStack);
778 NameVarOnStack = NULL;
779 }
780 }
781 break;
782 case 105:
783 {
784 displayAndStoreError(_("Undefined fonction.\n"));
785 }
786 break;
787 case 106:
788 {
789 displayAndStoreError(_("Function name already used.\n"));
790 }
791 break;
792 case 107:
793 {
794 displayAndStoreError(_("Too many functions are defined (maximum #:%d).\n"),Err);
795 }
796 break;
797 case 108:
798 {
799 displayAndStoreError(_("Too complex for scilab, may be a too long control instruction.\n"));
800 }
801 break;
802 case 109:
803 {
804 displayAndStoreError(_("Too large, can't be displayed.\n"));
805 }
806 break;
807 case 110:
808 {
809 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
810 if (NameVarOnStack)
811 {
812 displayAndStoreError(_("%s was a function when compiled but is now a primitive!\n"),NameVarOnStack);
813 FREE(NameVarOnStack);
814 NameVarOnStack = NULL;
815 }
816 }
817 break;
818 case 111:
819 {
820 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_2);
821 if (NameVarOnStack)
822 {
823 displayAndStoreError(_("Trying to re-define function %s.\n"),NameVarOnStack);
824 FREE(NameVarOnStack);
825 NameVarOnStack = NULL;
826 }
827 }
828 break;
829 case 112:
830 {
831 displayAndStoreError(_("No more memory.\n"));
832 }
833 break;
834 case 113:
835 {
836 displayAndStoreError(_("Too large string.\n"));
837 }
838 break;
839 case 114:
840 {
841 displayAndStoreError(_("Too many linked routines.\n"));
842 }
843 break;
844 case 115:
845 {
846 displayAndStoreError(_("Stack problem detected within a loop.\nA primitive function has been called with a wrong number of output arguments.\nNo output argument test has been made for this function.\nPlease report this bug :\n"));
847 displayAndStoreError("http://bugzilla.scilab.org/\n");
848 865
849 C2F(showstack)(); /* display of calling tree */ 866 displayAndStoreError(_("Wrong type for argument %d: Named variable not an expression expected.\n"),Err);
850 } 867 }
851 break; 868 break;
852 case 116: 869 case 119:
853 { 870 {
871 /* no message */
872 }
873 break;
874 case 120:
875 {
876 displayAndStoreError(_("Indices for non-zero elements must be given by a 2 column matrix.\n"));
877 }
878 break;
879 case 121:
880 {
881 displayAndStoreError(_("Incompatible indices for non-zero elements.\n"));
882 }
883 break;
884 case 122:
885 {
886 displayAndStoreError(_("Logical unit number should be larger than %d.\n"),Err);
887 }
888 break;
889 case 123:
890 {
891 displayAndStoreError(_("Function not bounded from below.\n"));
892 }
893 break;
894 case 124:
895 {
896 /* no message */
897 }
898 break;
899 case 125:
900 {
901 displayAndStoreError(_("Problem may be unbounded: too high distance between two consecutive iterations.\n"));
902 }
903 break;
904 case 126:
905 {
906 displayAndStoreError(_("Inconsistent constraints.\n"));
907 }
908 break;
909 case 127:
910 {
911 displayAndStoreError(_("No feasible solution.\n"));
912 }
913 break;
914 case 128:
915 {
916 displayAndStoreError(_("Degenerate starting point.\n"));
917 }
918 break;
919 case 129:
920 {
921 displayAndStoreError(_("No feasible point has been found.\n"));
922 }
923 break;
924 case 130:
925 {
926 displayAndStoreError(_("Optimization fails: back to initial point.\n"));
927 }
928 break;
929 case 131:
930 {
931 displayAndStoreError(_("%s: Stop requested by simulator (ind=0)\n"),"optim");
932 }
933 break;
934 case 132:
935 {
936 displayAndStoreError(_("%s: Wrong input parameters.\n"),"optim");
937 }
938 break;
939 case 133:
940 {
941 displayAndStoreError(_("Too small memory.\n"));
942 }
943 break;
944 case 134:
945 {
946 displayAndStoreError(_("%s: Problem with initial constants in simul.\n"),"optim");
947 }
948 break;
949 case 135:
950 {
951 displayAndStoreError(_("%s: Bounds and initial guess are incompatible.\n"),"optim");
952 }
953 break;
954 case 136:
955 {
956 displayAndStoreError(_("%s: This method is NOT implemented.\n"),"optim");
957 }
958 break;
959 case 137:
960 {
961 displayAndStoreError(_("NO hot restart available in this method.\n"));
962 }
963 break;
964 case 138:
965 {
966 displayAndStoreError(_("%s: Incorrect stopping parameters.\n"),"optim");
967 }
968 break;
969 case 139:
970 {
971 displayAndStoreError(_("%s: Incorrect bounds.\n"),"optim");
972 }
973 break;
974 case 140:
975 {
854 976
855 displayAndStoreError(_("Wrong value for argument %d.\n"),Err); 977 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_6);
856 } 978 if (NameVarOnStack)
857 break; 979 {
858 case 117: 980 displayAndStoreError(_("Variable : %s must be a list\n"),NameVarOnStack);
859 { 981 FREE(NameVarOnStack);
860 displayAndStoreError(_("List element number %d is Undefined.\n"),Err); 982 NameVarOnStack = NULL;
861 } 983 }
862 break;
863 case 118:
864 {
865
866 displayAndStoreError(_("Wrong type for argument %d: Named variable not an expression expected.\n"),Err);
867 }
868 break;
869 case 119:
870 {
871 /* no message */
872 }
873 break;
874 case 120:
875 {
876 displayAndStoreError(_("Indices for non-zero elements must be given by a 2 column matrix.\n"));
877 }
878 break;
879 case 121:
880 {
881 displayAndStoreError(_("Incompatible indices for non-zero elements.\n"));
882 }
883 break;
884 case 122:
885 {
886 displayAndStoreError(_("Logical unit number should be larger than %d.\n"),Err);
887 }
888 break;
889 case 123:
890 {
891 displayAndStoreError(_("Function not bounded from below.\n"));
892 }
893 break;
894 case 124:
895 {
896 /* no message */
897 }
898 break;
899 case 125:
900 {
901 displayAndStoreError(_("Problem may be unbounded: too high distance between two consecutive iterations.\n"));
902 }
903 break;
904 case 126:
905 {
906 displayAndStoreError(_("Inconsistent constraints.\n"));
907 }
908 break;
909 case 127:
910 {
911 displayAndStoreError(_("No feasible solution.\n"));
912 }
913 break;
914 case 128:
915 {
916 displayAndStoreError(_("Degenerate starting point.\n"));
917 }
918 break;
919 case 129:
920 {
921 displayAndStoreError(_("No feasible point has been found.\n"));
922 }
923 break;
924 case 130:
925 {
926 displayAndStoreError(_("Optimization fails: back to initial point.\n"));
927 }
928 break;
929 case 131:
930 {
931 displayAndStoreError(_("%s: Stop requested by simulator (ind=0)\n"),"optim");
932 }
933 break;
934 case 132:
935 {
936 displayAndStoreError(_("%s: Wrong input parameters.\n"),"optim");
937 }
938 break;
939 case 133:
940 {
941 displayAndStoreError(_("Too small memory.\n"));
942 }
943 break;
944 case 134:
945 {
946 displayAndStoreError(_("%s: Problem with initial constants in simul.\n"),"optim");
947 }
948 break;
949 case 135:
950 {
951 displayAndStoreError(_("%s: Bounds and initial guess are incompatible.\n"),"optim");
952 }
953 break;
954 case 136:
955 {
956 displayAndStoreError(_("%s: This method is NOT implemented.\n"),"optim");
957 }
958 break;
959 case 137:
960 {
961 displayAndStoreError(_("NO hot restart available in this method.\n"));
962 }
963 break;
964 case 138:
965 {
966 displayAndStoreError(_("%s: Incorrect stopping parameters.\n"),"optim");
967 }
968 break;
969 case 139:
970 {
971 displayAndStoreError(_("%s: Incorrect bounds.\n"),"optim");
972 }
973 break;
974 case 140:
975 {
976
977 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_6);
978 if (NameVarOnStack)
979 {
980 displayAndStoreError(_("Variable : %s must be a list\n"),NameVarOnStack);
981 FREE(NameVarOnStack);
982 NameVarOnStack = NULL;
983 }
984
985 }
986 break;
987 case 141:
988 {
989 displayAndStoreError(_("Incorrect function (argument n: %d).\n"),Err);
990 }
991 break;
992 case 142:
993 {
994 displayAndStoreError(_("Hot restart: dimension of working table (argument n:%d).\n"),Err);
995 }
996 break;
997 case 143:
998 {
999 displayAndStoreError(_("%s: df0 must be positive !\n"),"optim");
1000 }
1001 break;
1002 case 144:
1003 {
1004 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
1005 if (NameVarOnStack)
1006 {
1007 displayAndStoreError(_("Undefined operation for the given operands.\n"));
1008 displayAndStoreError(_("check or define function %s for overloading.\n"),NameVarOnStack);
1009 FREE(NameVarOnStack);
1010 NameVarOnStack = NULL;
1011 }
1012 }
1013 break;
1014 984
1015 /* error 145 to 199 not used */ 985 }
986 break;
987 case 141:
988 {
989 displayAndStoreError(_("Incorrect function (argument n: %d).\n"),Err);
990 }
991 break;
992 case 142:
993 {
994 displayAndStoreError(_("Hot restart: dimension of working table (argument n:%d).\n"),Err);
995 }
996 break;
997 case 143:
998 {
999 displayAndStoreError(_("%s: df0 must be positive !\n"),"optim");
1000 }
1001 break;
1002 case 144:
1003 {
1004 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
1005 if (NameVarOnStack)
1006 {
1007 displayAndStoreError(_("Undefined operation for the given operands.\n"));
1008 displayAndStoreError(_("check or define function %s for overloading.\n"),NameVarOnStack);
1009 FREE(NameVarOnStack);
1010 NameVarOnStack = NULL;
1011 }
1012 }
1013 break;
1016 1014
1017 /* 1015 /* error 145 to 199 not used */
1018 messages from 201 to 203 and 205 to 214 are no more used by error
1019 (see Scierror in stack1.c)
1020 */
1021 case 200:
1022 {
1023 /* no message */
1024 }
1025 break;
1026 case 201:
1027 {
1028 /* not used */
1029 /* only for compatibility */
1030 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1031 if (NameVarOnStack)
1032 {
1033 displayAndStoreError(_("%s: Wrong type for argument %d: Real or complex matrix expected.\n"),NameVarOnStack,Err);
1034 FREE(NameVarOnStack);
1035 NameVarOnStack = NULL;
1036 }
1037 }
1038 break;
1039 case 202:
1040 {
1041 /* not used */
1042 /* only for compatibility */
1043 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1044 if (NameVarOnStack)
1045 {
1046 displayAndStoreError(_("%s: Wrong type for argument %d: Real matrix expected.\n"),NameVarOnStack,Err);
1047 FREE(NameVarOnStack);
1048 NameVarOnStack = NULL;
1049 }
1050 }
1051 break;
1052 case 203:
1053 {
1054 /* not used */
1055 /* only for compatibility */
1056 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1057 if (NameVarOnStack)
1058 {
1059 displayAndStoreError(_("%s: Wrong type for argument %d: Real vector expected.\n"),NameVarOnStack,Err);
1060 FREE(NameVarOnStack);
1061 NameVarOnStack = NULL;
1062 }
1063 }
1064 break;
1065 case 204:
1066 {
1067 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1068 if (NameVarOnStack)
1069 {
1070 displayAndStoreError(_("%s: Wrong type for argument %d: Scalar expected.\n"),NameVarOnStack,Err);
1071 FREE(NameVarOnStack);
1072 NameVarOnStack = NULL;
1073 }
1074 }
1075 break;
1076 case 205:
1077 {
1078 int minvalue = C2F(recu).pstk[C2F(recu).pt];
1079 int maxvalue = C2F(recu).pstk[C2F(recu).pt + 1];
1080 1016
1081 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4); 1017 /*
1082 if (NameVarOnStack) 1018 messages from 201 to 203 and 205 to 214 are no more used by error
1083 { 1019 (see Scierror in stack1.c)
1084 displayAndStoreError(_("%s: Wrong size for argument %d: (%d,%d) expected.\n"),NameVarOnStack,Err,minvalue,maxvalue); 1020 */
1085 FREE(NameVarOnStack); 1021 case 200:
1086 NameVarOnStack = NULL; 1022 {
1087 } 1023 /* no message */
1088 } 1024 }
1089 break; 1025 break;
1090 case 206: 1026 case 201:
1091 { 1027 {
1092 int vectorsize = C2F(recu).pstk[C2F(recu).pt]; 1028 /* not used */
1029 /* only for compatibility */
1030 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1031 if (NameVarOnStack)
1032 {
1033 displayAndStoreError(_("%s: Wrong type for argument %d: Real or complex matrix expected.\n"),NameVarOnStack,Err);
1034 FREE(NameVarOnStack);
1035 NameVarOnStack = NULL;
1036 }
1037 }
1038 break;
1039 case 202:
1040 {
1041 /* not used */
1042 /* only for compatibility */
1043 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1044 if (NameVarOnStack)
1045 {
1046 displayAndStoreError(_("%s: Wrong type for argument %d: Real matrix expected.\n"),NameVarOnStack,Err);
1047 FREE(NameVarOnStack);
1048 NameVarOnStack = NULL;
1049 }
1050 }
1051 break;
1052 case 203:
1053 {
1054 /* not used */
1055 /* only for compatibility */
1056 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1057 if (NameVarOnStack)
1058 {
1059 displayAndStoreError(_("%s: Wrong type for argument %d: Real vector expected.\n"),NameVarOnStack,Err);
1060 FREE(NameVarOnStack);
1061 NameVarOnStack = NULL;
1062 }
1063 }
1064 break;
1065 case 204:
1066 {
1067 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1068 if (NameVarOnStack)
1069 {
1070 displayAndStoreError(_("%s: Wrong type for argument %d: Scalar expected.\n"),NameVarOnStack,Err);
1071 FREE(NameVarOnStack);
1072 NameVarOnStack = NULL;
1073 }
1074 }
1075 break;
1076 case 205:
1077 {
1078 int minvalue = C2F(recu).pstk[C2F(recu).pt];
1079 int maxvalue = C2F(recu).pstk[C2F(recu).pt + 1];
1093 1080
1094 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4); 1081 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1095 if (NameVarOnStack) 1082 if (NameVarOnStack)
1096 { 1083 {
1097 displayAndStoreError(_("%s: Wrong size for argument %d: %d expected.\n"),NameVarOnStack,Err,vectorsize); 1084 displayAndStoreError(_("%s: Wrong size for argument %d: (%d,%d) expected.\n"),NameVarOnStack,Err,minvalue,maxvalue);
1098 FREE(NameVarOnStack); 1085 FREE(NameVarOnStack);
1099 NameVarOnStack = NULL; 1086 NameVarOnStack = NULL;
1100 } 1087 }
1101 } 1088 }
1102 break; 1089 break;
1103 case 207: 1090 case 206:
1104 { 1091 {
1105 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4); 1092 int vectorsize = C2F(recu).pstk[C2F(recu).pt];
1106 if (NameVarOnStack)
1107 {
1108 displayAndStoreError(_("%s: Wrong type for argument %d: Matrix of strings expected.\n"),NameVarOnStack,Err);
1109 FREE(NameVarOnStack);
1110 NameVarOnStack = NULL;
1111 }
1112 }
1113 break;
1114 case 208:
1115 {
1116 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1117 if (NameVarOnStack)
1118 {
1119 displayAndStoreError(_("%s: Wrong type for argument %d: Boolean matrix expected.\n"),NameVarOnStack,Err);
1120 FREE(NameVarOnStack);
1121 NameVarOnStack = NULL;
1122 }
1123 }
1124 break;
1125 case 209:
1126 {
1127 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1128 if (NameVarOnStack)
1129 {
1130 displayAndStoreError(_("%s: Wrong type for argument %d: Matrix expected.\n"),NameVarOnStack,Err);
1131 FREE(NameVarOnStack);
1132 NameVarOnStack = NULL;
1133 }
1134 }
1135 break;
1136 case 210:
1137 {
1138 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1139 if (NameVarOnStack)
1140 {
1141 displayAndStoreError(_("%s: Wrong type for argument %d: List expected.\n"),NameVarOnStack, Err);
1142 FREE(NameVarOnStack);
1143 NameVarOnStack = NULL;
1144 }
1145 }
1146 break;
1147 case 211:
1148 {
1149 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1150 if (NameVarOnStack)
1151 {
1152 displayAndStoreError(_("%s: Wrong type for argument %d: Function or string (external function) expected.\n"),NameVarOnStack,Err);
1153 FREE(NameVarOnStack);
1154 NameVarOnStack = NULL;
1155 }
1156 }
1157 break;
1158 case 212:
1159 {
1160 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1161 if (NameVarOnStack)
1162 {
1163 displayAndStoreError(_("%s: Wrong type for argument %d: Polynomial expected.\n"),NameVarOnStack,Err);
1164 FREE(NameVarOnStack);
1165 NameVarOnStack = NULL;
1166 }
1167 }
1168 break;
1169 case 213:
1170 {
1171 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1172 if (NameVarOnStack)
1173 {
1174 displayAndStoreError(_("%s: Wrong type for argument %d: Working int matrix expected.\n"),NameVarOnStack,Err);
1175 FREE(NameVarOnStack);
1176 NameVarOnStack = NULL;
1177 }
1178 }
1179 break;
1180 case 214:
1181 {
1182 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1183 if (NameVarOnStack)
1184 {
1185 displayAndStoreError(_("%s: Wrong type for argument %d: Vector expected.\n"),NameVarOnStack,Err);
1186 FREE(NameVarOnStack);
1187 NameVarOnStack = NULL;
1188 }
1189 }
1190 break;
1191 case 215:
1192 {
1193 if (Err != 1)
1194 {
1195 displayAndStoreError(_("%dth argument type must be boolean.\n"),Err);
1196 }
1197 else
1198 {
1199 displayAndStoreError(_("Argument type must be boolean.\n"));
1200 }
1201 }
1202 break;
1203 case 216:
1204 {
1205 displayAndStoreError(_("Wrong type for argument %d: Boolean or scalar expected.\n"),Err);
1206 }
1207 break;
1208 case 217:
1209 {
1210 displayAndStoreError(_("Wrong type for argument %d: Sparse matrix of scalars expected.\n"),Err);
1211 }
1212 break;
1213 case 218:
1214 {
1215 displayAndStoreError(_("Wrong type for argument %d: Handle to sparse lu factors expected.\n"),Err);
1216 }
1217 break;
1218 case 219:
1219 {
1220 1093
1221 displayAndStoreError(_("Wrong type argument %d: Sparse or full scalar matrix expected.\n"),Err); 1094 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1222 } 1095 if (NameVarOnStack)
1223 break; 1096 {
1224 case 220: 1097 displayAndStoreError(_("%s: Wrong size for argument %d: %d expected.\n"),NameVarOnStack,Err,vectorsize);
1225 { 1098 FREE(NameVarOnStack);
1226 displayAndStoreError(_("Null variable cannot be used here.\n")); 1099 NameVarOnStack = NULL;
1227 } 1100 }
1228 break; 1101 }
1229 case 221: 1102 break;
1230 { 1103 case 207:
1231 displayAndStoreError(_("A sparse matrix entry is defined with two different values.\n")); 1104 {
1232 } 1105 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1233 break; 1106 if (NameVarOnStack)
1234 case 222: 1107 {
1235 { 1108 displayAndStoreError(_("%s: Wrong type for argument %d: Matrix of strings expected.\n"),NameVarOnStack,Err);
1236 displayAndStoreError(_("%s not yet implemented for full input parameter.\n"),"lusolve"); 1109 FREE(NameVarOnStack);
1237 } 1110 NameVarOnStack = NULL;
1238 break; 1111 }
1239 case 223: 1112 }
1240 { 1113 break;
1241 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1); 1114 case 208:
1242 if (NameVarOnStack) 1115 {
1243 { 1116 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1244 displayAndStoreError(_("It is not possible to redefine the %s primitive this way (see clearfun).\n"),NameVarOnStack); 1117 if (NameVarOnStack)
1245 FREE(NameVarOnStack); 1118 {
1246 NameVarOnStack = NULL; 1119 displayAndStoreError(_("%s: Wrong type for argument %d: Boolean matrix expected.\n"),NameVarOnStack,Err);
1247 } 1120 FREE(NameVarOnStack);
1248 } 1121 NameVarOnStack = NULL;
1249 break; 1122 }
1250 case 224: 1123 }
1251 { 1124 break;
1252 displayAndStoreError(_("Type data base is full.\n")); 1125 case 209:
1253 } 1126 {
1254 break; 1127 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1255 case 225: 1128 if (NameVarOnStack)
1256 { 1129 {
1257 displayAndStoreError(_("This data type is already defined.\n")); 1130 displayAndStoreError(_("%s: Wrong type for argument %d: Matrix expected.\n"),NameVarOnStack,Err);
1258 } 1131 FREE(NameVarOnStack);
1259 break; 1132 NameVarOnStack = NULL;
1260 case 226: 1133 }
1261 { 1134 }
1262 displayAndStoreError(_("Inequality comparison with empty matrix.\n")); 1135 break;
1263 } 1136 case 210:
1264 break; 1137 {
1265 case 227: 1138 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1266 { 1139 if (NameVarOnStack)
1267 displayAndStoreError(_("Missing index.\n")); 1140 {
1268 } 1141 displayAndStoreError(_("%s: Wrong type for argument %d: List expected.\n"),NameVarOnStack, Err);
1269 break; 1142 FREE(NameVarOnStack);
1270 case 228: 1143 NameVarOnStack = NULL;
1271 { 1144 }
1272 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1); 1145 }
1273 if (NameVarOnStack) 1146 break;
1274 { 1147 case 211:
1275 displayAndStoreError(_("reference to the cleared global variable %s.\n"),NameVarOnStack); 1148 {
1276 FREE(NameVarOnStack); 1149 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1277 NameVarOnStack = NULL; 1150 if (NameVarOnStack)
1278 } 1151 {
1279 } 1152 displayAndStoreError(_("%s: Wrong type for argument %d: Function or string (external function) expected.\n"),NameVarOnStack,Err);
1280 break; 1153 FREE(NameVarOnStack);
1281 case 229: 1154 NameVarOnStack = NULL;
1282 { 1155 }
1283 displayAndStoreError(_("Operands of / and \\ operations must not contain NaN of Inf.\n")); 1156 }
1284 } 1157 break;
1285 break; 1158 case 212:
1286 case 230: 1159 {
1287 { 1160 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1288 displayAndStoreError(_("semi def fails.\n")); 1161 if (NameVarOnStack)
1289 } 1162 {
1290 break; 1163 displayAndStoreError(_("%s: Wrong type for argument %d: Polynomial expected.\n"),NameVarOnStack,Err);
1291 case 231: 1164 FREE(NameVarOnStack);
1292 { 1165 NameVarOnStack = NULL;
1293 displayAndStoreError(_("Wrong type for first input argument: Single string expected.\n")); 1166 }
1294 } 1167 }
1295 break; 1168 break;
1296 case 232: 1169 case 213:
1297 { 1170 {
1298 displayAndStoreError(_("Entry name not found.\n")); 1171 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1299 } 1172 if (NameVarOnStack)
1300 break; 1173 {
1301 case 233: 1174 displayAndStoreError(_("%s: Wrong type for argument %d: Working int matrix expected.\n"),NameVarOnStack,Err);
1302 { 1175 FREE(NameVarOnStack);
1303 displayAndStoreError(_("Maximum number of dynamic interfaces reached.\n")); 1176 NameVarOnStack = NULL;
1304 } 1177 }
1305 break; 1178 }
1306 case 234: 1179 break;
1307 { 1180 case 214:
1308 displayAndStoreError(_("%s: expecting more than one argument.\n"),"Link"); 1181 {
1309 } 1182 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1310 break; 1183 if (NameVarOnStack)
1311 case 235: 1184 {
1312 { 1185 displayAndStoreError(_("%s: Wrong type for argument %d: Vector expected.\n"),NameVarOnStack,Err);
1313 displayAndStoreError(_("%s: problem with one of the entry point.\n"),"Link"); 1186 FREE(NameVarOnStack);
1314 } 1187 NameVarOnStack = NULL;
1315 break; 1188 }
1316 case 236: 1189 }
1317 { 1190 break;
1318 displayAndStoreError(_("%s: the shared archive was not loaded.\n"),"Link"); 1191 case 215:
1319 } 1192 {
1320 break; 1193 if (Err != 1)
1321 case 237: 1194 {
1322 { 1195 displayAndStoreError(_("%dth argument type must be boolean.\n"),Err);
1323 displayAndStoreError(_("%s: Only one entry point allowed on this operating system.\n"),"Link"); 1196 }
1324 } 1197 else
1325 break; 1198 {
1326 case 238: 1199 displayAndStoreError(_("Argument type must be boolean.\n"));
1327 { 1200 }
1328 displayAndStoreError(_("%s: First argument cannot be a number.\n"),"Link"); 1201 }
1329 } 1202 break;
1330 break; 1203 case 216:
1331 case 239: 1204 {
1332 { 1205 displayAndStoreError(_("Wrong type for argument %d: Boolean or scalar expected.\n"),Err);
1333 displayAndStoreError(_("You cannot link more functions, maxentry reached.\n")); 1206 }
1334 } 1207 break;
1335 break; 1208 case 217:
1336 case 240: 1209 {
1337 { 1210 displayAndStoreError(_("Wrong type for argument %d: Sparse matrix of scalars expected.\n"),Err);
1338 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_5); 1211 }
1339 if (NameVarOnStack) 1212 break;
1340 { 1213 case 218:
1341 displayAndStoreError(_("File \"%s\" already exists or directory write access denied.\n"),NameVarOnStack); 1214 {
1342 FREE(NameVarOnStack); 1215 displayAndStoreError(_("Wrong type for argument %d: Handle to sparse lu factors expected.\n"),Err);
1343 NameVarOnStack = NULL; 1216 }
1344 } 1217 break;
1345 } 1218 case 219:
1346 break; 1219 {
1347 case 241:
1348 {
1349 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_5);
1350 if (NameVarOnStack)
1351 {
1352 displayAndStoreError(_("File \"%s\" does not exist or read access denied.\n"),NameVarOnStack);
1353 FREE(NameVarOnStack);
1354 NameVarOnStack = NULL;
1355 }
1356 }
1357 break;
1358 case 242:
1359 {
1360 displayAndStoreError(_("Binary direct access files must be opened by 'file'.\n"));
1361 }
1362 break;
1363 case 243:
1364 {
1365 displayAndStoreError(_("C file logical unit not allowed here.\n"));
1366 }
1367 break;
1368 case 244:
1369 {
1370 displayAndStoreError(_("Fortran file logical unit not allowed here.\n"));
1371 }
1372 break;
1373 case 245:
1374 {
1375 displayAndStoreError(_("No input file associated to logical unit %d.\n"),Err);
1376 }
1377 break;
1378 case 246:
1379 {
1380 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_6);
1381 displayAndStoreError(_("Function not defined for given argument type(s),\n"));
1382 if (NameVarOnStack)
1383 {
1384 displayAndStoreError(_(" check arguments or define function %s for overloading.\n"),NameVarOnStack);
1385 FREE(NameVarOnStack);
1386 NameVarOnStack = NULL;
1387 }
1388 }
1389 break;
1390 case 247:
1391 {
1392 displayAndStoreError(_("Wrong value for argument %d: the lu handle is no more valid.\n"),Err);
1393 }
1394 break;
1395 case 248:
1396 {
1397 displayAndStoreError(_("Wrong value for argument %d: Valid variable name expected.\n"),Err);
1398 }
1399 break;
1400 case 249:
1401 {
1402 displayAndStoreError(_("Wrong value for argument %d: Empty string expected.\n"),Err);
1403 }
1404 break;
1405 case 250:
1406 {
1407 displayAndStoreError(_("Recursive extraction is not valid in this context.\n"));
1408 }
1409 break;
1410 case 251:
1411 {
1412 displayAndStoreError(_("%s: ipar dimensioned at least 11.\n"),"bvode");
1413 }
1414 break;
1415 case 252:
1416 {
1417 displayAndStoreError(_("%s: ltol must be of size ipar(4).\n"),"bvode");
1418 }
1419 break;
1420 case 253:
1421 {
1422 displayAndStoreError(_("%s: fixpnt must be of size ipar(11).\n"),"bvode");
1423 }
1424 break;
1425 case 254:
1426 {
1427 displayAndStoreError(_("%s: ncomp < 20 requested.\n"),"bvode");
1428 }
1429 break;
1430 case 255:
1431 {
1432 displayAndStoreError(_("%s: m must be of size ncomp.\n"),"bvode");
1433 }
1434 break;
1435 case 256: case 257:
1436 {
1437 displayAndStoreError(_("%s: sum(m) must be less than 40.\n"),"bvode");
1438 }
1439 break;
1440 case 258:
1441 {
1442 displayAndStoreError(_("%s: input data error.\n"),"bvode");
1443 }
1444 break;
1445 case 259:
1446 {
1447 displayAndStoreError(_("%s: no. of subintervals exceeds storage.\n"),"bvode");
1448 }
1449 break;
1450 case 260:
1451 {
1452 displayAndStoreError(_("%s: The colocation matrix is singular.\n"),"bvode");
1453 }
1454 break;
1455 case 261:
1456 {
1457 displayAndStoreError(_("Interface property table is full.\n"));
1458 }
1459 break;
1460 case 262:
1461 {
1462 int maxglobalvariables = isizt - C2F(vstk).isiz - 1;
1463 displayAndStoreError(_("Too many global variables! Max number is %d.\n"),maxglobalvariables);
1464 }
1465 break;
1466 case 263:
1467 {
1468 displayAndStoreError(_("Error while writing in file: disk full or deleted file.\n"));
1469 }
1470 break;
1471 case 264:
1472 {
1473 displayAndStoreError(_("Wrong value for argument %d: Must not contain NaN or Inf.\n"),Err);
1474 }
1475 break;
1476 case 265:
1477 {
1478 displayAndStoreError(_("%s and %s must have equal number of rows.\n"),"A","B");
1479 }
1480 break;
1481 case 266:
1482 {
1483 displayAndStoreError(_("%s and %s must have equal number of columns.\n"),"A","B");
1484 }
1485 break;
1486 case 267:
1487 {
1488 displayAndStoreError(_("%s and %s must have equal dimensions.\n"),"A","B");
1489 }
1490 break;
1491 case 268:
1492 {
1493 displayAndStoreError(_("Invalid return value for function passed in arg %d.\n"),Err);
1494 }
1495 break;
1496 case 269:
1497 {
1498 displayAndStoreError(_("Wrong value for argument %d: eigenvalues must have negative real parts.\n"),Err);
1499 }
1500 break;
1501 case 270:
1502 {
1503 displayAndStoreError(_("Wrong value for argument %d: eigenvalues modulus must be less than one.\n"),Err);
1504 }
1505 break;
1506 case 271:
1507 {
1508 displayAndStoreError(_("Size varying argument a*eye(), (arg %d) not allowed here.\n"),Err);
1509 }
1510 break;
1511 case 272:
1512 {
1513 displayAndStoreError(_("endfunction is missing.\n"));
1514 }
1515 break;
1516 case 273:
1517 {
1518 displayAndStoreError(_("Instruction left hand side: waiting for a dot or a left parenthesis.\n"));
1519 }
1520 break;
1521 case 274:
1522 {
1523 displayAndStoreError(_("Instruction left hand side: waiting for a name.\n"));
1524 }
1525 break;
1526 case 275:
1527 {
1528 displayAndStoreError(_("varargout keyword cannot be used here.\n"));
1529 }
1530 break;
1531 case 276:
1532 {
1533 displayAndStoreError(_("Missing operator, comma, or semicolon.\n"));
1534 *errtyp = 1; /* error not recoverable */
1535 }
1536 break;
1537 case 277:
1538 {
1539 displayAndStoreError(_("Too many commands defined.\n"));
1540 }
1541 break;
1542 case 278:
1543 {
1544 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1545 if (NameVarOnStack)
1546 {
1547 if (NameVarOnStack[0] != '0')
1548 {
1549 displayAndStoreError(_("%s: Input arguments should have the same formal variable name.\n"),NameVarOnStack);
1550 }
1551 else
1552 {
1553 displayAndStoreError(_("Input arguments should have the same formal variable name.\n"));
1554 }
1555 FREE(NameVarOnStack);
1556 NameVarOnStack = NULL;
1557 }
1558 }
1559 break;
1560 case 279: case 280:
1561 {
1562 /* no message */
1563 }
1564 break;
1565 1220
1566 default: 1221 displayAndStoreError(_("Wrong type argument %d: Sparse or full scalar matrix expected.\n"),Err);
1567 { 1222 }
1568 char *buffer = defaultStringError(); 1223 break;
1569 if (buffer) 1224 case 220:
1570 { 1225 {
1571 displayAndStoreError(buffer); 1226 displayAndStoreError(_("Null variable cannot be used here.\n"));
1572 FREE(buffer); 1227 }
1573 buffer = NULL; 1228 break;
1574 } 1229 case 221:
1575 } 1230 {
1576 break; 1231 displayAndStoreError(_("A sparse matrix entry is defined with two different values.\n"));
1232 }
1233 break;
1234 case 222:
1235 {
1236 displayAndStoreError(_("%s not yet implemented for full input parameter.\n"),"lusolve");
1237 }
1238 break;
1239 case 223:
1240 {
1241 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
1242 if (NameVarOnStack)
1243 {
1244 displayAndStoreError(_("It is not possible to redefine the %s primitive this way (see clearfun).\n"),NameVarOnStack);
1245 FREE(NameVarOnStack);
1246 NameVarOnStack = NULL;
1247 }
1248 }
1249 break;
1250 case 224:
1251 {
1252 displayAndStoreError(_("Type data base is full.\n"));
1253 }
1254 break;
1255 case 225:
1256 {
1257 displayAndStoreError(_("This data type is already defined.\n"));
1258 }
1259 break;
1260 case 226:
1261 {
1262 displayAndStoreError(_("Inequality comparison with empty matrix.\n"));
1263 }
1264 break;
1265 case 227:
1266 {
1267 displayAndStoreError(_("Missing index.\n"));
1268 }
1269 break;
1270 case 228:
1271 {
1272 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_1);
1273 if (NameVarOnStack)
1274 {
1275 displayAndStoreError(_("reference to the cleared global variable %s.\n"),NameVarOnStack);
1276 FREE(NameVarOnStack);
1277 NameVarOnStack = NULL;
1278 }
1279 }
1280 break;
1281 case 229:
1282 {
1283 displayAndStoreError(_("Operands of / and \\ operations must not contain NaN of Inf.\n"));
1284 }
1285 break;
1286 case 230:
1287 {
1288 displayAndStoreError(_("semi def fails.\n"));
1289 }
1290 break;
1291 case 231:
1292 {
1293 displayAndStoreError(_("Wrong type for first input argument: Single string expected.\n"));
1294 }
1295 break;
1296 case 232:
1297 {
1298 displayAndStoreError(_("Entry name not found.\n"));
1299 }
1300 break;
1301 case 233:
1302 {
1303 displayAndStoreError(_("Maximum number of dynamic interfaces reached.\n"));
1304 }
1305 break;
1306 case 234:
1307 {
1308 displayAndStoreError(_("%s: expecting more than one argument.\n"),"Link");
1309 }
1310 break;
1311 case 235:
1312 {
1313 displayAndStoreError(_("%s: problem with one of the entry point.\n"),"Link");
1314 }
1315 break;
1316 case 236:
1317 {
1318 displayAndStoreError(_("%s: the shared archive was not loaded.\n"),"Link");
1319 }
1320 break;
1321 case 237:
1322 {
1323 displayAndStoreError(_("%s: Only one entry point allowed on this operating system.\n"),"Link");
1324 }
1325 break;
1326 case 238:
1327 {
1328 displayAndStoreError(_("%s: First argument cannot be a number.\n"),"Link");
1329 }
1330 break;
1331 case 239:
1332 {
1333 displayAndStoreError(_("You cannot link more functions, maxentry reached.\n"));
1334 }
1335 break;
1336 case 240:
1337 {
1338 /* OBSOLETE */
1339 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_5);
1340 if (NameVarOnStack)
1341 {
1342 displayAndStoreError(_("File \"%s\" already exists or directory write access denied.\n"),NameVarOnStack);
1343 FREE(NameVarOnStack);
1344 NameVarOnStack = NULL;
1345 }
1346 }
1347 break;
1348 case 241:
1349 {
1350 /* OBSOLETE */
1351 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_5);
1352 if (NameVarOnStack)
1353 {
1354 displayAndStoreError(_("File \"%s\" does not exist or read access denied.\n"),NameVarOnStack);
1355 FREE(NameVarOnStack);
1356 NameVarOnStack = NULL;
1357 }
1358 }
1359 break;
1360 case 242:
1361 {
1362 displayAndStoreError(_("Binary direct access files must be opened by 'file'.\n"));
1363 }
1364 break;
1365 case 243:
1366 {
1367 displayAndStoreError(_("C file logical unit not allowed here.\n"));
1368 }
1369 break;
1370 case 244:
1371 {
1372 displayAndStoreError(_("Fortran file logical unit not allowed here.\n"));
1373 }
1374 break;
1375 case 245:
1376 {
1377 displayAndStoreError(_("No input file associated to logical unit %d.\n"),Err);
1378 }
1379 break;
1380 case 246:
1381 {
1382 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_6);
1383 displayAndStoreError(_("Function not defined for given argument type(s),\n"));
1384 if (NameVarOnStack)
1385 {
1386 displayAndStoreError(_(" check arguments or define function %s for overloading.\n"),NameVarOnStack);
1387 FREE(NameVarOnStack);
1388 NameVarOnStack = NULL;
1389 }
1390 }
1391 break;
1392 case 247:
1393 {
1394 displayAndStoreError(_("Wrong value for argument %d: the lu handle is no more valid.\n"),Err);
1395 }
1396 break;
1397 case 248:
1398 {
1399 displayAndStoreError(_("Wrong value for argument %d: Valid variable name expected.\n"),Err);
1400 }
1401 break;
1402 case 249:
1403 {
1404 displayAndStoreError(_("Wrong value for argument %d: Empty string expected.\n"),Err);
1405 }
1406 break;
1407 case 250:
1408 {
1409 displayAndStoreError(_("Recursive extraction is not valid in this context.\n"));
1410 }
1411 break;
1412 case 251:
1413 {
1414 displayAndStoreError(_("%s: ipar dimensioned at least 11.\n"),"bvode");
1415 }
1416 break;
1417 case 252:
1418 {
1419 displayAndStoreError(_("%s: ltol must be of size ipar(4).\n"),"bvode");
1420 }
1421 break;
1422 case 253:
1423 {
1424 displayAndStoreError(_("%s: fixpnt must be of size ipar(11).\n"),"bvode");
1425 }
1426 break;
1427 case 254:
1428 {
1429 displayAndStoreError(_("%s: ncomp < 20 requested.\n"),"bvode");
1430 }
1431 break;
1432 case 255:
1433 {
1434 displayAndStoreError(_("%s: m must be of size ncomp.\n"),"bvode");
1435 }
1436 break;
1437 case 256: case 257:
1438 {
1439 displayAndStoreError(_("%s: sum(m) must be less than 40.\n"),"bvode");
1440 }
1441 break;
1442 case 258:
1443 {
1444 displayAndStoreError(_("%s: input data error.\n"),"bvode");
1445 }
1446 break;
1447 case 259:
1448 {
1449 displayAndStoreError(_("%s: no. of subintervals exceeds storage.\n"),"bvode");
1450 }
1451 break;
1452 case 260:
1453 {
1454 displayAndStoreError(_("%s: The colocation matrix is singular.\n"),"bvode");
1455 }
1456 break;
1457 case 261:
1458 {
1459 displayAndStoreError(_("Interface property table is full.\n"));
1460 }
1461 break;
1462 case 262:
1463 {
1464 int maxglobalvariables = isizt - C2F(vstk).isiz - 1;
1465 displayAndStoreError(_("Too many global variables! Max number is %d.\n"),maxglobalvariables);
1466 }
1467 break;
1468 case 263:
1469 {
1470 displayAndStoreError(_("Error while writing in file: disk full or deleted file.\n"));
1471 }
1472 break;
1473 case 264:
1474 {
1475 displayAndStoreError(_("Wrong value for argument %d: Must not contain NaN or Inf.\n"),Err);
1476 }
1477 break;
1478 case 265:
1479 {
1480 displayAndStoreError(_("%s and %s must have equal number of rows.\n"),"A","B");
1481 }
1482 break;
1483 case 266:
1484 {
1485 displayAndStoreError(_("%s and %s must have equal number of columns.\n"),"A","B");
1486 }
1487 break;
1488 case 267:
1489 {
1490 displayAndStoreError(_("%s and %s must have equal dimensions.\n"),"A","B");
1491 }
1492 break;
1493 case 268:
1494 {
1495 displayAndStoreError(_("Invalid return value for function passed in arg %d.\n"),Err);
1496 }
1497 break;
1498 case 269:
1499 {
1500 displayAndStoreError(_("Wrong value for argument %d: eigenvalues must have negative real parts.\n"),Err);
1501 }
1502 break;
1503 case 270:
1504 {
1505 displayAndStoreError(_("Wrong value for argument %d: eigenvalues modulus must be less than one.\n"),Err);
1506 }
1507 break;
1508 case 271:
1509 {
1510 displayAndStoreError(_("Size varying argument a*eye(), (arg %d) not allowed here.\n"),Err);
1511 }
1512 break;
1513 case 272:
1514 {
1515 displayAndStoreError(_("endfunction is missing.\n"));
1516 }
1517 break;
1518 case 273:
1519 {
1520 displayAndStoreError(_("Instruction left hand side: waiting for a dot or a left parenthesis.\n"));
1521 }
1522 break;
1523 case 274:
1524 {
1525 displayAndStoreError(_("Instruction left hand side: waiting for a name.\n"));
1526 }
1527 break;
1528 case 275:
1529 {
1530 displayAndStoreError(_("varargout keyword cannot be used here.\n"));
1531 }
1532 break;
1533 case 276:
1534 {
1535 displayAndStoreError(_("Missing operator, comma, or semicolon.\n"));
1536 *errtyp = 1; /* error not recoverable */
1537 }
1538 break;
1539 case 277:
1540 {
1541 displayAndStoreError(_("Too many commands defined.\n"));
1542 }
1543 break;
1544 case 278:
1545 {
1546 char *NameVarOnStack = getConvertedNameFromStack(CVNAME_READING_TYPE_4);
1547 if (NameVarOnStack)
1548 {
1549 if (NameVarOnStack[0] != '0')
1550 {
1551 displayAndStoreError(_("%s: Input arguments should have the same formal variable name.\n"),NameVarOnStack);
1552 }
1553 else
1554 {
1555 displayAndStoreError(_("Input arguments should have the same formal variable name.\n"));
1556 }
1557 FREE(NameVarOnStack);
1558 NameVarOnStack = NULL;
1559 }
1560 }
1561 break;
1562 case 279: case 280:
1563 {
1564 /* no message */
1565 }
1566 break;
1567
1568 default:
1569 {
1570 char *buffer = defaultStringError();
1571 if (buffer)
1572 {
1573 displayAndStoreError(buffer);
1574 FREE(buffer);
1575 buffer = NULL;
1576 }
1577 }
1578 break;
1577 } 1579 }
1578 return 0; 1580 return 0;
1579} 1581}
1580/*--------------------------------------------------------------------------*/ 1582/*--------------------------------------------------------------------------*/
1581static void strip_blank(char *source) 1583static void strip_blank(char *source)
1582{ 1584{
1583 char *p; 1585 char *p;
1584 p = source; 1586 p = source;
1585 /* look for end of string */ 1587 /* look for end of string */
1586 while(*p != '\0') p++; 1588 while(*p != '\0') p++;
1587 while(p != source) 1589 while(p != source)
1588 { 1590 {
1589 p--; 1591 p--;
1590 if(*p != ' ') break; 1592 if(*p != ' ') break;
1591 *p = '\0'; 1593 *p = '\0';
1592 } 1594 }
1593} 1595}
1594/*--------------------------------------------------------------------------*/ 1596/*--------------------------------------------------------------------------*/
1595static char *getConvertedNameFromStack(int cvnametype) 1597static char *getConvertedNameFromStack(int cvnametype)
1596{ 1598{
1597 int one = 1; 1599 int one = 1;
1600
1601 char local_variable_buffer[bsiz];
1598 1602
1599 char local_variable_buffer[bsiz]; 1603 switch (cvnametype)
1600 1604 {
1601 switch (cvnametype) 1605 case CVNAME_READING_TYPE_1 :
1602 { 1606 {
1603 case CVNAME_READING_TYPE_1 : 1607 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], C2F(cha1).buf, &one, bsiz);
1604 { 1608 strncpy(local_variable_buffer, C2F(cha1).buf, nlgh);
1605 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], C2F(cha1).buf, &one, bsiz); 1609 local_variable_buffer[nlgh-1] = '\0';
1606 strncpy(local_variable_buffer, C2F(cha1).buf, nlgh); 1610 }
1607 local_variable_buffer[nlgh-1] = '\0'; 1611 break;
1608 }
1609 break;
1610 1612
1611 case CVNAME_READING_TYPE_2 : 1613 case CVNAME_READING_TYPE_2 :
1612 { 1614 {
1613 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], local_variable_buffer, &one, nlgh); 1615 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], local_variable_buffer, &one, nlgh);
1614 local_variable_buffer[nlgh] = '\0'; 1616 local_variable_buffer[nlgh] = '\0';
1615 } 1617 }
1616 break; 1618 break;
1617 1619
1618 case CVNAME_READING_TYPE_3 : 1620 case CVNAME_READING_TYPE_3 :
1619 { 1621 {
1620 C2F(cvname)(&C2F(recu).ids[C2F(recu).pt * nsiz - nsiz], C2F(cha1).buf, &one, bsiz); 1622 C2F(cvname)(&C2F(recu).ids[C2F(recu).pt * nsiz - nsiz], C2F(cha1).buf, &one, bsiz);
1621 strncpy(local_variable_buffer, C2F(cha1).buf, nlgh); 1623 strncpy(local_variable_buffer, C2F(cha1).buf, nlgh);
1622 local_variable_buffer[nlgh-1] = '\0'; 1624 local_variable_buffer[nlgh-1] = '\0';
1623 } 1625 }
1624 break; 1626 break;
1625 1627
1626 case CVNAME_READING_TYPE_4 : 1628 case CVNAME_READING_TYPE_4 :
1627 { 1629 {
1628 #define SHIFT_CHAR 3 1630#define SHIFT_CHAR 3
1629 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], C2F(cha1).buf + SHIFT_CHAR, &one, nlgh+1); 1631 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], C2F(cha1).buf + SHIFT_CHAR, &one, nlgh+1);
1630 strncpy(local_variable_buffer, C2F(cha1).buf+SHIFT_CHAR, nlgh); 1632 strncpy(local_variable_buffer, C2F(cha1).buf+SHIFT_CHAR, nlgh);
1631 local_variable_buffer[nlgh] = '\0'; 1633 local_variable_buffer[nlgh] = '\0';
1632 } 1634 }
1633 break; 1635 break;
1634 1636
1635 case CVNAME_READING_TYPE_5 : 1637 case CVNAME_READING_TYPE_5 :
1636 { 1638 {
1637 strncpy(local_variable_buffer, C2F(cha1).buf,bsiz); 1639 strncpy(local_variable_buffer, C2F(cha1).buf,bsiz);
1638 local_variable_buffer[bsiz-1] = '\0'; 1640 local_variable_buffer[bsiz-1] = '\0';
1639 } 1641 }
1640 break; 1642 break;
1641 1643
1642 case CVNAME_READING_TYPE_6 : 1644 case CVNAME_READING_TYPE_6 :
1643 { 1645 {
1644 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], C2F(cha1).buf, &one, nlgh+1); 1646 C2F(cvname)(&C2F(recu).ids[(C2F(recu).pt + 1) * nsiz - nsiz], C2F(cha1).buf, &one, nlgh+1);
1645 strncpy(local_variable_buffer, C2F(cha1).buf, nlgh); 1647 strncpy(local_variable_buffer, C2F(cha1).buf, nlgh);
1646 local_variable_buffer[nlgh-1] = '\0'; 1648 local_variable_buffer[nlgh-1] = '\0';
1647 } 1649 }
1648 break; 1650 break;
1649 1651
1650 default: 1652 default:
1651 strcpy(local_variable_buffer,_("\"unknown data\"")); 1653 strcpy(local_variable_buffer,_("\"unknown data\""));
1652 break; 1654 break;
1653 } 1655 }
1654 1656
1655 strip_blank(local_variable_buffer); 1657 strip_blank(local_variable_buffer);
1656 return strdup(local_variable_buffer); 1658 return strdup(local_variable_buffer);
1657} 1659}
1658/*--------------------------------------------------------------------------*/ 1660/*--------------------------------------------------------------------------*/
1659static void displayAndStoreError(const char *msg,...) 1661static void displayAndStoreError(const char *msg,...)
1660{ 1662{
1661 int io = 0; 1663 int io = 0;
1662 int len = 0; 1664 int len = 0;
1663 1665
1664 va_list ap; 1666 va_list ap;
1665 static char s_buf[bsiz]; 1667 static char s_buf[bsiz];
1666 1668
1667 va_start(ap,msg); 1669 va_start(ap,msg);
1668 1670
1669#if defined(linux) || defined(_MSC_VER) 1671#if defined(linux) || defined(_MSC_VER)
1670 { 1672 {
1671 int count=0; 1673 int count=0;
1672 count= vsnprintf(s_buf,bsiz, msg, ap ); 1674 count= vsnprintf(s_buf,bsiz, msg, ap );
1673 if (count == -1) s_buf[bsiz-1]='\0'; 1675 if (count == -1) s_buf[bsiz-1]='\0';
1674 } 1676 }
1675#else 1677#else
1676 (void )vsprintf(s_buf, msg, ap ); 1678 (void )vsprintf(s_buf, msg, ap );
1677#endif 1679#endif
1678 va_end(ap); 1680 va_end(ap);
1681
1682 /* store and display error(lasterror) */
1679 1683
1680 /* store and display error(lasterror) */ 1684 len = (int)strlen(s_buf);
1681 1685 C2F(msgout)(&io,&C2F(iop).wte,s_buf,len);
1682 len = (int)strlen(s_buf);
1683 C2F(msgout)(&io,&C2F(iop).wte,s_buf,len);
1684} 1686}
1685/*--------------------------------------------------------------------------*/ 1687/*--------------------------------------------------------------------------*/
1686static void resetLastError(void) 1688static void resetLastError(void)
1687{ 1689{
1688 #define SPACE_CHAR " " 1690#define SPACE_CHAR " "
1689 int zero = 0; 1691 int zero = 0;
1690 int lenspace = (int)strlen(SPACE_CHAR); 1692 int lenspace = (int)strlen(SPACE_CHAR);
1691 1693
1692 /* reset lasterror */ 1694 /* reset lasterror */
1693 C2F(linestore)(&zero); 1695 C2F(linestore)(&zero);
1694 C2F(funnamestore)(SPACE_CHAR, &zero, lenspace); 1696 C2F(funnamestore)(SPACE_CHAR, &zero, lenspace);
1695 C2F(freemsgtable)(); 1697 C2F(freemsgtable)();
1696} 1698}
1697/*--------------------------------------------------------------------------*/ 1699/*--------------------------------------------------------------------------*/
1698static char *defaultStringError(void) 1700static char *defaultStringError(void)
1699{ 1701{
1700 char *buffer = NULL; 1702 char *buffer = NULL;
1701 int bufl = 1; 1703 int bufl = 1;
1702 1704
1703 while(*(unsigned char *)&C2F(cha1).buf[bufl - 1] != '\0' && bufl < 80) 1705 while(*(unsigned char *)&C2F(cha1).buf[bufl - 1] != '\0' && bufl < 80)
1704 { 1706 {
1705 ++bufl; 1707 ++bufl;
1706 } 1708 }
1707 --bufl; 1709 --bufl;
1708 1710
1709
1710 buffer = (char*)MALLOC( ((int)strlen(C2F(cha1).buf) + 1) * sizeof(char));
1711 1711
1712 /* remove blank */ 1712 buffer = (char*)MALLOC( ((int)strlen(C2F(cha1).buf) + 1) * sizeof(char));
1713 if (buffer) 1713
1714 { 1714 /* remove blank */
1715 strcpy(buffer, C2F(cha1).buf); 1715 if (buffer)
1716 strip_blank(buffer); 1716 {
1717 } 1717 strcpy(buffer, C2F(cha1).buf);
1718 return buffer; 1718 strip_blank(buffer);
1719 }
1720 return buffer;
1719} 1721}
1720/*--------------------------------------------------------------------------*/ \ No newline at end of file 1722/*--------------------------------------------------------------------------*/