tmicro-optimization: fputc (function) -> putc (macro/inline function) - stagit … | |
git clone git://src.adamsgaard.dk/stagit | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit b81b80893595bc24d430af080fa9468496f8ecee | |
parent da7bceb1f713c13163c017ef1713e2912a3283dc | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sat, 9 Jan 2021 14:59:53 +0100 | |
micro-optimization: fputc (function) -> putc (macro/inline function) | |
Diffstat: | |
M stagit-index.c | 2 +- | |
M stagit.c | 14 +++++++------- | |
2 files changed, 8 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/stagit-index.c b/stagit-index.c | |
t@@ -43,7 +43,7 @@ xmlencode(FILE *fp, const char *s, size_t len) | |
case '\'': fputs("'" , fp); break; | |
case '&': fputs("&", fp); break; | |
case '"': fputs(""", fp); break; | |
- default: fputc(*s, fp); | |
+ default: putc(*s, fp); | |
} | |
} | |
} | |
diff --git a/stagit.c b/stagit.c | |
t@@ -374,7 +374,7 @@ xmlencode(FILE *fp, const char *s, size_t len) | |
case '\'': fputs("'", fp); break; | |
case '&': fputs("&", fp); break; | |
case '"': fputs(""", fp); break; | |
- default: fputc(*s, fp); | |
+ default: putc(*s, fp); | |
} | |
} | |
} | |
t@@ -565,12 +565,12 @@ printcommit(FILE *fp, struct commitinfo *ci) | |
xmlencode(fp, ci->author->email, strlen(ci->author->email)); | |
fputs("</a>>\n<b>Date:</b> ", fp); | |
printtime(fp, &(ci->author->when)); | |
- fputc('\n', fp); | |
+ putc('\n', fp); | |
} | |
if (ci->msg) { | |
- fputc('\n', fp); | |
+ putc('\n', fp); | |
xmlencode(fp, ci->msg, strlen(ci->msg)); | |
- fputc('\n', fp); | |
+ putc('\n', fp); | |
} | |
} | |
t@@ -689,7 +689,7 @@ printshowfile(FILE *fp, struct commitinfo *ci) | |
fprintf(fp, "<a href=\"#h%zu-%zu-%zu\"… | |
i, j, k, i, j, k); | |
else | |
- fputc(' ', fp); | |
+ putc(' ', fp); | |
xmlencode(fp, line->content, line->content_len… | |
if (line->old_lineno == -1 || line->new_lineno… | |
fputs("</a>", fp); | |
t@@ -842,10 +842,10 @@ printcommitatom(FILE *fp, struct commitinfo *ci, const c… | |
xmlencode(fp, ci->author->email, strlen(ci->author->email)); | |
fputs(">\nDate: ", fp); | |
printtime(fp, &(ci->author->when)); | |
- fputc('\n', fp); | |
+ putc('\n', fp); | |
} | |
if (ci->msg) { | |
- fputc('\n', fp); | |
+ putc('\n', fp); | |
xmlencode(fp, ci->msg, strlen(ci->msg)); | |
} | |
fputs("\n</content>\n</entry>\n", fp); |