Introduction
Introduction Statistics Contact Development Disclaimer Help
micro optimation for counters on indent() - webdump - HTML to plain-text conver…
git clone git://git.codemadness.org/webdump
Log
Files
Refs
README
LICENSE
---
commit a75a21256774e9ccda82f79ad7989f44bfa81e6a
parent 642198c5b9aabc74e13e4c2e7f044516e76cbf2b
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 11 Sep 2023 19:00:30 +0200
micro optimation for counters on indent()
Diffstat:
M webdump.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/webdump.c b/webdump.c
@@ -627,13 +627,14 @@ uri_format(char *buf, size_t bufsiz, struct uri *u)
static void
rindent(void)
{
- int i;
+ int i, total;
- for (i = 0; i < indent + defaultindent; i++) {
+ total = indent + defaultindent;
+ for (i = 0; i < total; i++)
putchar(' ');
- nbytesline++;
- ncells++;
- }
+
+ nbytesline += total;
+ ncells += total;
}
static void
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.