diff options
author | siddhu8990 | 2017-04-19 14:57:49 +0530 |
---|---|---|
committer | siddhu8990 | 2017-04-19 14:57:49 +0530 |
commit | 1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f (patch) | |
tree | 34e52b33707a829c1d8484428c96d3f1f6ce2b3a /src/c/string/interfaces | |
parent | 9e506f48291533cba7b4c555b0d2e98f234bfbe3 (diff) | |
download | scilab2c-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.tar.gz scilab2c-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.tar.bz2 scilab2c-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.zip |
Merged Shamik's work
Diffstat (limited to 'src/c/string/interfaces')
-rw-r--r-- | src/c/string/interfaces/int_convstr.h | 6 | ||||
-rw-r--r-- | src/c/string/interfaces/int_strrchr.h | 25 | ||||
-rw-r--r-- | src/c/string/interfaces/int_strrev.h | 25 | ||||
-rw-r--r-- | src/c/string/interfaces/int_strsubst.h | 28 |
4 files changed, 82 insertions, 2 deletions
diff --git a/src/c/string/interfaces/int_convstr.h b/src/c/string/interfaces/int_convstr.h index f565b858..fee3d373 100644 --- a/src/c/string/interfaces/int_convstr.h +++ b/src/c/string/interfaces/int_convstr.h @@ -5,7 +5,7 @@ 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: Siddhesh Wani + Author: Shamik Guha Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ @@ -16,7 +16,9 @@ extern "C" { #endif -#define g0constrg0(in, size) gconstrs(in) +#define g2g2convstrg2(in,size,flag,size2,out) gconvstrs(in,size[0]*size[1],flag,size2[1],out) +//#define g2g2convstrg0(in,size,type,typesize,out) (type=='u': \ + gconvstrs(in,size[0]*size[1],0,out)?gconvstrs(in,size[0]*size[1],1,out)) #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/string/interfaces/int_strrchr.h b/src/c/string/interfaces/int_strrchr.h new file mode 100644 index 00000000..7ec94ebe --- /dev/null +++ b/src/c/string/interfaces/int_strrchr.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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_STRRCHR_H__ +#define __INT_STRRCHR_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define g2g2strrchrg2(str,size,key,size2,out) gstrrchra(str,size[1],key,size2[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_STRRCHR_H__*/ diff --git a/src/c/string/interfaces/int_strrev.h b/src/c/string/interfaces/int_strrev.h new file mode 100644 index 00000000..8429f6a1 --- /dev/null +++ b/src/c/string/interfaces/int_strrev.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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_STRREV_H__ +#define __INT_STRREV_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define g2strrevg2(str,size,out) gstrreva(str,size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_STRREV_H__*/ diff --git a/src/c/string/interfaces/int_strsubst.h b/src/c/string/interfaces/int_strsubst.h new file mode 100644 index 00000000..c8dd67a1 --- /dev/null +++ b/src/c/string/interfaces/int_strsubst.h @@ -0,0 +1,28 @@ + /* 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 __INT_STRSUBST_H__ +#define __INT_STRSUBST_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define g2g2g2g2strsubstg2(str,size,search,size2,rep,size3,flagmain,size4,out) gstrsubsta(str,size[1],search,size2[1],rep,size3[1],flagmain,size4[1],out) +#define g2g2g2strsubstg2(in,size,search,size2,rep,size3,out) gstrsubsta(in,size[1],search,size2[1],rep,size3[1],'s',size3[1],out) + + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_STRSUBST_H__*/ |