comparison src/ex_cmds.c @ 714:0f9f4761ad9c v7.0216

updated for version 7.0216
author vimboss
date Mon, 06 Mar 2006 23:29:24 +0000
parents 07d199fe02ed
children 8ae24f338cab
comparison
equal deleted inserted replaced
713:0c381fb7846c 714:0f9f4761ad9c
50 int c; 50 int c;
51 char buf1[20]; 51 char buf1[20];
52 char buf2[20]; 52 char buf2[20];
53 char_u buf3[7]; 53 char_u buf3[7];
54 #ifdef FEAT_MBYTE 54 #ifdef FEAT_MBYTE
55 int c1 = 0; 55 int cc[MAX_MCO];
56 int c2 = 0; 56 int ci = 0;
57 int len; 57 int len;
58 58
59 if (enc_utf8) 59 if (enc_utf8)
60 c = utfc_ptr2char(ml_get_cursor(), &c1, &c2); 60 c = utfc_ptr2char(ml_get_cursor(), cc);
61 else 61 else
62 #endif 62 #endif
63 c = gchar_cursor(); 63 c = gchar_cursor();
64 if (c == NUL) 64 if (c == NUL)
65 { 65 {
93 buf2[0] = NUL; 93 buf2[0] = NUL;
94 vim_snprintf((char *)IObuff, IOSIZE, 94 vim_snprintf((char *)IObuff, IOSIZE,
95 _("<%s>%s%s %d, Hex %02x, Octal %03o"), 95 _("<%s>%s%s %d, Hex %02x, Octal %03o"),
96 transchar(c), buf1, buf2, c, c, c); 96 transchar(c), buf1, buf2, c, c, c);
97 #ifdef FEAT_MBYTE 97 #ifdef FEAT_MBYTE
98 c = c1; 98 c = cc[ci++];
99 c1 = c2;
100 c2 = 0;
101 #endif 99 #endif
102 } 100 }
103 101
104 #ifdef FEAT_MBYTE 102 #ifdef FEAT_MBYTE
105 /* Repeat for combining characters. */ 103 /* Repeat for combining characters. */
118 IObuff[len++] = ' '; /* draw composing char on top of a space */ 116 IObuff[len++] = ' '; /* draw composing char on top of a space */
119 len += (*mb_char2bytes)(c, IObuff + len); 117 len += (*mb_char2bytes)(c, IObuff + len);
120 vim_snprintf((char *)IObuff + len, IOSIZE - len, 118 vim_snprintf((char *)IObuff + len, IOSIZE - len,
121 c < 0x10000 ? _("> %d, Hex %04x, Octal %o") 119 c < 0x10000 ? _("> %d, Hex %04x, Octal %o")
122 : _("> %d, Hex %08x, Octal %o"), c, c, c); 120 : _("> %d, Hex %08x, Octal %o"), c, c, c);
123 c = c1; 121 if (ci == MAX_MCO)
124 c1 = c2; 122 break;
125 c2 = 0; 123 c = cc[ci++];
126 } 124 }
127 #endif 125 #endif
128 126
129 msg(IObuff); 127 msg(IObuff);
130 } 128 }