From d9d3766fa355ff56fc073588cbaddc125ce44928 Mon Sep 17 00:00:00 2001 From: Vincent COUVERT Date: Fri, 8 Nov 2013 10:55:29 +0100 Subject: [PATCH] Fix code: UIDs are now integers and no more char* Change-Id: I2e4a801faa6bb82dede92b052c5fcb861ea08e88 --- scilab/modules/scicos_blocks/src/c/bouncexy.c | 20 ++++++++++---------- scilab/modules/scicos_blocks/src/c/cscopxy3d.c | 7 +++---- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/scilab/modules/scicos_blocks/src/c/bouncexy.c b/scilab/modules/scicos_blocks/src/c/bouncexy.c index 1c5b029..c4807b4 100644 --- a/scilab/modules/scicos_blocks/src/c/bouncexy.c +++ b/scilab/modules/scicos_blocks/src/c/bouncexy.c @@ -162,7 +162,7 @@ SCICOS_BLOCKS_IMPEXP void bouncexy(scicos_block * block, scicos_flag flag) set_block_error(-5); } iFigureUID = getFigure(block); - if (iFigureUID == NULL) + if (iFigureUID == 0) { // allocation error set_block_error(-5); @@ -171,7 +171,7 @@ SCICOS_BLOCKS_IMPEXP void bouncexy(scicos_block * block, scicos_flag flag) case StateUpdate: iFigureUID = getFigure(block); - if (iFigureUID == NULL) + if (iFigureUID == 0) { // allocation error set_block_error(-5); @@ -391,7 +391,7 @@ static int getFigure(scicos_block * block) iFigureUID = getFigureFromIndex(figNum); // create on demand - if (iFigureUID == NULL) + if (iFigureUID == 0) { iFigureUID = createNewFigureWithAxes(); setGraphicObjectProperty(iFigureUID, __GO_ID__, &figNum, jni_int, 1); @@ -429,7 +429,7 @@ static int getAxe(int iFigureUID, scicos_block * block) // assert the sco is not NULL if (sco == NULL) { - return NULL; + return 0; } // fast path for an existing object @@ -443,7 +443,7 @@ static int getAxe(int iFigureUID, scicos_block * block) /* * Allocate if necessary */ - if (iAxe == NULL) + if (iAxe == 0) { cloneAxesModel(iFigureUID); iAxe = findChildWithKindAt(iFigureUID, __GO_AXES__, 0); @@ -452,7 +452,7 @@ static int getAxe(int iFigureUID, scicos_block * block) /* * Setup on first access */ - if (iAxe != NULL) + if (iAxe != 0) { // allocate the polylines through the getter for (i = 0; i < block->insz[0]; i++) @@ -462,7 +462,7 @@ static int getAxe(int iFigureUID, scicos_block * block) } else { - return NULL; + return 0; } /* @@ -486,7 +486,7 @@ static int getArc(int iAxeUID, scicos_block * block, int row) // assert the sco is not NULL if (sco == NULL || sco->scope.cachedArcsUIDs == NULL) { - return NULL; + return 0; } // fast path for an existing object @@ -504,14 +504,14 @@ static int getArc(int iAxeUID, scicos_block * block, int row) { iArc = createGraphicObject(__GO_ARC__); - if (iArc != NULL) + if (iArc != 0) { createDataObject(iArc, __GO_ARC__); setGraphicObjectRelationship(iAxeUID, iArc); } else { - return NULL; + return 0; } } diff --git a/scilab/modules/scicos_blocks/src/c/cscopxy3d.c b/scilab/modules/scicos_blocks/src/c/cscopxy3d.c index fb5a27c..7c13261 100644 --- a/scilab/modules/scicos_blocks/src/c/cscopxy3d.c +++ b/scilab/modules/scicos_blocks/src/c/cscopxy3d.c @@ -160,7 +160,7 @@ SCICOS_BLOCKS_IMPEXP void cscopxy3d(scicos_block * block, scicos_flag flag) set_block_error(-5); } iFigureUID = getFigure(block); - if (iFigureUID == NULL) + if (iFigureUID == 0) { // allocation error set_block_error(-5); @@ -169,7 +169,7 @@ SCICOS_BLOCKS_IMPEXP void cscopxy3d(scicos_block * block, scicos_flag flag) case StateUpdate: iFigureUID = getFigure(block); - if (iFigureUID == NULL) + if (iFigureUID == 0) { // allocation error set_block_error(-5); @@ -465,7 +465,7 @@ static int getFigure(scicos_block * block) // assert the sco is not NULL if (sco == NULL) { - return NULL; + return 0; } // fast path for an existing object @@ -575,7 +575,6 @@ static int getAxe(int iFigureUID, scicos_block * block) static int getPolyline(int iAxeUID, scicos_block * block, int row) { int iPolyline; - double d__0 = 0.0; BOOL b__true = TRUE; int color; -- 1.7.9.5