r21679 | usa | 2009-01-20 09:27:17 +0900 (Tue, 20 Jan 2009) | 5 lines
* ext/nkf/nkf-utf8/nkf.c (nkf_buf_push): maybe a bug.
* ext/nkf/nkf-utf8/nkf.c (options): no need to support help
option.
typedef struct {
long capa;
long len;
- unsigned char *ptr;
+ nkf_char *ptr;
} nkf_buf_t;
static nkf_buf_t *
}
static void
-nkf_buf_push(nkf_buf_t *buf, unsigned char c)
+nkf_buf_push(nkf_buf_t *buf, nkf_char c)
{
if (buf->capa <= buf->len) {
exit(EXIT_FAILURE);
if (c == EOF || c > 0xFF || (c & 0xc0) == 0x80) return c;
- nkf_buf_push(buf, (unsigned char)c);
+ nkf_buf_push(buf, c);
do {
while (lower <= upper) {
int mid = (lower+upper) / 2;
cp_back = cp;
cp = (unsigned char *)long_option[i].alias;
}else{
+#ifndef PERL_XS
if (strcmp(long_option[i].name, "help") == 0){
usage();
exit(EXIT_SUCCESS);
}
+#endif
if (strcmp(long_option[i].name, "ic=") == 0){
enc = nkf_enc_find((char *)p);
if (!enc) continue;