[hackers] [9base] [PATCH] sam: Fix dprint format strings

From: Wolfgang Corcoran-Mathe <first.lord.of.teal_AT_gmail.com>
Date: Wed, 1 Jul 2015 12:11:59 -0400

The '%lud' format used in dprint caused 'd' to appear at the end
of each line number or character range. Using %ld seems to fix this.
---
 sam/io.c  | 2 +-
 sam/sam.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sam/io.c b/sam/io.c
index 8740c7c..a554b11 100644
--- a/sam/io.c
+++ b/sam/io.c
_AT_@ -169,7 +169,7 @@ closeio(Posn p)
 	close(io);
 	io = 0;
 	if(p >= 0)
-		dprint("#%lud\n", p);
+		dprint("#%ld\n", p);
 }
 
 int	remotefd0 = 0;
diff --git a/sam/sam.c b/sam/sam.c
index f180290..e72d890 100644
--- a/sam/sam.c
+++ b/sam/sam.c
_AT_@ -716,14 +716,14 @@ printposn(File *f, int charsonly)
 		/* check if addr ends with '\n' */
 		if(addr.r.p2>0 && addr.r.p2>addr.r.p1 && filereadc(f, addr.r.p2-1)=='\n')
 			--l2;
-		dprint("%lud", l1);
+		dprint("%ld", l1);
 		if(l2 != l1)
-			dprint(",%lud", l2);
+			dprint(",%ld", l2);
 		dprint("; ");
 	}
-	dprint("#%lud", addr.r.p1);
+	dprint("#%ld", addr.r.p1);
 	if(addr.r.p2 != addr.r.p1)
-		dprint(",#%lud", addr.r.p2);
+		dprint(",#%ld", addr.r.p2);
 	dprint("\n");
 }
 
-- 
2.3.5
Received on Wed Jul 01 2015 - 18:11:59 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 01 2015 - 18:24:10 CEST