"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cgnstools/cgnsview/cgiotcl.c" between
CGNS-4.1.0.tar.gz and CGNS-4.1.1.tar.gz

About: The CGNS (CFD General Notation System) provides a standard for recording and recovering computer data associated with the numerical solution of fluid dynamics equations.

cgiotcl.c  (CGNS-4.1.0):cgiotcl.c  (CGNS-4.1.1)
skipping to change at line 1462 skipping to change at line 1462
np *= dims[n]; np *= dims[n];
} }
newdata = NULL; newdata = NULL;
if (np > 0 && dtold->size > 0) { if (np > 0 && dtold->size > 0) {
olddata = (char *) malloc ((size_t)(np * dtold->size)); olddata = (char *) malloc ((size_t)(np * dtold->size));
if (NULL == olddata) { if (NULL == olddata) {
Tcl_AppendResult (interp, "malloc failed for data", NULL); Tcl_AppendResult (interp, "malloc failed for data", NULL);
return TCL_ERROR; return TCL_ERROR;
} }
if (cgio_read_all_data (cgioNum, node_id, olddata)) { if (cgio_read_all_data_type (cgioNum, node_id, dtold->name, oldd ata)) {
free (olddata); free (olddata);
return (get_error (interp, "cgio_read_all_data")); return (get_error (interp, "cgio_read_all_data"));
} }
switch (dtold->type) { switch (dtold->type) {
case C1data: case C1data:
newdata = convert_C1 ((size_t)np, olddata, dtnew); newdata = convert_C1 ((size_t)np, olddata, dtnew);
break; break;
case B1data: case B1data:
newdata = convert_B1 ((size_t)np, olddata, dtnew); newdata = convert_B1 ((size_t)np, olddata, dtnew);
break; break;
skipping to change at line 1656 skipping to change at line 1656
return TCL_ERROR; return TCL_ERROR;
if (np == 0 || dt->size == 0) if (np == 0 || dt->size == 0)
return TCL_OK; return TCL_OK;
values = (char *) malloc ((unsigned)np * (unsigned)dt->size + 1); values = (char *) malloc ((unsigned)np * (unsigned)dt->size + 1);
if (NULL == values) { if (NULL == values) {
Tcl_AppendResult (interp, "malloc failed for data", NULL); Tcl_AppendResult (interp, "malloc failed for data", NULL);
return TCL_ERROR; return TCL_ERROR;
} }
if (cgio_read_all_data (cgioNum, node_id, values)) { if (cgio_read_all_data_type (cgioNum, node_id, dt->name, values)) {
free (values); free (values);
return (get_error (interp, "cgio_read_all_data")); return (get_error (interp, "cgio_read_all_data_type"));
} }
if (dt->type == C1data) { if (dt->type == C1data) {
values[np] = 0; values[np] = 0;
Tcl_AppendResult (interp, values, NULL); Tcl_AppendResult (interp, values, NULL);
} }
else if (dt->type == B1data) { else if (dt->type == B1data) {
B1 *u = (B1 *)values; B1 *u = (B1 *)values;
for (n = 0; n < np; n++, u++) { for (n = 0; n < np; n++, u++) {
sprintf (str, "%d", (int)*u); sprintf (str, "%d", (int)*u);
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)