shithub: neatroff

Download patch

ref: 7dc83e802fffc3e9054df4f04dd8bf601294e0c5
parent: 4ccdb4dffdc98afe8ce65caa9d124f41a8705148
author: Ali Gholami Rudi <[email protected]>
date: Thu Apr 25 17:47:04 EDT 2013

cp: call cp_next() if the conditional block should be executed

--- a/cp.c
+++ b/cp.c
@@ -117,7 +117,7 @@
 	int c;
 	int nblk = cp_nblk;
 	do {
-		c = cp_raw();
+		c = skip ? cp_raw() : cp_next();
 	} while (c == ' ' || c == '\t');
 	if (c == '\\' && in_top() == '{') {	/* a troff \{ \} block */
 		if (skip) {
--- a/tr.c
+++ b/tr.c
@@ -532,6 +532,7 @@
 				in_push(str_get(REG(cmd[1], cmd[2])), args + 1);
 		}
 		c = cp_next();
+		nl = c == '\n';
 	}
 	tr_nl = nl;
 	return c;