summaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
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);
+}