code-style pass #2, else blocks - smu - smu - simple markup (Markdown) processo… | |
git clone git://git.codemadness.org/smu | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 17b1b9066c0915acb506e014d65aa7f70aaa29e3 | |
parent b2cd7b8e8170818f6f5a7065a4a96cedf61c7c64 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Tue, 11 May 2021 02:19:39 +0200 | |
code-style pass #2, else blocks | |
Diffstat: | |
M smu.c | 15 +++++++-------- | |
1 file changed, 7 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/smu.c b/smu.c | |
@@ -394,9 +394,9 @@ dolist(const char *begin, const char *end, int newblock) | |
for (; p < end && run; p++) { | |
for (i = 0; p < end && run; p++, i++) { | |
if (*p == '\n') { | |
- if (p + 1 == end) | |
+ if (p + 1 == end) { | |
break; | |
- else { | |
+ } else { | |
/* Handle empty lines */ | |
for (q = p + 1; (*q == ' ' || *q == '\… | |
; | |
@@ -410,9 +410,9 @@ dolist(const char *begin, const char *end, int newblock) | |
} | |
q = p + 1; | |
j = 0; | |
- if (ul && *q == marker) | |
+ if (ul && *q == marker) { | |
j = 1; | |
- else if (!ul) { | |
+ } else if (!ul) { | |
for (; q + j != end && q[j] >= '0' && … | |
; | |
if (q + j == end) | |
@@ -434,9 +434,9 @@ dolist(const char *begin, const char *end, int newblock) | |
p++; | |
else | |
break; | |
- } | |
- else if (j < indent) | |
+ } else if (j < indent) { | |
run = 0; | |
+ } | |
} | |
ADDC(buffer, i) = *p; | |
} | |
@@ -527,8 +527,7 @@ doshortlink(const char *begin, const char *end, int newbloc… | |
fputs("\">", stdout); | |
for (c = begin + 1; *c != '>'; c++) | |
fprintf(stdout, "&#%u;", *c); | |
- } | |
- else { | |
+ } else { | |
hprintattr(begin + 1, p); | |
fputs("\">", stdout); | |
hprint(begin + 1, p); |