Introduction
Introduction Statistics Contact Development Disclaimer Help
micro-optimization: fputc (function) -> putc (possible macro) - smu - smu - sim…
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit b2cd7b8e8170818f6f5a7065a4a96cedf61c7c64
parent cb1471bace36cbe8097e56367f0d07d04e553217
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 11 May 2021 02:17:05 +0200
micro-optimization: fputc (function) -> putc (possible macro)
Diffstat:
M smu.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/smu.c b/smu.c
@@ -211,10 +211,10 @@ dolineprefix(const char *begin, const char *end, int newb…
if (strncmp(lineprefix[i].search, p, l))
continue;
if (*begin == '\n')
- fputc('\n', stdout);
+ putc('\n', stdout);
fputs(lineprefix[i].before, stdout);
if (lineprefix[i].search[l-1] == '\n') {
- fputc('\n', stdout);
+ putc('\n', stdout);
return l - 1;
}
if (!(buffer = malloc(BUFSIZ)))
@@ -388,7 +388,7 @@ dolist(const char *begin, const char *end, int newblock)
indent = p - q;
buffer = ereallocz(buffer, BUFSIZ);
if (!newblock)
- fputc('\n', stdout);
+ putc('\n', stdout);
fputs(ul ? "<ul>\n" : "<ol>\n", stdout);
run = 1;
for (; p < end && run; p++) {
@@ -635,7 +635,7 @@ hprintattr(const char *begin, const char *end)
else if (*p == '<')
fputs("&lt;", stdout);
else
- fputc(*p, stdout);
+ putc(*p, stdout);
}
}
@@ -652,7 +652,7 @@ hprint(const char *begin, const char *end)
else if (*p == '<')
fputs("&lt;", stdout);
else
- fputc(*p, stdout);
+ putc(*p, stdout);
}
}
@@ -676,7 +676,7 @@ process(const char *begin, const char *end, int newblock)
if (nohtml)
hprint(p, p + 1);
else
- fputc(*p, stdout);
+ putc(*p, stdout);
p++;
}
for (q = p; q != end && *q == '\n'; q++)
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.