Merge branch 'tb/unicode-6.3-zero-width'
authorJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2014 20:38:57 +0000 (13:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2014 20:38:57 +0000 (13:38 -0700)
Teach our display-column-counting logic about decomposed umlauts
and friends.

* tb/unicode-6.3-zero-width:
utf8.c: partially update to version 6.3

1  2 
utf8.c
diff --combined utf8.c
index a831d5089908df61574119b01a29a1991196f63a,536a9c83e1bbde516df22288d6156160b12a62ce..77c28d492cccfcbcb8a302d168a81b21d909ef12
--- 1/utf8.c
--- 2/utf8.c
+++ b/utf8.c
@@@ -5,8 -5,8 +5,8 @@@
  /* This code is originally from http://www.cl.cam.ac.uk/~mgk25/ucs/ */
  
  struct interval {
 -  int first;
 -  int last;
 +      ucs_char_t first;
 +      ucs_char_t last;
  };
  
  size_t display_mode_esc_sequence_len(const char *s)
@@@ -84,11 -84,10 +84,10 @@@ static int git_wcwidth(ucs_char_t ch
         *   "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c".
         */
        static const struct interval combining[] = {
-               { 0x0300, 0x0357 }, { 0x035D, 0x036F }, { 0x0483, 0x0486 },
-               { 0x0488, 0x0489 }, { 0x0591, 0x05A1 }, { 0x05A3, 0x05B9 },
-               { 0x05BB, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
-               { 0x05C4, 0x05C4 }, { 0x0600, 0x0603 }, { 0x0610, 0x0615 },
-               { 0x064B, 0x0658 }, { 0x0670, 0x0670 }, { 0x06D6, 0x06E4 },
+               { 0x0300, 0x036F }, { 0x0483, 0x0489 }, { 0x0591, 0x05BD },
+               { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, { 0x05C4, 0x05C5 },
+               { 0x05C7, 0x05C7 }, { 0x0600, 0x0604 }, { 0x0610, 0x061A },
+               { 0x064B, 0x065F }, { 0x0670, 0x0670 }, { 0x06D6, 0x06E4 },
                { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, { 0x070F, 0x070F },
                { 0x0711, 0x0711 }, { 0x0730, 0x074A }, { 0x07A6, 0x07B0 },
                { 0x0901, 0x0902 }, { 0x093C, 0x093C }, { 0x0941, 0x0948 },
@@@ -529,7 -528,7 +528,7 @@@ char *reencode_string_iconv(const char 
        while (1) {
                size_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);
  
 -              if (cnt == -1) {
 +              if (cnt == (size_t) -1) {
                        size_t sofar;
                        if (errno != E2BIG) {
                                free(out);