summaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-14 01:58:21 -0500
committermidipix <writeonce@midipix.org>2015-12-14 01:58:21 -0500
commitf4603994a39431c8cee036216a6d15ab7281b0c6 (patch)
tree8fc779f0c3ec5e8f0041c89b1700ffd2120f6b42 /src/output
parent668af644e512cc911a32a955078866d9151bae80 (diff)
downloadsofort-f4603994a39431c8cee036216a6d15ab7281b0c6.tar.bz2
sofort-f4603994a39431c8cee036216a6d15ab7281b0c6.tar.xz
initial commit.
Diffstat (limited to 'src/output')
-rw-r--r--src/output/sfrt_output_address.c13
-rw-r--r--src/output/sfrt_output_dummy.c13
-rw-r--r--src/output/sfrt_output_name.c13
3 files changed, 39 insertions, 0 deletions
diff --git a/src/output/sfrt_output_address.c b/src/output/sfrt_output_address.c
new file mode 100644
index 0000000..d447818
--- /dev/null
+++ b/src/output/sfrt_output_address.c
@@ -0,0 +1,13 @@
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <sofort/sofort.h>
+
+sfrt_api
+int sfrt_output_address(const struct sfrt_unit_ctx * uctx, FILE * f)
+{
+ return fprintf(f,"%0*p\n",2*sizeof(size_t),uctx->map->addr);
+}
diff --git a/src/output/sfrt_output_dummy.c b/src/output/sfrt_output_dummy.c
new file mode 100644
index 0000000..4342737
--- /dev/null
+++ b/src/output/sfrt_output_dummy.c
@@ -0,0 +1,13 @@
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <sofort/sofort.h>
+
+sfrt_api
+int sfrt_output_dummy (const struct sfrt_common_ctx * cctx, FILE * f)
+{
+ return fprintf(f,"%s\n",cctx->anystring ? cctx->anystring : "(null)");
+}
diff --git a/src/output/sfrt_output_name.c b/src/output/sfrt_output_name.c
new file mode 100644
index 0000000..c0aff5e
--- /dev/null
+++ b/src/output/sfrt_output_name.c
@@ -0,0 +1,13 @@
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <sofort/sofort.h>
+
+sfrt_api
+int sfrt_output_name(const struct sfrt_unit_ctx * uctx, FILE * f)
+{
+ return fprintf(f,"%s\n",*uctx->path);
+}