From d6c9ab3f32e6e54f23b32b59b32eddff29d814bd Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 12 Apr 2020 12:47:50 -0400 Subject: [PATCH] tools/stripfc: strip a little bit more --- tools/stripfc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/stripfc.c b/tools/stripfc.c index d179617..01a224c 100644 --- a/tools/stripfc.c +++ b/tools/stripfc.c @@ -13,15 +13,17 @@ by more than once space or by a newline. Hackish, but works. int main() { - int spccnt = 0; + int spccnt = 2; // if the first char is a (, consider it a comment opener. int incomment = 0; int c; c = getchar(); while ( c != EOF ) { if (c == '\n') { - // We still spit newlines whenever we see them, Forth interpreter - // doesn't like when they're not there... - putchar(c); + if (!incomment) { + // We still spit newlines whenever we see them, Forth interpreter + // doesn't like when they're not there... + putchar(c); + } spccnt += 2; } else if (c == ' ') { spccnt++;