- Timestamp:
- May 6, 2015 1:36:55 PM (9 years ago)
- Location:
- trunk/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/field.tcl
r5355 r5432 932 932 } else { 933 933 unset contents 934 puts stderr "Can't parse DX data" 934 # vtkdata variable holds error message 935 puts stderr "Can't parse DX data\n$vtkdata" 935 936 continue; # Ignore this component 936 937 } -
trunk/gui/src/RpDxToVtk.c
r5421 r5432 427 427 isUniform = 1; 428 428 if ((count[0] < 0) || (count[1] < 0) || (count[2] < 0)) { 429 sprintf(mesg, " invalid grid size: x=%d, y=%d, z=%d",429 sprintf(mesg, "Invalid grid size: x=%d, y=%d, z=%d", 430 430 count[0], count[1], count[2]); 431 431 Tcl_AppendResult(interp, mesg, (char *)NULL); … … 446 446 if (nAxes == 3) { 447 447 Tcl_AppendResult(interp, "too many delta statements", 448 (char *)NULL);448 (char *)NULL); 449 449 return TCL_ERROR; 450 450 } … … 502 502 " items %d data follows", &nPoints) == 1) { 503 503 // XXX: Deprecated, invalid ordering of keywords 504 fprintf(stderr, "Invalid DX: 'rank' keyword should precede 'shape'."); 504 Tcl_AppendResult(interp, "Invalid DX: 'rank' keyword should precede 'shape'.", 505 (char *)NULL); 505 506 return TCL_ERROR; 506 507 } else if (sscanf(line, "object %*d class array type %*s rank 1 shape 3" … … 567 568 } 568 569 } 570 } else if (sscanf(line, "object %*d class array type %*s rank 0" 571 " times %d data follows", &nPoints) == 1) { 572 /* Handle incorrect keyword: Do any tools make this mistake? */ 573 Tcl_AppendResult(interp, "Invalid DX: found 'times' where 'items' keyword was expected.", 574 (char *)NULL); 575 return TCL_ERROR; 569 576 #ifdef notdef 570 577 } else { … … 576 583 if (isUniform) { 577 584 if (nPoints > 1 && nAxes == 0) { 578 fprintf(stderr, "Invalid DX file: uniform grid with no deltas found\n"); 585 Tcl_AppendResult(interp, "Invalid DX file: uniform grid with no deltas found", 586 (char *)NULL); 579 587 return TCL_ERROR; 580 588 } 581 589 if (nPoints > 1 && ((dx == dy) && (dx == dz) && (dx == 0.0))) { 582 fprintf(stderr, "Invalid deltas in DX file: %g %g %g\n", dx, dy, dz); 590 sprintf(mesg, "Invalid deltas in DX file: %g %g %g", dx, dy, dz); 591 Tcl_AppendResult(interp, mesg, (char *)NULL); 583 592 return TCL_ERROR; 584 593 } 585 594 if (dx < 0.0 || dy < 0.0 || dz < 0.0) { 586 fprintf(stderr, "Negative deltas not supported in DX file: %g %g %g\n", dx, dy, dz); 595 sprintf(mesg, "Negative deltas not supported in DX file: %g %g %g", 596 dx, dy, dz); 597 Tcl_AppendResult(interp, mesg, (char *)NULL); 587 598 return TCL_ERROR; 588 599 }
Note: See TracChangeset
for help on using the changeset viewer.