fprintunderline: small optimization
Don't run utf8strlen potentially for each character. Signed-off-by: Christoph Lohmann <20h@r-36.net>master
parent
0e58fcdb30
commit
44f42507f8
|
@ -25,10 +25,11 @@ utf8strlen(const char *s)
|
||||||
void
|
void
|
||||||
fprintunderline(FILE *fp, const char *str)
|
fprintunderline(FILE *fp, const char *str)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i, len;
|
||||||
|
|
||||||
fprintf(fp, "\n %s\n ", str);
|
fprintf(fp, "\n %s\n ", str);
|
||||||
for (i = 0; i <= utf8strlen(str); ++i)
|
len = utf8strlen(str);
|
||||||
|
for (i = 0; i <= len; ++i)
|
||||||
fputs("=", fp);
|
fputs("=", fp);
|
||||||
fputs("\n\n", fp);
|
fputs("\n\n", fp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue