Module Name: src Committed By: christos Date: Thu May 14 10:44:15 UTC 2015
Modified Files: src/lib/libedit: chartype.h map.c tty.c Log Message: fix warnings on ubuntu 32 bit (Miki Rozloznik) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libedit/chartype.h cvs rdiff -u -r1.34 -r1.35 src/lib/libedit/map.c cvs rdiff -u -r1.46 -r1.47 src/lib/libedit/tty.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/chartype.h diff -u src/lib/libedit/chartype.h:1.13 src/lib/libedit/chartype.h:1.14 --- src/lib/libedit/chartype.h:1.13 Sat Feb 21 21:16:19 2015 +++ src/lib/libedit/chartype.h Thu May 14 06:44:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.13 2015/02/22 02:16:19 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.14 2015/05/14 10:44:15 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -72,6 +72,7 @@ #define FUN(prefix,rest) prefix ## _w ## rest #define FUNW(type) type ## _w #define TYPE(type) type ## W +#define FCHAR "%lc" #define FSTR "%ls" #define STR(x) L ## x #define UC(c) c @@ -126,6 +127,7 @@ Width(wchar_t c) #define FUN(prefix,rest) prefix ## _ ## rest #define FUNW(type) type #define TYPE(type) type +#define FCHAR "%c" #define FSTR "%s" #define STR(x) x #define UC(c) (unsigned char)(c) Index: src/lib/libedit/map.c diff -u src/lib/libedit/map.c:1.34 src/lib/libedit/map.c:1.35 --- src/lib/libedit/map.c:1.34 Sun Jul 6 14:15:34 2014 +++ src/lib/libedit/map.c Thu May 14 06:44:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: map.c,v 1.34 2014/07/06 18:15:34 christos Exp $ */ +/* $NetBSD: map.c,v 1.35 2015/05/14 10:44:15 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: map.c,v 1.34 2014/07/06 18:15:34 christos Exp $"); +__RCSID("$NetBSD: map.c,v 1.35 2015/05/14 10:44:15 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -1300,8 +1300,8 @@ map_bind(EditLine *el, int argc, const C return 0; default: (void) fprintf(el->el_errfile, - "" FSTR ": Invalid switch `%c'.\n", - argv[0], p[1]); + "" FSTR ": Invalid switch `" FCHAR "'.\n", + argv[0], (Int)p[1]); } else break; Index: src/lib/libedit/tty.c diff -u src/lib/libedit/tty.c:1.46 src/lib/libedit/tty.c:1.47 --- src/lib/libedit/tty.c:1.46 Wed Jun 18 14:52:49 2014 +++ src/lib/libedit/tty.c Thu May 14 06:44:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.46 2014/06/18 18:52:49 christos Exp $ */ +/* $NetBSD: tty.c,v 1.47 2015/05/14 10:44:15 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tty.c,v 1.46 2014/06/18 18:52:49 christos Exp $"); +__RCSID("$NetBSD: tty.c,v 1.47 2015/05/14 10:44:15 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -1171,8 +1171,8 @@ tty_stty(EditLine *el, int argc __attrib break; default: (void) fprintf(el->el_errfile, - "%s: Unknown switch `%c'.\n", - name, argv[0][1]); + "%s: Unknown switch `" FCHAR "'.\n", + name, (Int)argv[0][1]); return -1; }