shithub: neatroff

Download patch

ref: a964826bb75b0776bf34898855aa8193b84c4e7c
parent: 3bb6a7bbeebc83a29b60a83f356e2935af02d992
author: Ali Gholami Rudi <ali@rudi.ir>
date: Fri Apr 25 08:48:46 EDT 2014

reg: \n[.neat] is always one!

--- a/reg.c
+++ b/reg.c
@@ -68,7 +68,8 @@
 			sprintf(numbuf, "%d", f_hpos());
 			return numbuf;
 		case 'm':
-			sprintf(numbuf, "#%02x%02x%02x", CLR_R(n_m), CLR_G(n_m), CLR_B(n_m));
+			sprintf(numbuf, "#%02x%02x%02x",
+				CLR_R(n_m), CLR_G(n_m), CLR_B(n_m));
 			return numbuf;
 		case 't':
 			sprintf(numbuf, "%d", f_nexttrap());
@@ -85,6 +86,8 @@
 			return numbuf;
 		}
 	}
+	if (s[0] == '.' && !strcmp(".neat", s))
+		return "1";
 	if (id == map("yr")) {
 		sprintf(numbuf, "%02d", nregs[id]);
 		return numbuf;