summaryrefslogtreecommitdiffhomepage
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.c12
-rw-r--r--src/output/sfrt_output_name.c12
3 files changed, 28 insertions, 9 deletions
diff --git a/src/output/sfrt_output_address.c b/src/output/sfrt_output_address.c
index 019a2dd..c9b16a1 100644
--- a/src/output/sfrt_output_address.c
+++ b/src/output/sfrt_output_address.c
@@ -5,9 +5,16 @@
#include <errno.h>
#include <sofort/sofort.h>
+#include "sofort_driver_impl.h"
+#include "sofort_dprintf_impl.h"
-sfrt_api
-int sfrt_output_address(const struct sfrt_unit_ctx * uctx, FILE * f)
+int sfrt_output_address(
+ const struct sfrt_driver_ctx * dctx,
+ const struct sfrt_unit_ctx * uctx)
{
- return fprintf(f,"%*p\n",(int)(2*sizeof(size_t)),uctx->map->addr);
+ return sfrt_dprintf(
+ sfrt_driver_fdout(dctx),
+ "%*p\n",
+ (int)(2*sizeof(size_t)),
+ uctx->map->addr);
}
diff --git a/src/output/sfrt_output_dummy.c b/src/output/sfrt_output_dummy.c
index 4342737..c29f7e1 100644
--- a/src/output/sfrt_output_dummy.c
+++ b/src/output/sfrt_output_dummy.c
@@ -5,9 +5,15 @@
#include <errno.h>
#include <sofort/sofort.h>
+#include "sofort_driver_impl.h"
+#include "sofort_dprintf_impl.h"
-sfrt_api
-int sfrt_output_dummy (const struct sfrt_common_ctx * cctx, FILE * f)
+int sfrt_output_dummy (const struct sfrt_driver_ctx * dctx)
{
- return fprintf(f,"%s\n",cctx->anystring ? cctx->anystring : "(null)");
+ return sfrt_dprintf(
+ sfrt_driver_fdout(dctx),
+ "%s\n",
+ dctx->cctx->anystring
+ ? dctx->cctx->anystring
+ : "(null)");
}
diff --git a/src/output/sfrt_output_name.c b/src/output/sfrt_output_name.c
index c0aff5e..7eb874e 100644
--- a/src/output/sfrt_output_name.c
+++ b/src/output/sfrt_output_name.c
@@ -5,9 +5,15 @@
#include <errno.h>
#include <sofort/sofort.h>
+#include "sofort_driver_impl.h"
+#include "sofort_dprintf_impl.h"
-sfrt_api
-int sfrt_output_name(const struct sfrt_unit_ctx * uctx, FILE * f)
+int sfrt_output_name(
+ const struct sfrt_driver_ctx * dctx,
+ const struct sfrt_unit_ctx * uctx)
{
- return fprintf(f,"%s\n",*uctx->path);
+ return sfrt_dprintf(
+ sfrt_driver_fdout(dctx),
+ "%s\n",
+ *uctx->path);
}