|
|
| version 1.11, 2004/06/23 16:06:12 | version 1.12, 2004/06/23 16:22:30 |
|---|---|
| Line 512 void milutf8_ncpy(char *dst, const char | Line 512 void milutf8_ncpy(char *dst, const char |
| for (i=0; i<maxlen && src[i]; i++) { | for (i=0; i<maxlen && src[i]; i++) { |
| dst[i] = src[i]; | dst[i] = src[i]; |
| } | } |
| while((i) && ((dst[i-1] & 0xc0) == 0x80)) { | |
| i--; | |
| } | |
| dst[i] = '\0'; | dst[i] = '\0'; |
| if (i) { | |
| do { | |
| i--; | |
| } while((i) && ((dst[i] & 0xc0) == 0x80)); | |
| i += milutf8_charsize(dst + i); | |
| dst[i] = '\0'; | |
| } | |
| } | } |
| } | } |
| Line 534 void milutf8_ncat(char *dst, const char | Line 538 void milutf8_ncat(char *dst, const char |
| for (j=0; i<maxlen && src[j]; i++, j++) { | for (j=0; i<maxlen && src[j]; i++, j++) { |
| dst[i] = src[j]; | dst[i] = src[j]; |
| } | } |
| while((i) && ((dst[i-1] & 0xc0) == 0x80)) { | |
| i--; | |
| } | |
| dst[i] = '\0'; | dst[i] = '\0'; |
| if (i) { | |
| do { | |
| i--; | |
| } while((i) && ((dst[i] & 0xc0) == 0x80)); | |
| i += milutf8_charsize(dst + i); | |
| dst[i] = '\0'; | |
| } | |
| } | } |
| } | } |