summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortorset2009-01-16 16:23:33 +0000
committertorset2009-01-16 16:23:33 +0000
commit2150f2ad6e47bf68a886aa45eb916bbd9f14d9bf (patch)
tree966119aa2e5b499e81ebfc5912547ea1860c1304
parent25211248348e0488a0e830bfafc3f3bd9061224a (diff)
downloadscilab2c-2150f2ad6e47bf68a886aa45eb916bbd9f14d9bf.tar.gz
scilab2c-2150f2ad6e47bf68a886aa45eb916bbd9f14d9bf.tar.bz2
scilab2c-2150f2ad6e47bf68a886aa45eb916bbd9f14d9bf.zip
Update with Scilab2C modifs (maybe some errors)
-rw-r--r--src/string/disp/cdispa.c5
-rw-r--r--src/string/disp/cdisps.c5
-rw-r--r--src/string/disp/ddispa.c5
-rw-r--r--src/string/disp/ddisps.c5
-rw-r--r--src/string/disp/sdispa.c5
-rw-r--r--src/string/disp/sdisps.c5
-rw-r--r--src/string/disp/zdispa.c5
-rw-r--r--src/string/disp/zdisps.c5
-rw-r--r--src/string/includes/disp.h16
9 files changed, 32 insertions, 24 deletions
diff --git a/src/string/disp/cdispa.c b/src/string/disp/cdispa.c
index d17d153e..5aa62c61 100644
--- a/src/string/disp/cdispa.c
+++ b/src/string/disp/cdispa.c
@@ -12,10 +12,11 @@
#include "disp.h"
-void cdispa (floatComplex* (in), int size) {
+double cdispa (floatComplex* (in), int size) {
int i = 0;
for (i = 0; i < size; ++i) {
cdisps (in[i]);
}
-
+ printf("\n");
+ return 0;
}
diff --git a/src/string/disp/cdisps.c b/src/string/disp/cdisps.c
index c7d5f14d..ee676e51 100644
--- a/src/string/disp/cdisps.c
+++ b/src/string/disp/cdisps.c
@@ -12,11 +12,12 @@
#include "disp.h"
-void cdisps (floatComplex in){
+double cdisps (floatComplex in){
float RealIn = creals(in);
float ImgIn = cimags(in);
- printf("%f + %fi" ,RealIn ,ImgIn);
+ printf(" %f + %fi " ,RealIn ,ImgIn);
+ return 0;
}
diff --git a/src/string/disp/ddispa.c b/src/string/disp/ddispa.c
index 7840397c..5ffa5643 100644
--- a/src/string/disp/ddispa.c
+++ b/src/string/disp/ddispa.c
@@ -12,10 +12,11 @@
#include "disp.h"
-void ddispa (double* in, int size) {
+double ddispa (double* in, int size) {
int i = 0;
for (i = 0; i < size; ++i) {
ddisps (in[i]);
}
-
+ printf("\n");
+ return 0;
}
diff --git a/src/string/disp/ddisps.c b/src/string/disp/ddisps.c
index d2a60bf0..315d6114 100644
--- a/src/string/disp/ddisps.c
+++ b/src/string/disp/ddisps.c
@@ -12,6 +12,7 @@
#include "disp.h"
-void ddisps (double in) {
- printf ("%f", in);
+double ddisps (double in) {
+ printf (" %f ", in);
+ return 0;
}
diff --git a/src/string/disp/sdispa.c b/src/string/disp/sdispa.c
index 3183a69f..42ff8c03 100644
--- a/src/string/disp/sdispa.c
+++ b/src/string/disp/sdispa.c
@@ -12,10 +12,11 @@
#include "disp.h"
-void sdispa (float* in, int size){
+double sdispa (float* in, int size){
int i = 0;
for (i = 0; i < size; ++i) {
sdisps (in[i]);
}
-
+ printf("\n");
+ return 0;
}
diff --git a/src/string/disp/sdisps.c b/src/string/disp/sdisps.c
index 876cb2c7..e8d50c71 100644
--- a/src/string/disp/sdisps.c
+++ b/src/string/disp/sdisps.c
@@ -12,6 +12,7 @@
#include "disp.h"
-void sdisps (float in) {
- printf ("%f", in);
+double sdisps (float in) {
+ printf(" %s ",in);
+ return 0;
}
diff --git a/src/string/disp/zdispa.c b/src/string/disp/zdispa.c
index cf9659ff..3a6085a4 100644
--- a/src/string/disp/zdispa.c
+++ b/src/string/disp/zdispa.c
@@ -12,10 +12,11 @@
#include "disp.h"
-void zdispa (doubleComplex* in, int size) {
+double zdispa (doubleComplex* in, int size) {
int i = 0;
for (i = 0; i < size; ++i) {
zdisps (in[i]);
}
-
+ printf("\n");
+ return 0;
}
diff --git a/src/string/disp/zdisps.c b/src/string/disp/zdisps.c
index 894ecf15..d7efaf83 100644
--- a/src/string/disp/zdisps.c
+++ b/src/string/disp/zdisps.c
@@ -12,9 +12,10 @@
#include "disp.h"
-void zdisps (doubleComplex in) {
+double zdisps (doubleComplex in) {
double RealIn = zreals(in);
double ImgIn = zimags(in);
- printf("%f + %fi" ,RealIn ,ImgIn);
+ printf(" %f + %fi " ,RealIn ,ImgIn);
+ return 0;
}
diff --git a/src/string/includes/disp.h b/src/string/includes/disp.h
index 72fa9cb6..6506bb0c 100644
--- a/src/string/includes/disp.h
+++ b/src/string/includes/disp.h
@@ -22,49 +22,49 @@
/*
** \brief display of a float scalar
*/
-void sdisps (float in);
+double sdisps (float in);
/*
** \brief display of a double scalar
*/
-void ddisps (double in);
+double ddisps (double in);
/*
** \brief display of a float complex
*/
-void cdisps (floatComplex in);
+double cdisps (floatComplex in);
/*
** \brief display of a double complex
*/
-void zdisps (doubleComplex in);
+double zdisps (doubleComplex in);
/*
** \brief display of a float scalar array
** \param in the float scalar array to display
** \param size the size of the array
*/
-void sdispa (float* in, int size);
+double sdispa (float* in, int size);
/*
** \brief display of a double scalar array
** \param in the double scalar array to display
** \param size the size of the array
*/
-void ddispa (double* in, int size);
+double ddispa (double* in, int size);
/*
** \brief display of a float complex array
** \param in the float complex array to display
** \param size the size of the array
*/
-void cdispa (floatComplex* in, int size);
+double cdispa (floatComplex* in, int size);
/*
** \brief display of a double complex array
** \param in the double complex array to display
** \param size the size of the array
*/
-void zdispa (doubleComplex* in, int size);
+double zdispa (doubleComplex* in, int size);
#endif /* !__DISP_H__ */