summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/string
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-07-10 22:08:27 +0530
committerAbhinav Dronamraju2017-07-10 22:08:27 +0530
commitf80b5800ddb8417530f68049f6895beccb89cadf (patch)
tree564a23878bc400ecc0873bb4b1f5b172af22cfc6 /2.3-1/src/c/string
parentc1874d367d68cb47b82cc7a1173caaf38e9e3d68 (diff)
parent2e9eadc75e51483c41a30544496b4e05c0cf7c41 (diff)
downloadScilab2C-f80b5800ddb8417530f68049f6895beccb89cadf.tar.gz
Scilab2C-f80b5800ddb8417530f68049f6895beccb89cadf.tar.bz2
Scilab2C-f80b5800ddb8417530f68049f6895beccb89cadf.zip
Pulled from upstream master
Diffstat (limited to '2.3-1/src/c/string')
-rw-r--r--2.3-1/src/c/string/ascii/gasciia.c4
-rw-r--r--2.3-1/src/c/string/disp/zdispa.c2
-rw-r--r--2.3-1/src/c/string/disp/zdisps.c2
-rw-r--r--2.3-1/src/c/string/includes/ascii.h2
-rw-r--r--2.3-1/src/c/string/strcspn/gstrcspna.c6
5 files changed, 8 insertions, 8 deletions
diff --git a/2.3-1/src/c/string/ascii/gasciia.c b/2.3-1/src/c/string/ascii/gasciia.c
index ec11d6e2..5fe95e07 100644
--- a/2.3-1/src/c/string/ascii/gasciia.c
+++ b/2.3-1/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/2.3-1/src/c/string/disp/zdispa.c b/2.3-1/src/c/string/disp/zdispa.c
index bc71de4b..94b24e98 100644
--- a/2.3-1/src/c/string/disp/zdispa.c
+++ b/2.3-1/src/c/string/disp/zdispa.c
@@ -16,7 +16,7 @@ double zdispa (doubleComplex* in, int rows, int columns){
int i = 0,j = 0;
for (i = 0; i < rows; ++i) {
- for (j=0;j<columns;j++) printf(" %1.20lf + %1.20lfi " ,zreals(in[i+j*rows]) ,zimags(in[i+j*rows]));
+ for (j=0;j<columns;j++) printf(" %e + %ei " ,zreals(in[i+j*rows]) ,zimags(in[i+j*rows]));
printf("\n");
}
return 0;
diff --git a/2.3-1/src/c/string/disp/zdisps.c b/2.3-1/src/c/string/disp/zdisps.c
index c4ec137f..4a040cd7 100644
--- a/2.3-1/src/c/string/disp/zdisps.c
+++ b/2.3-1/src/c/string/disp/zdisps.c
@@ -14,6 +14,6 @@
double zdisps (doubleComplex in) {
- printf(" %1.20f + %1.20fi \n" ,zreals(in) ,zimags(in));
+ printf(" %e + %ei \n" ,zreals(in) ,zimags(in));
return 0;
}
diff --git a/2.3-1/src/c/string/includes/ascii.h b/2.3-1/src/c/string/includes/ascii.h
index fcf969da..39aeb835 100644
--- a/2.3-1/src/c/string/includes/ascii.h
+++ b/2.3-1/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/2.3-1/src/c/string/strcspn/gstrcspna.c b/2.3-1/src/c/string/strcspn/gstrcspna.c
index b611fff8..2c83c724 100644
--- a/2.3-1/src/c/string/strcspn/gstrcspna.c
+++ b/2.3-1/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;