commit c41708e0138d52cc0c2770a38943ad4d63d97ffa
parent 660a6bd7df6aaa3db08725be2c5318766290a050
Author: Michael Skec
Date: Wed, 22 Nov 2023 17:44:39 +1100
support comments
Diffstat:
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
OUT=broff
SRC=broff.c
-CFLAGS=-Og -g
-#CFLAGS=-O2
+#CFLAGS=-Og -g
+CFLAGS=-O2
ESCAPES_PROGRAM=broff-escapes
diff --git a/broff.c b/broff.c
@@ -110,7 +110,12 @@ main(int argc, char *argv[])
{
// Strip newline
line[--len] = '\0';
- if (len <= 1) continue;
+ if (len <= 0) continue;
+
+ if (len == 1 &&
+ *line == '.') continue;
+
+ if (strncmp(line, ".\\\"", strlen(".\\\"")) == 0) continue;
// .DE end display
if (cmd == CMD_DS &&