]> granicus.if.org Git - mutt/commitdiff
Fix compiler warnings in new wcwidth.c (too large values for 'unsigned short')
authorRocco Rutte <pdmef@gmx.net>
Tue, 13 Nov 2007 12:31:01 +0000 (13:31 +0100)
committerRocco Rutte <pdmef@gmx.net>
Tue, 13 Nov 2007 12:31:01 +0000 (13:31 +0100)
wcwidth.c

index 1bd35ae4bc2be8010bdf51866c0befecdfd8ea5d..0b94d736f71fb4e009f326fad8d86219e057ec20 100644 (file)
--- a/wcwidth.c
+++ b/wcwidth.c
  * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
  */
 
-/* Adapted for Mutt by Edmund Grimley Evans.
+/* Changes made for mutt:
+ * - Adapted for Mutt by Edmund Grimley Evans.
+ * - Changed 'first'/'last' members of combined[] to wchar_t from
+ *   unsigned short to fix compiler warnings, 2007-11-13, Rocco Rutte
  */
 
 #if HAVE_CONFIG_H
@@ -65,8 +68,8 @@ int wcwidth_ucs(wchar_t ucs)
   /* sorted list of non-overlapping intervals of non-spacing characters */
   /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
   static const struct interval {
-    unsigned short first;
-    unsigned short last;
+    wchar_t first;
+    wchar_t last;
   } combining[] = {
     { 0x0300, 0x036f }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 },
     { 0x0591, 0x05bd }, { 0x05bf, 0x05bf }, { 0x05c1, 0x05c2 },