bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gawk 3.1.4l: multibyte aware version bug


From: KIMURA Koichi
Subject: gawk 3.1.4l: multibyte aware version bug
Date: Mon, 04 Jul 2005 08:34:53 +0900

Hi,

I forgot report other bugs in gawk 3.1.4l.
sorry for delay.

1. typo int node.c

--- node.c.orig 2005-05-12 00:28:16.000000000 +0900
+++ node.c      2005-06-13 12:05:06.000000000 +0900
@@ -218,7 +218,7 @@ no_malloc:
        s->flags |= STRCUR;
 #if defined MBS_SUPPORT
        if ((s->flags & WSTRCUR) != 0) {
-               assert(s->wsptr != NULL);
+               assert(s->wstptr != NULL);
                free(s->wstptr);
                s->wstptr = NULL;
                s->wstlen = 0;
@@ -288,7 +288,7 @@ r_dupnode(NODE *n)
        r->flags &= ~(PERM|TEMP|FIELD);
        r->flags |= MALLOC;
 #if defined MBS_SUPPORT
-       r->wstr = NULL;
+       r->wstptr = NULL;
 #endif /* defined MBS_SUPPORT */
        if (n->type == Node_val && (n->flags & STRCUR) != 0) {
                r->stref = 1;


2. When not defined _LIBC, compile fail.

--- regex_internal.c.orig       2005-05-12 00:28:17.000000000 +0900
+++ regex_internal.c    2005-06-13 11:12:00.000000000 +0900
@@ -367,9 +379,9 @@
       {
        wchar_t wc;
        const char *p;
-#ifdef _LIBC
+/*#ifdef _LIBC*/
       offsets_needed:
-#endif
+/*#endif*/
        remain_len = end_idx - byte_idx;
        prev_st = pstr->cur_state;
        if (BE (pstr->trans != NULL, 0))

3. In regcomp.c, declare build_charclass as below.

static reg_errcode_t build_charclass (unsigned RE_TRANSLATE_TYPE trans,
                                      re_bitset_ptr_t sbcset,
                                      re_charset_t *mbcset,
                                      int *char_class_alloc,
                                      const unsigned char *class_name,
                                      reg_syntax_t syntax);

The type of variable class_name is "const unsigned char *"

but in function body,

#ifdef RE_ENABLE_I18N
build_charclass (trans, sbcset, mbcset, char_class_alloc, class_name, syntax)
     re_charset_t *mbcset;
     int *char_class_alloc;
#else /* not RE_ENABLE_I18N */
build_charclass (trans, sbcset, class_name, syntax)
#endif /* not RE_ENABLE_I18N */
     unsigned RE_TRANSLATE_TYPE trans;
     re_bitset_ptr_t sbcset;
     const char *class_name;
     reg_syntax_t syntax;

class_name defines as "const char *".

This diffrence cause error on some compiler. (ex. gcc on Mac OS X Tiger) 

Thank you,

P.S.
We can build and run Multibyte aware version gawk 3.1.4l on Mac OS X
Tiger!

-- 
KIMURA Koichi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]