aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/io.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/io.c b/mod/io.c
index d376d1c..208a089 100644
--- a/mod/io.c
+++ b/mod/io.c
@@ -19,6 +19,14 @@ long fwdprint_i64(fwd_extern_args_t args)
return 0;
}
+long fwdprint_str(fwd_extern_args_t args)
+{
+ assert(args.argc == 1);
+ const char *s = FWD_ARG_T(args, 0, const char *);
+ printf("%s", s);
+ return 0;
+}
+
int fwdopen(fwd_state_t *state)
{
FWD_REGISTER(state, fwdprint_nl,
@@ -27,5 +35,8 @@ int fwdopen(fwd_state_t *state)
FWD_REGISTER(state, fwdprint_i64,
FWD_VOID, FWD_T(int64_t));
+ FWD_REGISTER(state, fwdprint_str,
+ FWD_VOID, FWD_T(const char *));
+
return 0;
}