summaryrefslogtreecommitdiff
path: root/src/auxiliaryFunctions
diff options
context:
space:
mode:
authortorset2009-01-09 13:25:43 +0000
committertorset2009-01-09 13:25:43 +0000
commitadef6792e37be888c1716de1aca6ae811244ebab (patch)
treeeceeffd68a2013d2d6c4bc13f278d030ca87d488 /src/auxiliaryFunctions
parent06f8b047f5bb344f3239fd90d634e583af1e3edc (diff)
downloadscilab2c-adef6792e37be888c1716de1aca6ae811244ebab.tar.gz
scilab2c-adef6792e37be888c1716de1aca6ae811244ebab.tar.bz2
scilab2c-adef6792e37be888c1716de1aca6ae811244ebab.zip
Change in isempty because of the change of find
Diffstat (limited to 'src/auxiliaryFunctions')
-rw-r--r--src/auxiliaryFunctions/includes/isempty.h16
-rw-r--r--src/auxiliaryFunctions/isempty/cisemptya.c6
-rw-r--r--src/auxiliaryFunctions/isempty/disemptya.c6
-rw-r--r--src/auxiliaryFunctions/isempty/sisemptya.c6
-rw-r--r--src/auxiliaryFunctions/isempty/testIsEmpty.c32
-rw-r--r--src/auxiliaryFunctions/isempty/zisemptya.c6
6 files changed, 36 insertions, 36 deletions
diff --git a/src/auxiliaryFunctions/includes/isempty.h b/src/auxiliaryFunctions/includes/isempty.h
index 047c69d9..80285647 100644
--- a/src/auxiliaryFunctions/includes/isempty.h
+++ b/src/auxiliaryFunctions/includes/isempty.h
@@ -23,41 +23,41 @@
/*
** \brief Float Is Empty function
*/
-#define sisemptys(in) false
+#define sisemptys(in) 0.0f /*= false*/
/*
** \brief Double Is Empty function
*/
-#define disemptys(in) false
+#define disemptys(in) 0/*= false*/
/*
** \brief Float Complex Is Empty function
*/
-#define cisemptys(in) false
+#define cisemptys(in) 0.0f/*= false*/
/*
** \brief Double Complex Is Empty function
*/
-#define zisemptys(in) false
+#define zisemptys(in) 0/*= false*/
/*
** \brief Float Is Empty function
*/
-bool sisemptya(float* x, int size);
+float sisemptya(float* x, int size);
/*
** \brief Double Is Empty function
*/
-bool disemptya(double*x, int size);
+double disemptya(double*x, int size);
/*
** \brief Float Complex Is Empty function
*/
-bool cisemptya(floatComplex* z, int size);
+float cisemptya(floatComplex* z, int size);
/*
** \brief Double Complex Is Empty function
*/
-bool zisemptya(doubleComplex* z, int size);
+double zisemptya(doubleComplex* z, int size);
#endif /* !__IS_EMPTY_H__ */
diff --git a/src/auxiliaryFunctions/isempty/cisemptya.c b/src/auxiliaryFunctions/isempty/cisemptya.c
index 483c9a4b..1a19e8af 100644
--- a/src/auxiliaryFunctions/isempty/cisemptya.c
+++ b/src/auxiliaryFunctions/isempty/cisemptya.c
@@ -12,9 +12,9 @@
#include "isempty.h"
-bool cisemptya(floatComplex* x, int size) {
+float cisemptya(floatComplex* x, int size) {
if (cfinda(x, size) == NULL) {
- return true;
+ return 1;
}
- return false;
+ return 0;
}
diff --git a/src/auxiliaryFunctions/isempty/disemptya.c b/src/auxiliaryFunctions/isempty/disemptya.c
index c4e76f9a..ce5e3f36 100644
--- a/src/auxiliaryFunctions/isempty/disemptya.c
+++ b/src/auxiliaryFunctions/isempty/disemptya.c
@@ -12,9 +12,9 @@
#include "isempty.h"
-bool disemptya(double* x, int size) {
+double disemptya(double* x, int size) {
if (dfinda(x, size) == NULL) {
- return true;
+ return 1;
}
- return false;
+ return 0;
}
diff --git a/src/auxiliaryFunctions/isempty/sisemptya.c b/src/auxiliaryFunctions/isempty/sisemptya.c
index 3901d68a..49ce5e20 100644
--- a/src/auxiliaryFunctions/isempty/sisemptya.c
+++ b/src/auxiliaryFunctions/isempty/sisemptya.c
@@ -12,9 +12,9 @@
#include "isempty.h"
-bool sisemptya(float* x, int size) {
+float sisemptya(float* x, int size) {
if (sfinda(x, size) == NULL) {
- return true;
+ return 1;
}
- return false;
+ return 0;
}
diff --git a/src/auxiliaryFunctions/isempty/testIsEmpty.c b/src/auxiliaryFunctions/isempty/testIsEmpty.c
index 9dbc41a5..01dd4a59 100644
--- a/src/auxiliaryFunctions/isempty/testIsEmpty.c
+++ b/src/auxiliaryFunctions/isempty/testIsEmpty.c
@@ -18,17 +18,17 @@ int sisemptyaTest() {
float full[5] = {1., 2., 3., 0., 0.};
printf(">> Float array\n");
- if (sisemptya(empty, 5) == false) {
+ if (sisemptya(empty, 5) == 0) {
printf("ERROR ! : Test Failed (empty array)\n");
result = ERROR;
}
- assert (sisemptya(empty, 5) == true);
+ assert (sisemptya(empty, 5) == 1);
- if (sisemptya(full, 5) == true) {
+ if (sisemptya(full, 5) == 1) {
printf("ERROR ! : Test Failed (non empty array)\n");
result = ERROR;
}
- assert(sisemptya(full, 5) == false);
+ assert(sisemptya(full, 5) == 0);
return result;
}
@@ -39,17 +39,17 @@ int disemptyaTest() {
double full[5] = {1., 2., 3., 0., 0.};
printf(">> Double array\n");
- if (disemptya(empty, 5) == false) {
+ if (disemptya(empty, 5) == 0) {
printf("ERROR ! : Test Failed (empty array)\n");
result = ERROR;
}
- assert(disemptya(empty, 5) == true);
+ assert(disemptya(empty, 5) == 1);
- if (disemptya(full, 5) == true) {
+ if (disemptya(full, 5) == 1) {
printf("ERROR ! : Test Failed (non empty array)\n");
result = ERROR;
}
- assert(disemptya(full, 5) == false);
+ assert(disemptya(full, 5) == 0);
return result;
}
@@ -71,17 +71,17 @@ int cisemptyaTest() {
full[4] = FloatComplex(0., 0.);
printf(">> Float Complex array\n");
- if (cisemptya(empty, 5) == false) {
+ if (cisemptya(empty, 5) == 0) {
printf("ERROR ! : Test Failed (empty array)\n");
result = ERROR;
}
- assert (cisemptya(empty, 5) == true);
+ assert (cisemptya(empty, 5) == 1);
- if (cisemptya(full, 5) == true) {
+ if (cisemptya(full, 5) == 1) {
printf("ERROR ! : Test Failed (non empty array)\n");
result = ERROR;
}
- assert(cisemptya(full, 5) == false);
+ assert(cisemptya(full, 5) == 0);
return result;
@@ -105,17 +105,17 @@ int zisemptyaTest() {
full[4] = DoubleComplex(0., 0.);;
printf(">> Double Complex array\n");
- if (zisemptya(empty, 5) == false) {
+ if (zisemptya(empty, 5) == 0) {
printf("ERROR ! : Test Failed (empty array)\n");
result = ERROR;
}
- assert (zisemptya(empty, 5) == true);
+ assert (zisemptya(empty, 5) == 1);
- if (zisemptya(full, 5) == true) {
+ if (zisemptya(full, 5) == 1) {
printf("ERROR ! : Test Failed (non empty array)\n");
result = ERROR;
}
- assert(zisemptya(full, 5) == false);
+ assert(zisemptya(full, 5) == 0);
return result;
diff --git a/src/auxiliaryFunctions/isempty/zisemptya.c b/src/auxiliaryFunctions/isempty/zisemptya.c
index d0b0358b..ea8e078c 100644
--- a/src/auxiliaryFunctions/isempty/zisemptya.c
+++ b/src/auxiliaryFunctions/isempty/zisemptya.c
@@ -12,9 +12,9 @@
#include "isempty.h"
-bool zisemptya(doubleComplex* x, int size) {
+double zisemptya(doubleComplex* x, int size) {
if (zfinda(x, size) == NULL) {
- return true;
+ return 1;
}
- return false;
+ return 0;
}