33a8312b50e59daaf09841e35e68a8ba4010dae1
[scilab.git] / scilab / modules / string / sci_gateway / c / gw_string.c
1 /*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) INRIA - Allan CORNET , Cong WU
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution.  The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 *
11 */
12
13 /*--------------------------------------------------------------------------*/
14 #include <stdlib.h>
15 #include "gw_string.h"
16 #include "stack-c.h"
17 #include "MALLOC.h"
18 #include "callFunctionFromGateway.h"
19 /*--------------------------------------------------------------------------*/
20 static gw_generic_table Tab[] =
21 {
22         {NULL, ""}, //length
23         {NULL, ""}, //part
24         {NULL,""}, //string
25         {sci_convstr,"convstr"},
26         {NULL, ""}, //emptystr
27         {sci_str2code,"str2code"},
28         {sci_code2str,"code2str"},
29         {NULL ,""}, //strcat
30         {NULL, ""}, //strindex
31         {NULL, ""}, //strsubst
32         {NULL, ""}, //ascii
33         {NULL, ""}, //grep
34         {sci_tokens,"tokens"},
35         {NULL, ""}, //strsplit
36         {NULL, ""}, //stripblank
37         {sci_strcmp,"strcmp"},
38         {sci_isletter,"isletter"},
39         {NULL, ""}, //isdigit
40         {NULL ,""}, //isalphanum
41         {NULL, ""}, //isascii
42         {sci_strcspn,"strcspn"},
43         {sci_strncpy,"strncpy"},
44         {sci_strchr,"strrchr"},
45         {sci_strchr,"strchr"},
46         {sci_strstr,"strstr"},
47         {sci_strrev,"strrev"},
48         {sci_strtok,"strtok"},
49         {sci_strspn,"strspn"},
50         {sci_strtod,"strtod"},
51         {NULL, ""} //regexp
52 };
53 /*--------------------------------------------------------------------------*/
54 int gw_string(void)
55 {
56         callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
57         return 0;
58 }
59 /*--------------------------------------------------------------------------*/
60