summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chars.c2
-rw-r--r--html.c10
2 files changed, 4 insertions, 8 deletions
diff --git a/chars.c b/chars.c
index 23b98006..a7582d78 100644
--- a/chars.c
+++ b/chars.c
@@ -35,7 +35,7 @@ struct ln {
int type;
#define CHARS_CHAR (1 << 0)
#define CHARS_STRING (1 << 1)
-#define CHARS_BOTH (0x03)
+#define CHARS_BOTH (CHARS_CHAR | CHARS_STRING)
};
#define LINES_MAX 351
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);
}