~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/graphics/src/c/getHandleProperty/set_sub_tics_property.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    char* type = NULL;
42
42
    char* axisSubticksPropertiesNames[3] = {__GO_X_AXIS_SUBTICKS__, __GO_Y_AXIS_SUBTICKS__, __GO_Z_AXIS_SUBTICKS__};
43
43
 
44
 
    if ( !isParameterDoubleMatrix( valueType ) )
 
44
    if ( !( valueType == sci_matrix ) )
45
45
    {
46
46
        Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "sub_tics");
47
47
        return SET_PROPERTY_ERROR ;
65
65
        }
66
66
        else
67
67
        {
68
 
            Scierror(999, _("'%s' property does not exist for this handle.\n"),"sub_tics");
 
68
            Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_tics");
69
69
            return SET_PROPERTY_ERROR;
70
70
        }
71
71
    }
73
73
    {
74
74
        int autoSubticks;
75
75
        int i;
76
 
        double * values = getDoubleMatrixFromStack( stackPointer );
 
76
        double * values = stk( stackPointer );
77
77
 
78
78
        result = SET_PROPERTY_SUCCEED;
79
79
 
92
92
 
93
93
        if (status == FALSE)
94
94
        {
95
 
            Scierror(999, _("'%s' property does not exist for this handle.\n"),"sub_ticks");
 
95
            Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks");
96
96
            return SET_PROPERTY_ERROR;
97
97
        }
98
98
 
102
102
 
103
103
            nbTicks = (int) values[i];
104
104
 
105
 
            if( nbTicks < 0 )
 
105
            if ( nbTicks < 0 )
106
106
            {
107
107
                nbTicks = 0;
108
108
            }
117
117
 
118
118
        if (result == SET_PROPERTY_ERROR)
119
119
        {
120
 
            Scierror(999, _("'%s' property does not exist for this handle.\n"),"sub_ticks");
 
120
            Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks");
121
121
        }
122
122
 
123
123
        return result;
124
124
    }
125
125
    else
126
126
    {
127
 
        Scierror(999, _("'%s' property does not exist for this handle.\n"),"sub_ticks");
 
127
        Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks");
128
128
        return SET_PROPERTY_ERROR;
129
129
    }
130
130
    return SET_PROPERTY_SUCCEED;