summaryrefslogtreecommitdiffstatshomepage
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
commitf3bb876e3422b8b2f16b0a2ef93cfde924fe19ee (patch)
tree3ca798c1cb527023bb76f74be719a456a2f17094 /html.c
parent3b2876969833bfd995732203a7e0d592368841ee (diff)
downloadmandoc-f3bb876e3422b8b2f16b0a2ef93cfde924fe19ee.tar.gz
mandoc-f3bb876e3422b8b2f16b0a2ef93cfde924fe19ee.tar.zst
mandoc-f3bb876e3422b8b2f16b0a2ef93cfde924fe19ee.zip
Replaced putchar() loop with fwrite() (noted by Joerg Sonnenberger).
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/html.c b/html.c
index 643896ef..7ed94c9a 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.75 2009/10/31 06:10:57 kristaps Exp $ */
+/* $Id: html.c,v 1.76 2009/11/01 07:44:32 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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);
}