shithub: neatroff

Download patch

ref: b888f1393c1efeff1c752f3412c183dd4aa1c797
parent: 8eda3492efb3f4ee1f3e9d95593bedced54abe31
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sun Dec 9 17:15:53 EST 2012

cp: handle concealed newlines and comments

--- a/cp.c
+++ b/cp.c
@@ -61,7 +61,12 @@
 		} else if (c == '$') {
 			cp_arg();
 			c = in_next();
-		} else {
+		} else if (c == '\n') {
+			c = cp_next();
+		} else if (c == '"') {
+			while (c >= 0 && c != '\n')
+				c = in_next();
+		} else if (c != '.') {
 			cp_back(c);
 			c = '\\';
 		}