summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-11-01 07:44:32 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-11-01 07:44:32 +0000
commit13099e0c4c23befef2f762613590494d89487710 (patch)
tree46b4add7254090a4cd443e759eafda356f0791b5 /html.c
parent153136295f3a2d0540e70dbd96a1af7ca783b7be (diff)
downloadmandoc-13099e0c4c23befef2f762613590494d89487710.tar.gz
Replaced putchar() loop with fwrite() (noted by Joerg Sonnenberger).
Diffstat (limited to 'html.c')
-rw-r--r--html.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/html.c b/html.c
index 3649b5fc..2bd90110 100644
--- a/html.c
+++ b/html.c
@@ -18,8 +18,8 @@
#include <assert.h>
#include <ctype.h>
-#include <stdio.h>
#include <stdarg.h>
+#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -189,15 +189,13 @@ static void
print_spec(struct html *h, const char *p, int len)
{
const char *rhs;
- int i;
size_t sz;
rhs = chars_a2ascii(h->symtab, p, (size_t)len, &sz);
if (NULL == rhs)
return;
- for (i = 0; i < (int)sz; i++)
- putchar(rhs[i]);
+ fwrite(rhs, 1, sz, stdout);
}
@@ -205,15 +203,13 @@ static void
print_res(struct html *h, const char *p, int len)
{
const char *rhs;
- int i;
size_t sz;
rhs = chars_a2res(h->symtab, p, (size_t)len, &sz);
if (NULL == rhs)
return;
- for (i = 0; i < (int)sz; i++)
- putchar(rhs[i]);
+ fwrite(rhs, 1, sz, stdout);
}