pkgsrc/editors/nvi/patches/patch-common_msg.c
enami 3f01cbe06a Fix ^G to print correct ratio on Mac OSX. Without this fix, the output
looks like this:
    Makefile: unmodified: line 1 of 55 [140733193388033%]
2015-05-11 08:43:44 +00:00

14 lines
467 B
C

$NetBSD: patch-common_msg.c,v 1.1 2015/05/11 08:43:44 enami Exp $
--- common/msg.c.orig 2007-11-18 16:41:42.000000000 +0000
+++ common/msg.c
@@ -640,7 +640,8 @@ msgq_status(SCR *sp, db_recno_t lno, u_i
p += len;
} else {
t = msg_cat(sp, "027|line %lu of %lu [%ld%%]", &len);
- (void)sprintf(p, t, lno, last, (lno * 100) / last);
+ (void)sprintf(p, t, (u_long)lno, (u_long)last,
+ (long)((lno * 100) / last));
p += strlen(p);
}
} else {