summaryrefslogtreecommitdiff
path: root/src/type
diff options
context:
space:
mode:
Diffstat (limited to 'src/type')
-rw-r--r--src/type/doubleComplex.c2
-rw-r--r--src/type/doubleComplex.h25
-rw-r--r--src/type/floatComplex.h25
3 files changed, 49 insertions, 3 deletions
diff --git a/src/type/doubleComplex.c b/src/type/doubleComplex.c
index a985acbf..717d2c4d 100644
--- a/src/type/doubleComplex.c
+++ b/src/type/doubleComplex.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Nov 30 16:27:08 2006 jofret
-** Last update Thu Dec 7 11:44:05 2006 jofret
+** Last update Wed Jan 31 16:11:51 2007 jofret
**
** Copyright INRIA 2006
*/
diff --git a/src/type/doubleComplex.h b/src/type/doubleComplex.h
index 7441da1f..3f73f169 100644
--- a/src/type/doubleComplex.h
+++ b/src/type/doubleComplex.h
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Nov 30 16:50:08 2006 jofret
-** Last update Thu Dec 7 11:44:08 2006 jofret
+** Last update Wed Jan 31 10:14:18 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -13,6 +13,11 @@
#ifndef __DOUBLECOMPLEX_H__
#define __DOUBLECOMPLEX_H__
+#ifndef STDC99
+/*
+** Hand made Double Complex definition
+** {
+*/
#include <stdbool.h>
struct double_complex
@@ -28,5 +33,23 @@ double imag(doubleComplex);
doubleComplex DoubleComplex(double, double);
bool isreal(doubleComplex);
bool isimag(doubleComplex);
+/*
+** }
+*/
+
+#else
+
+/*
+** Use standard C99 Double Complex definition
+** {
+*/
+#include <complex.h>
+
+typedef double complex doubleComplex;
+/*
+** }
+*/
+
+#endif /* !STDC99 */
#endif /* !__DOUBLECOMPLEX_H__ */
diff --git a/src/type/floatComplex.h b/src/type/floatComplex.h
index aa2aab04..abfcb602 100644
--- a/src/type/floatComplex.h
+++ b/src/type/floatComplex.h
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Nov 30 16:50:08 2006 jofret
-** Last update Thu Dec 7 11:44:08 2006 jofret
+** Last update Wed Jan 31 10:14:20 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -13,6 +13,11 @@
#ifndef __FLOATCOMPLEX_H__
#define __FLOATCOMPLEX_H__
+#ifndef STDC99
+/*
+** Hand made Float Complex definition
+** {
+*/
#include <stdbool.h>
struct float_complex
@@ -28,5 +33,23 @@ float imag(floatComplex);
floatComplex FloatComplex(float, float);
bool isreal(floatComplex);
bool isimag(floatComplex);
+/*
+** }
+*/
+
+#else
+
+/*
+** Use standard C99 Double Complex definition
+** {
+*/
+#include <complex.h>
+
+typedef double complex doubleComplex;
+/*
+** }
+*/
+
+#endif /* !STDC99 */
#endif /* !__FLOATCOMPLEX_H__ */