summaryrefslogtreecommitdiff
path: root/src/c/string
diff options
context:
space:
mode:
authorBrijeshcr2017-07-07 19:57:00 +0530
committerBrijeshcr2017-07-07 19:57:00 +0530
commiteb4fd4f84b56a9b8f1976a67461f2c918edede32 (patch)
treead6032b0992e679f9d69e98074141267888f5c03 /src/c/string
parentaa250753b439916e4df235839e9266f058632f80 (diff)
parent936bd00d2855553f52d682494814804065c7b99e (diff)
downloadScilab2C_fossee_old-eb4fd4f84b56a9b8f1976a67461f2c918edede32.tar.gz
Scilab2C_fossee_old-eb4fd4f84b56a9b8f1976a67461f2c918edede32.tar.bz2
Scilab2C_fossee_old-eb4fd4f84b56a9b8f1976a67461f2c918edede32.zip
Signal Processing and Demos Updated
Diffstat (limited to 'src/c/string')
-rw-r--r--src/c/string/ascii/gasciia.c4
-rw-r--r--src/c/string/includes/ascii.h2
-rw-r--r--src/c/string/strcspn/gstrcspna.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/c/string/ascii/gasciia.c b/src/c/string/ascii/gasciia.c
index ec11d6e..5fe95e0 100644
--- a/src/c/string/ascii/gasciia.c
+++ b/src/c/string/ascii/gasciia.c
@@ -14,12 +14,12 @@
into its ascii equivalent.
*/
#include "ascii.h"
-void gasciia(char *str,int size,int* oup)
+void gasciia(char *str,int size,uint8* oup)
{
int i;
for(i=0;i<size;i++)
{
- *(oup+i)=(int)str[i];
+ *(oup+i)=str[i];
}
}
diff --git a/src/c/string/includes/ascii.h b/src/c/string/includes/ascii.h
index fcf969d..39aeb83 100644
--- a/src/c/string/includes/ascii.h
+++ b/src/c/string/includes/ascii.h
@@ -17,7 +17,7 @@
extern "C" {
#endif
-void gasciia(char* str,int size,int* oup);
+void gasciia(char* str,int size,uint8* oup);
void dasciia(double* inp,int size,char* oup);
#ifdef __cplusplus
diff --git a/src/c/string/strcspn/gstrcspna.c b/src/c/string/strcspn/gstrcspna.c
index b611fff..2c83c72 100644
--- a/src/c/string/strcspn/gstrcspna.c
+++ b/src/c/string/strcspn/gstrcspna.c
@@ -16,11 +16,11 @@ uint8 gstrcspna(char *str1,int size1,char *str2,int size2)
{
int ind,i,j;
- for(i=0;i<=size1;i++)
+ for(i=0;i<=size2;i++)
{
- for(j=0;j<=size2;j++)
+ for(j=0;j<=size1;j++)
{
- if(str2[j]==str1[i])
+ if(str2[i]==str1[j])
{
ind=j;
break;