James Walden <[EMAIL PROTECTED]> writes:

> In order to build HTML-Parser-3.02 with perl 5.005_03 using xlc on AIX
> 4.1, I had to remove the final commas after the last elements of all the
> enums in hparser.[ch].

Thank you.  This patch will be in 3.06.

I also reread what K&R 2nd had to say on this issue.  It looks like
enums can't have a final comma, but array initializers can.  A strange
inconsistency if you ask me.  Your compiler obviously did not have
problems with the arrays set up in 'hctype.h' and 'pfunc.h'.

Regards,
Gisle


> Patches for those files are included below:
> 
> *** hparser.c.old       Wed Dec 15 12:56:37 1999
> --- hparser.c   Fri Feb  4 15:23:12 2000
> ***************
> *** 44,50 ****
>     ARG_LENGTH,
>     ARG_EVENT,
>     ARG_UNDEF,
> !   ARG_LITERAL, /* Always keep last */
>   };
>  
>   char *argname[] = {
> --- 44,50 ----
>     ARG_LENGTH,
>     ARG_EVENT,
>     ARG_UNDEF,
> !   ARG_LITERAL /* Always keep last */
>   };
>  
>   char *argname[] = {
> 
> *** hparser.h.old     Fri Dec 17 06:11:40 1999
> --- hparser.h Fri Feb  4 15:22:33 2000
> ***************
> *** 20,26 ****
>     MS_INCLUDE,
>     MS_RCDATA,
>     MS_CDATA,
> !   MS_IGNORE,
>   };
>   
>   #define CDATA_MODE(p_state) ((p_state)->literal_mode || \
> --- 20,26 ----
>     MS_INCLUDE,
>     MS_RCDATA,
>     MS_CDATA,
> !   MS_IGNORE
>   };
>   
>   #define CDATA_MODE(p_state) ((p_state)->literal_mode || \
> ***************
> *** 44,50 ****
>     E_PROCESS,
>     E_DEFAULT,
>     /**/
> !   EVENT_COUNT,
>   };
>   typedef enum event_id event_id_t;
>   
> --- 44,50 ----
>     E_PROCESS,
>     E_DEFAULT,
>     /**/
> !   EVENT_COUNT
>   };
>   typedef enum event_id event_id_t;

Reply via email to