third step, cleanning english mistakes and special cases
[scilab.git] / scilab / modules / graphics / src / c / getHandleProperty / set_format_n_property.c
1 /*------------------------------------------------------------------------*/
2 /* file: set_format_n_property.c                                          */
3 /* Copyright INRIA 2006                                                   */
4 /* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
5 /* desc : function to modify in Scilab the format_n field of              */
6 /*        a handle                                                        */
7 /*------------------------------------------------------------------------*/
8
9 #include "setHandleProperty.h"
10 #include "SetProperty.h"
11 #include "getPropertyAssignedValue.h"
12 #include "SetPropertyStatus.h"
13 #include "GetProperty.h"
14 #include "sciprint.h"
15
16 /*------------------------------------------------------------------------*/
17 int set_format_n_property( sciPointObj * pobj, int stackPointer, int valueType, int nbRow, int nbCol )
18 {
19   if ( !isParameterStringMatrix( valueType ) )
20   {
21     sciprint(_("Incompatible type for property %s.\n"),"format_n") ;
22     return SET_PROPERTY_ERROR ;
23   }
24
25   if ( sciGetEntityType(pobj) != SCI_AXES )
26   {
27     sciprint(_("%s property does not exist for this handle.\n"),"format_n") ;
28     return SET_PROPERTY_ERROR ;
29   }
30   pAXES_FEATURE(pobj)->format[0] = getStringFromStack(stackPointer)[0] ;
31   return SET_PROPERTY_SUCCEED ;
32 }
33 /*------------------------------------------------------------------------*/