include added
[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 #include "localization.h"
16
17 /*------------------------------------------------------------------------*/
18 int set_format_n_property( sciPointObj * pobj, int stackPointer, int valueType, int nbRow, int nbCol )
19 {
20   if ( !isParameterStringMatrix( valueType ) )
21   {
22     sciprint(_("Incompatible type for property %s.\n"),"format_n") ;
23     return SET_PROPERTY_ERROR ;
24   }
25
26   if ( sciGetEntityType(pobj) != SCI_AXES )
27   {
28     sciprint(_("%s property does not exist for this handle.\n"),"format_n") ;
29     return SET_PROPERTY_ERROR ;
30   }
31   pAXES_FEATURE(pobj)->format[0] = getStringFromStack(stackPointer)[0] ;
32   return SET_PROPERTY_SUCCEED ;
33 }
34 /*------------------------------------------------------------------------*/