summaryrefslogtreecommitdiff
path: root/testsuites/libtests/dl02/dl-o2.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/libtests/dl02/dl-o2.c')
-rw-r--r--testsuites/libtests/dl02/dl-o2.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/testsuites/libtests/dl02/dl-o2.c b/testsuites/libtests/dl02/dl-o2.c
index 4c1a918dea..507333535b 100644
--- a/testsuites/libtests/dl02/dl-o2.c
+++ b/testsuites/libtests/dl02/dl-o2.c
@@ -10,7 +10,7 @@
#include <rtems/test.h>
-#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
+#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__)
int dl_o2_func1 (int argc, char* argv[])
{
@@ -21,13 +21,17 @@ int dl_o2_func1 (int argc, char* argv[])
return argc;
}
+#define PDOUBLE(_d) ((int) (_d)), (int) (((_d) + 0.005) * 100.0) % 100
+
double dl_o2_func2 (double d1, double d2)
{
- return d1 * d2;
+ double ret = d1 * d2;
+ printf("dl_o2_func2: d1=%d.%02d d2=%d.%d ret=%d.%02d\n",
+ PDOUBLE(d1), PDOUBLE(d2), PDOUBLE(ret));
+ return ret;
}
int dl_o2_func3 (dl_o2_call_t callback, int count)
{
return callback ("string in dl_o2", count + 1);
}
-