]> git.cameronkatri.com Git - mandoc.git/commitdiff
Using putchar for single-character prints (noted by Joerg Sonnenberger).
authorKristaps Dzonsons <kristaps@bsd.lv>
Sun, 1 Nov 2009 15:34:15 +0000 (15:34 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Sun, 1 Nov 2009 15:34:15 +0000 (15:34 +0000)
html.c

diff --git a/html.c b/html.c
index 33c37bb7d7eb3bdcc5172d582cba6c25f63ee98e..47171298685a4e8dd3d5cdf567f3f709d45a0b19 100644 (file)
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/*     $Id: html.c,v 1.77 2009/11/01 08:15:20 kristaps Exp $ */
+/*     $Id: html.c,v 1.78 2009/11/01 15:34:15 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -361,16 +361,16 @@ print_otag(struct html *h, enum htmltag tag,
 
        if ( ! (HTML_NOSPACE & h->flags))
                if ( ! (HTML_CLRLINE & htmltags[tag].flags))
-                       printf(" ");
+                       putchar(' ');
 
        printf("<%s", htmltags[tag].name);
        for (i = 0; i < sz; i++) {
                printf(" %s=\"", htmlattrs[p[i].key]);
                assert(p->val);
                print_encode(h, p[i].val);
-               printf("\"");
+               putchar('\"');
        }
-       printf(">");
+       putchar('>');
 
        h->flags |= HTML_NOSPACE;
        if (HTML_CLRLINE & htmltags[tag].flags)
@@ -391,7 +391,7 @@ print_ctag(struct html *h, enum htmltag tag)
        if (HTML_CLRLINE & htmltags[tag].flags) {
                h->flags |= HTML_NOSPACE;
                h->flags |= HTML_NEWLINE;
-               printf("\n");
+               putchar('\n');
        } else
                h->flags &= ~HTML_NEWLINE;
 }
@@ -437,7 +437,7 @@ print_text(struct html *h, const char *p)
                }
 
        if ( ! (h->flags & HTML_NOSPACE))
-               printf(" ");
+               putchar(' ');
 
        h->flags &= ~HTML_NOSPACE;
        h->flags &= ~HTML_NEWLINE;