fix build on Windows
Allan CORNET [Mon, 19 Oct 2009 10:05:25 +0000 (12:05 +0200)]
24 files changed:
scilab/modules/graphics/src/c/getHandleProperty/getPropertyAssignedValue.c
scilab/modules/graphics/src/c/getHandleProperty/getPropertyAssignedValue.h
scilab/modules/graphics/src/c/getHandleProperty/set_auto_clear_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_auto_dimensionning_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_auto_position_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_auto_resize_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_auto_rotation_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_auto_scale_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_closed_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_colored_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_cube_scaling_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_event_handler_enable_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_filled_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_fractional_font_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_handle_visible_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_immediate_drawing_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_interp_color_mode_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_isoview_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_pixmap_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_surface_mode_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_tics_segment_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_tight_limits_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_visible_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_zoom_state_property.c

index 559cbb3..c8c2c28 100644 (file)
@@ -23,7 +23,7 @@
 #include "MALLOC.h"
 #include "BasicAlgos.h"
 #include "freeArrayOfString.h"
-
+#include "Scierror.h"
 /*--------------------------------------------------------------------------*/
 BOOL isParameterHandle( int type )
 {
index 12f1bdf..cc5474f 100644 (file)
@@ -107,7 +107,9 @@ GRAPHICS_IMPEXP BOOL isStringParamEqual( size_t stackPointer, const char * str )
  *         NOT_A_BOOLEAN_VALUE otherwise
  */
 GRAPHICS_IMPEXP int tryGetBooleanValueFromStack(size_t stackPointer, int valueType, int nbRow, int nbCol, char* propertyName);
-static int NOT_A_BOOLEAN_VALUE = 2*FALSE - TRUE;    // with that we are sure to be nether equal to TRUE nor FALSE
+// with that we are sure to be nether equal to TRUE nor FALSE
+#define NOT_A_BOOLEAN_VALUE (2*FALSE) - TRUE
+
 /*------------------------------------------------------------------------------*/
 /* Tlist */
 typedef struct 
index 2b9a32d..4766f8a 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_auto_clear_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
+       int b =  (int)FALSE;
        if (pobj == NULL)
        {
                pobj = sciGetCurrentSubWin();
        }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_clear");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_clear");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  if(b==TRUE)
-    return sciSetAddPlot(pobj, FALSE);
-  return sciSetAddPlot(pobj, TRUE);
+       if(b==TRUE)
+       {
+               return sciSetAddPlot(pobj, FALSE);
+       }
+       return sciSetAddPlot(pobj, TRUE);
 }
 /*------------------------------------------------------------------------*/
 
index cac5a9c..45efef2 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_auto_dimensionning_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType( pobj ) != SCI_TEXT )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_dimensionning") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType( pobj ) != SCI_TEXT )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_dimensionning") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_dimensionning");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_dimensionning");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  return sciSetAutoSize(pobj, b);
+       return sciSetAutoSize(pobj, b);
 }
 /*------------------------------------------------------------------------*/
 
index 9307c23..cb1594a 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_auto_position_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_LABEL )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_position");
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_LABEL )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_position");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_position");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  return sciSetAutoPosition(pobj, b);
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_position");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       return sciSetAutoPosition(pobj, b);
 }
 /*------------------------------------------------------------------------*/
index 528fc9b..805de79 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_auto_resize_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
+       int b =  (int)FALSE;
+       int status = 0;
        if ( sciGetEntityType(pobj) != SCI_FIGURE )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_resize");
-    return SET_PROPERTY_ERROR ;
-  }
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_resize");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_resize");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  int status = sciSetResize(pobj, b);
-  enableFigureSynchronization(pobj);
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_resize");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       status = sciSetResize(pobj, b);
+       enableFigureSynchronization(pobj);
        return sciSetNoRedrawStatus((SetPropertyStatus)status);
 }
 /*------------------------------------------------------------------------*/
index 065d846..dfe8242 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_auto_rotation_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_LABEL )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_rotation");
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_LABEL )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_rotation");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_rotation");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  return sciSetAutoRotation(pobj, b);
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_rotation");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       return sciSetAutoRotation(pobj, b);
 }
 /*------------------------------------------------------------------------*/
index d7034b8..23900b8 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_auto_scale_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
+       int b =  (int)FALSE;
        if (sciGetEntityType(pobj) != SCI_FIGURE && sciGetEntityType(pobj) != SCI_SUBWIN)
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_scale");
-    return SET_PROPERTY_ERROR ;
-  }
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"auto_scale");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_scale");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  return sciSetAutoScale(pobj, b);
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "auto_scale");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       return sciSetAutoScale(pobj, b);
 }
 /*------------------------------------------------------------------------*/
index 5b4eb59..dac0ef0 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_closed_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if(sciGetEntityType(pobj) != SCI_POLYLINE)
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"closed") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if(sciGetEntityType(pobj) != SCI_POLYLINE)
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"closed") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "closed");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  pPOLYLINE_FEATURE(pobj)->closed = b;
-  return SET_PROPERTY_SUCCEED;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "closed");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       pPOLYLINE_FEATURE(pobj)->closed = b;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index 2f5b09e..5980035 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_colored_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType( pobj ) != SCI_SEGS || pSEGS_FEATURE(pobj)->ptype == 0 )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"colored") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType( pobj ) != SCI_SEGS || pSEGS_FEATURE(pobj)->ptype == 0 )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"colored") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "colored");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  pSEGS_FEATURE(pobj)->typeofchamp = b;
-  return SET_PROPERTY_SUCCEED;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "colored");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       pSEGS_FEATURE(pobj)->typeofchamp = b;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index 213f181..059e1a8 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_cube_scaling_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"cube_scaling") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"cube_scaling") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "cube_scaling");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  pSUBWIN_FEATURE (pobj)->cube_scaling = b;
-  return SET_PROPERTY_SUCCEED;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "cube_scaling");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       pSUBWIN_FEATURE (pobj)->cube_scaling = b;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index c0f70f2..8d6bb8e 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_event_handler_enable_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType( pobj ) != SCI_FIGURE )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"event_handler_enable");
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType( pobj ) != SCI_FIGURE )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"event_handler_enable");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "event_handler_enable");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "event_handler_enable");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  return sciSetNoRedrawStatus(sciSetIsEventHandlerEnable(pobj, b));
+       return sciSetNoRedrawStatus(sciSetIsEventHandlerEnable(pobj, b));
 }
 /*------------------------------------------------------------------------*/
index e0ecc2e..f47cac5 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_filled_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if (sciGetEntityType(pobj) != SCI_SUBWIN)
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"filled");
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if (sciGetEntityType(pobj) != SCI_SUBWIN)
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"filled");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "filled");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  return sciSetIsFilled(pobj, b);
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "filled");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       return sciSetIsFilled(pobj, b);
 }
 /*------------------------------------------------------------------------*/
index ac18992..68a4f6b 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_fractional_font_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if (   sciGetEntityType(pobj) != SCI_SUBWIN
-      && sciGetEntityType(pobj) != SCI_TEXT
-      && sciGetEntityType(pobj) != SCI_LABEL
-      && sciGetEntityType(pobj) != SCI_AXES
-      && sciGetEntityType(pobj) != SCI_LEGEND)
-  {
-    Scierror(999, _("%s property does not exist for this handle.\n"),"fractional_font");
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if (   sciGetEntityType(pobj) != SCI_SUBWIN
+               && sciGetEntityType(pobj) != SCI_TEXT
+               && sciGetEntityType(pobj) != SCI_LABEL
+               && sciGetEntityType(pobj) != SCI_AXES
+               && sciGetEntityType(pobj) != SCI_LEGEND)
+       {
+               Scierror(999, _("%s property does not exist for this handle.\n"),"fractional_font");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "fractional_font");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  sciSetIsUsingFractionalMetrics(pobj, b);
+       b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "fractional_font");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  return SET_PROPERTY_SUCCEED;
+       sciSetIsUsingFractionalMetrics(pobj, b);
+
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index b32dfc1..a374183 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_handle_visible_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if (sciGetEntityType (pobj) != SCI_UIMENU)
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"handle_visible") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if (sciGetEntityType (pobj) != SCI_UIMENU)
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"handle_visible") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "zoom_state");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "zoom_state");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  pUIMENU_FEATURE(pobj)->handle_visible = b;
-  return SET_PROPERTY_SUCCEED;
+       pUIMENU_FEATURE(pobj)->handle_visible = b;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index 67dee24..967c048 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_immediate_drawing_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType (pobj) != SCI_FIGURE )
-  {
-    Scierror(999, _("%s property undefined for this object.\n"), "immediate_drawing") ;
-    return SET_PROPERTY_ERROR ;
-  }
-  
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "immediate_drawing");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       int b =  (int)FALSE;
+       if ( sciGetEntityType (pobj) != SCI_FIGURE )
+       {
+               Scierror(999, _("%s property undefined for this object.\n"), "immediate_drawing") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  sciSetImmediateDrawingMode(pobj, b);
-  return SET_PROPERTY_SUCCEED ;  
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "immediate_drawing");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       sciSetImmediateDrawingMode(pobj, b);
+       return SET_PROPERTY_SUCCEED ;  
 }
 /*------------------------------------------------------------------------*/
index 5c00952..a1b75d7 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_interp_color_mode_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if( sciGetEntityType(pobj) != SCI_POLYLINE )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"interp_color_mode");
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if( sciGetEntityType(pobj) != SCI_POLYLINE )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"interp_color_mode");
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "interp_color_mode");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "interp_color_mode");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  pPOLYLINE_FEATURE (pobj)->isinterpshaded = b;
-  return SET_PROPERTY_SUCCEED;
+       pPOLYLINE_FEATURE (pobj)->isinterpshaded = b;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index 9389992..f44a84e 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_isoview_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
-  {
-    Scierror(999, _("%s property does not exist for this handle.\n"),"isoview") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+       {
+               Scierror(999, _("%s property does not exist for this handle.\n"),"isoview") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "isoview");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  pSUBWIN_FEATURE (pobj)->isoview = b;
-  return SET_PROPERTY_SUCCEED;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "isoview");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       pSUBWIN_FEATURE (pobj)->isoview = b;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index aed1e6d..1857536 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_pixmap_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType (pobj) != SCI_FIGURE )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"pixmap");
-    return SET_PROPERTY_ERROR;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType (pobj) != SCI_FIGURE )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"pixmap");
+               return SET_PROPERTY_ERROR;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "pixmap");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "pixmap");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  sciSetPixmapMode(pobj, b);
-  return SET_PROPERTY_SUCCEED;
+       sciSetPixmapMode(pobj, b);
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
index 66f7b06..02d735d 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_surface_mode_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_PLOT3D &&
-       sciGetEntityType(pobj) != SCI_FAC3D  &&
-       sciGetEntityType(pobj) != SCI_SURFACE   )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"surface_mode") ;
-    return SET_PROPERTY_ERROR ;
-  }
-  
-  int b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "surface_mode");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       int b =  (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_PLOT3D &&
+               sciGetEntityType(pobj) != SCI_FAC3D  &&
+               sciGetEntityType(pobj) != SCI_SURFACE   )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"surface_mode") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  return sciSetIsLine(pobj, b);
+       b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "surface_mode");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       return sciSetIsLine(pobj, b);
 }
 /*------------------------------------------------------------------------*/
index b95ab2a..c1ad957 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_tics_segment_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_AXES )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"tics_segment") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_AXES )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"tics_segment") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "tics_segment");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "tics_segment");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  pAXES_FEATURE (pobj)->seg = b;
-  return SET_PROPERTY_SUCCEED;
+       pAXES_FEATURE (pobj)->seg = b;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/
 
index 7adea94..a25a0d2 100644 (file)
 /*------------------------------------------------------------------------*/
 int set_tight_limits_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"tight_limits") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b =  (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"tight_limits") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "tight_limits");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  pSUBWIN_FEATURE (pobj)->tight_limits=b;
-  return SET_PROPERTY_SUCCEED ;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "tight_limits");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+
+       pSUBWIN_FEATURE (pobj)->tight_limits = b;
+       return SET_PROPERTY_SUCCEED ;
 }
 /*------------------------------------------------------------------------*/
 
index 3667a9f..9d2219e 100644 (file)
 #include "SetPropertyStatus.h"
 #include "SetUiobjectVisible.h"
 #include "GetProperty.h"
-
+#include "BOOL.h"
 /*------------------------------------------------------------------------*/
 int set_visible_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( (sciGetEntityType(pobj) == SCI_UIMENU) || (sciGetEntityType(pobj) == SCI_UICONTROL) )
-    {
-      return SetUiobjectVisible(pobj, stackPointer, valueType, nbRow, nbCol);
-    }
+       int b = (int)FALSE;
+       if ( (sciGetEntityType(pobj) == SCI_UIMENU) || (sciGetEntityType(pobj) == SCI_UICONTROL) )
+       {
+               return SetUiobjectVisible(pobj, stackPointer, valueType, nbRow, nbCol);
+       }
+
+       b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "visible");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  int b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "visible");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
-  
-  return sciSetVisibility(pobj, b);
+       return sciSetVisibility(pobj, b);
 }
 /*------------------------------------------------------------------------*/
index 8dfe08c..b56dc81 100644 (file)
 #include "localization.h"
 #include "SetPropertyStatus.h"
 #include "PloEch.h"
-
+#include "BOOL.h"
 /*------------------------------------------------------------------------*/
 int set_zoom_state_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
 {
-  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
-  {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"zoom_state") ;
-    return SET_PROPERTY_ERROR ;
-  }
+       int b = (int)FALSE;
+       if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+       {
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"zoom_state") ;
+               return SET_PROPERTY_ERROR ;
+       }
 
-  int b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "zoom_state");
-  if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
+       b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "zoom_state");
+       if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-  if(b)
-  { 
-    if(sciGetZooming(pobj))
-    {
-      Scierror(999, "Object is already zoomed.\n");
-      return SET_PROPERTY_ERROR;
-    }
-    else
-    {
-      Scierror(999, "set zoom box ( set('zoom_box',[xmin ymin xmax ymax])).\n");
-      return SET_PROPERTY_ERROR;
-    }
-  }
-  else
-  { 
-    unzoom();
-    return sciSetZooming(pobj, FALSE);
-  }
+       if(b)
+       { 
+               if(sciGetZooming(pobj))
+               {
+                       Scierror(999, "Object is already zoomed.\n");
+                       return SET_PROPERTY_ERROR;
+               }
+               else
+               {
+                       Scierror(999, "set zoom box ( set('zoom_box',[xmin ymin xmax ymax])).\n");
+                       return SET_PROPERTY_ERROR;
+               }
+       }
+       else
+       { 
+               unzoom();
+               return sciSetZooming(pobj, FALSE);
+       }
 
-  return SET_PROPERTY_SUCCEED;
+       return SET_PROPERTY_SUCCEED;
 }
 /*------------------------------------------------------------------------*/