summaryrefslogtreecommitdiff
path: root/src/c/string/disp
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/string/disp')
-rw-r--r--src/c/string/disp/ddispa.c2
-rw-r--r--src/c/string/disp/i16dispa.c24
-rw-r--r--src/c/string/disp/i16disps.c19
-rw-r--r--src/c/string/disp/i8dispa.c24
-rw-r--r--src/c/string/disp/i8disps.c19
-rw-r--r--src/c/string/disp/u16dispa.c24
-rw-r--r--src/c/string/disp/u16disps.c19
-rw-r--r--src/c/string/disp/u8dispa.c24
-rw-r--r--src/c/string/disp/u8disps.c19
-rw-r--r--src/c/string/disp/zdispa.c2
-rw-r--r--src/c/string/disp/zdisps.c2
11 files changed, 175 insertions, 3 deletions
diff --git a/src/c/string/disp/ddispa.c b/src/c/string/disp/ddispa.c
index 5e6bb84e..29aaceeb 100644
--- a/src/c/string/disp/ddispa.c
+++ b/src/c/string/disp/ddispa.c
@@ -16,7 +16,7 @@ double ddispa (double* in, int rows, int columns){
int i = 0,j = 0;
for (i = 0; i < rows; ++i) {
- for (j=0;j<columns;j++) printf (" %1.20f ", in[i+j*rows]);
+ for (j=0;j<columns;j++) printf (" %e ", in[i+j*rows]);
printf("\n");
}
return 0;
diff --git a/src/c/string/disp/i16dispa.c b/src/c/string/disp/i16dispa.c
new file mode 100644
index 00000000..424d066d
--- /dev/null
+++ b/src/c/string/disp/i16dispa.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double i16dispa (int16* in, int rows, int columns){
+ int i = 0,j = 0;
+
+ for (i = 0; i < rows; ++i) {
+ for (j=0;j<columns;j++) printf (" %d ", in[i+j*rows]);
+ printf("\n");
+ }
+ return 0;
+}
diff --git a/src/c/string/disp/i16disps.c b/src/c/string/disp/i16disps.c
new file mode 100644
index 00000000..70edda77
--- /dev/null
+++ b/src/c/string/disp/i16disps.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double i16disps (int16 in) {
+ printf(" %d \n",in);
+ return 0;
+}
diff --git a/src/c/string/disp/i8dispa.c b/src/c/string/disp/i8dispa.c
new file mode 100644
index 00000000..9acd9674
--- /dev/null
+++ b/src/c/string/disp/i8dispa.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double i8dispa (int8* in, int rows, int columns){
+ int i = 0,j = 0;
+
+ for (i = 0; i < rows; ++i) {
+ for (j=0;j<columns;j++) printf (" %d ", in[i+j*rows]);
+ printf("\n");
+ }
+ return 0;
+}
diff --git a/src/c/string/disp/i8disps.c b/src/c/string/disp/i8disps.c
new file mode 100644
index 00000000..07cc6c4f
--- /dev/null
+++ b/src/c/string/disp/i8disps.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double i8disps (int8 in) {
+ printf(" %d \n",in);
+ return 0;
+}
diff --git a/src/c/string/disp/u16dispa.c b/src/c/string/disp/u16dispa.c
new file mode 100644
index 00000000..ad3685e2
--- /dev/null
+++ b/src/c/string/disp/u16dispa.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double u16dispa (uint16* in, int rows, int columns){
+ int i = 0,j = 0;
+
+ for (i = 0; i < rows; ++i) {
+ for (j=0;j<columns;j++) printf (" %u ", in[i+j*rows]);
+ printf("\n");
+ }
+ return 0;
+}
diff --git a/src/c/string/disp/u16disps.c b/src/c/string/disp/u16disps.c
new file mode 100644
index 00000000..383dcfc0
--- /dev/null
+++ b/src/c/string/disp/u16disps.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double u16disps (uint16 in) {
+ printf(" %u \n",in);
+ return 0;
+}
diff --git a/src/c/string/disp/u8dispa.c b/src/c/string/disp/u8dispa.c
new file mode 100644
index 00000000..f242b5c5
--- /dev/null
+++ b/src/c/string/disp/u8dispa.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double u8dispa (uint8* in, int rows, int columns){
+ int i = 0,j = 0;
+
+ for (i = 0; i < rows; ++i) {
+ for (j=0;j<columns;j++) printf (" %d ", in[i+j*rows]);
+ printf("\n");
+ }
+ return 0;
+}
diff --git a/src/c/string/disp/u8disps.c b/src/c/string/disp/u8disps.c
new file mode 100644
index 00000000..2d3e78fa
--- /dev/null
+++ b/src/c/string/disp/u8disps.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "disp.h"
+
+double u8disps (uint8 in) {
+ printf(" %d \n",in);
+ return 0;
+}
diff --git a/src/c/string/disp/zdispa.c b/src/c/string/disp/zdispa.c
index 5d085d32..94b24e98 100644
--- a/src/c/string/disp/zdispa.c
+++ b/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.20f + %1.20fi " ,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/src/c/string/disp/zdisps.c b/src/c/string/disp/zdisps.c
index c4ec137f..4a040cd7 100644
--- a/src/c/string/disp/zdisps.c
+++ b/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;
}