1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
4  *
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13  */
14 
15 #ifndef __STACK_OPTIONAL_API__
16 #define __STACK_OPTIONAL_API__
17 
18 #if !defined(__INTERNAL_API_SCILAB__)
19 #error Do not include api_stack_optional.h. Include api_scilab.h instead.
20 #endif
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 typedef struct rhs_opts__
27 {
28     int iPos ; /** stack position : -1 if not present */
29     char* pstName;
30     int iType;// -1 not yet defined
31     int iRows;
32     int iCols;
33     int* piAddr;
34 } rhs_opts;
35 
36 /**
37  * Get optional variable
38  * @param[in] name of function caller
39  * @param[in/out] opts structure of optional arguments
40  * @return if the operation succeeded ( 0 ) or not ( !0 )
41  */
42 int getOptionals(void* _pvCtx, char* fname, rhs_opts opts[]);
43 int FirstOpt(void* _pvCtx);
44 int NumOpt(void* _pvCtx);
45 int FindOpt(void* _pvCtx, char* pstProperty, rhs_opts opts[]);
46 #ifdef __cplusplus
47 }
48 #endif
49 #endif /* __STACK_OPTIONAL_API__ */
50