diff options
Diffstat (limited to 'src/c/string/includes')
-rw-r--r-- | src/c/string/includes/ascii.h | 27 | ||||
-rw-r--r-- | src/c/string/includes/convstr.h | 26 | ||||
-rw-r--r-- | src/c/string/includes/disp.h | 52 | ||||
-rw-r--r-- | src/c/string/includes/str.h | 58 | ||||
-rw-r--r-- | src/c/string/includes/strchr.h | 25 | ||||
-rw-r--r-- | src/c/string/includes/strcspn.h | 26 | ||||
-rw-r--r-- | src/c/string/includes/strncpy.h | 25 | ||||
-rw-r--r-- | src/c/string/includes/strrchr.h | 26 | ||||
-rw-r--r-- | src/c/string/includes/strrev.h | 27 | ||||
-rw-r--r-- | src/c/string/includes/strspn.h | 26 | ||||
-rw-r--r-- | src/c/string/includes/strsubst.h | 27 |
11 files changed, 344 insertions, 1 deletions
diff --git a/src/c/string/includes/ascii.h b/src/c/string/includes/ascii.h new file mode 100644 index 00000000..39aeb835 --- /dev/null +++ b/src/c/string/includes/ascii.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Ankit Raj + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __ASCII_H__ +#define __ASCII_H__ +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void gasciia(char* str,int size,uint8* oup); +void dasciia(double* inp,int size,char* oup); + +#ifdef __cplusplus +}/* extern "C" */ +#endif + +#endif /*___ASCII_H__*/ diff --git a/src/c/string/includes/convstr.h b/src/c/string/includes/convstr.h new file mode 100644 index 00000000..0737c546 --- /dev/null +++ b/src/c/string/includes/convstr.h @@ -0,0 +1,26 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __CONVSTR_H__ +#define __CONVSTR_H__ + + + #ifdef __cplusplus + extern "C" { + #endif + +void gconvstrs(char* in, int size,char* flag,int size2,char* out); + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__CONVSTR_H__*/ diff --git a/src/c/string/includes/disp.h b/src/c/string/includes/disp.h index 96ccb248..7b463906 100644 --- a/src/c/string/includes/disp.h +++ b/src/c/string/includes/disp.h @@ -19,6 +19,7 @@ #include "dynlib_string.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "types.h" #ifdef __cplusplus extern "C" { @@ -44,6 +45,27 @@ EXTERN_STRING double cdisps (floatComplex in); EXTERN_STRING double zdisps (doubleComplex in); /* +** \brief display of a uint8 scalar +*/ +EXTERN_STRING double u8disps (uint8 in); + +/* +** \brief display of a int8 scalar +*/ +EXTERN_STRING double i8disps (int8 in); + +/* +** \brief display of a uint16 scalar +*/ +EXTERN_STRING double u16disps (uint16 in); + +/* +** \brief display of a int16 scalar +*/ +EXTERN_STRING double i16disps (int16 in); + + +/* ** \brief display of a float scalar array ** \param in the float scalar array to display ** \param size the size of the array @@ -71,11 +93,39 @@ EXTERN_STRING double cdispa (floatComplex* in, int rows, int columns); */ EXTERN_STRING double zdispa (doubleComplex* in, int rows, int columns); - +/* +** \brief display of a uint8 scalar array +** \param in the uint8 scalar array to display +** \param size the size of the array +*/ +EXTERN_STRING double u8dispa (uint8* in, int rows, int columns); + +/* +** \brief display of a int8 scalar array +** \param in the int8 scalar array to display +** \param size the size of the array +*/ +EXTERN_STRING double i8dispa (int8* in, int rows, int columns); + +/* +** \brief display of a uint16 scalar array +** \param in the uint16 scalar array to display +** \param size the size of the array +*/ +EXTERN_STRING double u16dispa (uint16* in, int rows, int columns); + +/* +** \brief display of a int16 scalar array +** \param in the int16 scalar array to display +** \param size the size of the array +*/ +EXTERN_STRING double i16dispa (int16* in, int rows, int columns); + EXTERN_STRING double ddisph (double *in, int rows, int cols, int levels); EXTERN_STRING double g2dispd0(char *array,int* tmparraysize); + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/c/string/includes/str.h b/src/c/string/includes/str.h index 434c68e0..79307b5f 100644 --- a/src/c/string/includes/str.h +++ b/src/c/string/includes/str.h @@ -19,6 +19,7 @@ #include "dynlib_string.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "types.h" #ifdef __cplusplus extern "C" { @@ -54,6 +55,35 @@ EXTERN_STRING void zstrings (doubleComplex in, char* out); /* +** \brief convert of a uint8 scalar into a char array +** \param in the uint8 scalar to convert +** \param out the output char array +*/ +EXTERN_STRING void u8strings (uint8 in, char* out); + +/* +** \brief convert of a int8 scalar into a char array +** \param in the int8 scalar to convert +** \param out the output char array +*/ +EXTERN_STRING void i8strings (int8 in, char* out); + +/* +** \brief convert of a uint16 scalar into a char array +** \param in the uint16 scalar to convert +** \param out the output char array +*/ +EXTERN_STRING void u16strings (uint16 in, char* out); + +/* +** \brief convert of a int16 scalar into a char array +** \param in the int16 scalar to convert +** \param out the output char array +*/ +EXTERN_STRING void i16strings (int16 in, char* out); + + +/* ** \brief convert of a float scalar array into an array of char arrays ** \param in the float scalar array to convert ** \param out the output array of char arrays @@ -81,6 +111,34 @@ EXTERN_STRING void cstringa (floatComplex* in, int size, char** out ); */ EXTERN_STRING void zstringa (doubleComplex* in, int size, char** out); +/* +** \brief convert of a uint8 scalar array into an array of char arrays +** \param in the uint8 scalar array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void u8stringa (uint8* in, int size, char** out); + +/* +** \brief convert of a int8 scalar array into an array of char arrays +** \param in the int8 scalar array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void i8stringa (int8* in, int size, char** out); + +/* +** \brief convert of a uint16 scalar array into an array of char arrays +** \param in the uint16 scalar array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void u16stringa (uint16* in, int size, char** out); + +/* +** \brief convert of a int16 scalar array into an array of char arrays +** \param in the int16 scalar array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void i16stringa (int16* in, int size, char** out); + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/c/string/includes/strchr.h b/src/c/string/includes/strchr.h new file mode 100644 index 00000000..7e306413 --- /dev/null +++ b/src/c/string/includes/strchr.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Ankit Raj + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __STRCHR_H__ +#define __STRCHR_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +void gstrchra(char* str,int size, char* key,int size2, char* out); + +#ifdef __cplusplus +}/* extern "C" */ +#endif + +#endif /*__STRCHR_H__*/ diff --git a/src/c/string/includes/strcspn.h b/src/c/string/includes/strcspn.h new file mode 100644 index 00000000..aa91fb47 --- /dev/null +++ b/src/c/string/includes/strcspn.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Ankit Raj + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __STRCSPN_H__ +#define __STRCSPN_H__ +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint8 gstrcspna(char* str1,int size1,char* str2,int size2); + +#ifdef __cplusplus +}/* extern "C" */ +#endif + +#endif /* __STRCSPN_H */ diff --git a/src/c/string/includes/strncpy.h b/src/c/string/includes/strncpy.h new file mode 100644 index 00000000..f2aa705b --- /dev/null +++ b/src/c/string/includes/strncpy.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Ankit Raj + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __STRNCPY_H__ +#define __STRNCPY_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +void gstrncpya(char* str,int size,double key,char* oup); + +#ifdef __cplusplus +}/* extern "C" */ +#endif + +#endif /*__STRNCPY_H__*/ diff --git a/src/c/string/includes/strrchr.h b/src/c/string/includes/strrchr.h new file mode 100644 index 00000000..d06460be --- /dev/null +++ b/src/c/string/includes/strrchr.h @@ -0,0 +1,26 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __STRRCHR_H__ +#define __STRRCHR_H__ + + + #ifdef __cplusplus + extern "C" { + #endif + +void gstrrchr(char* str,int size,char* key,int size2,char* out); + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__STRRCHR_H__*/ diff --git a/src/c/string/includes/strrev.h b/src/c/string/includes/strrev.h new file mode 100644 index 00000000..c7e79570 --- /dev/null +++ b/src/c/string/includes/strrev.h @@ -0,0 +1,27 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __STRREV_H__ +#define __STRREV_H__ + + + #ifdef __cplusplus + extern "C" { + #endif + +void gstrreva(char* str,int size,char* out); +//void gstrrevs(char* in, int size,char* search, int size2, char* rep, int size3, ,char* out); + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__STRREV_H__*/ diff --git a/src/c/string/includes/strspn.h b/src/c/string/includes/strspn.h new file mode 100644 index 00000000..427caa4c --- /dev/null +++ b/src/c/string/includes/strspn.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Ankit Raj + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __STRSPN_H__ +#define __STRSPN_H__ +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint8 gstrspna(char* str1,int size1,char* str2,int size2); + +#ifdef __cplusplus +}/* extern "C" */ +#endif + +#endif /* __STRSPN_H */ diff --git a/src/c/string/includes/strsubst.h b/src/c/string/includes/strsubst.h new file mode 100644 index 00000000..e9eba429 --- /dev/null +++ b/src/c/string/includes/strsubst.h @@ -0,0 +1,27 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __STRSUBST_H__ +#define __STRSUBST_H__ + + + #ifdef __cplusplus + extern "C" { + #endif + +void gstrsubsta(char* str, int size, char* search, int size2, char* rep, int size3, char* flagmain,int size4, char* out); +//void gstrsubsta(char* str, int size, char* search, int size2, char* rep, int size3, char* out,int size5); + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__STRSUBST_H__*/ |