diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-11-30 21:10:26 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-11-30 21:10:26 +0100 |
commit | 847c497d84366caaae4e575a7cb700a5f092279d (patch) | |
tree | f58c0beb48549c77aa0ec1da74ee4c2a1de48fc5 /modules/stdio | |
parent | 9f1cc4b054088b9437462f44b8f4dbe435f88b2d (diff) |
ui: make ui_output() take a formatted string
- minor cleanup in logging
- use ui_output() for interactive output
- avoid using re_printf()
- stdio: added an output_handler (to stderr)
Diffstat (limited to 'modules/stdio')
-rw-r--r-- | modules/stdio/stdio.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/stdio/stdio.c b/modules/stdio/stdio.c index 244dc01..3121322 100644 --- a/modules/stdio/stdio.c +++ b/modules/stdio/stdio.c @@ -150,8 +150,15 @@ static int ui_alloc(struct ui_st **stp) } +static int output_handler(const char *str) +{ + return print_handler(str, str_len(str), NULL); +} + + static struct ui ui_stdio = { - .name = "stdio" + .name = "stdio", + .outputh = output_handler }; |