From: Martin Q. <mar...@im...> - 2005-01-25 08:12:11
|
Hello, On Mon, Jan 24, 2005 at 03:49:13PM -0500, Dowling, William (Will) (TS USA) = wrote: > I have checked in mods to the files > skel: > - Handle ']' at end of CDATA like: <![CDATA[val xxx]]]>; > - Do not print to stderr: add primitive error message facility; > - Allow multiple calls/multiple returns, so flexml-generated parsers > can parse document sequences (>1 document in a stream); > - Allow failure from all states (<*>) so flex scanner jammed does > not occur. >=20 > flexml.pl > - Remove compiler complaint about (void *) <-> (const char **). > conversion. I was reading the changes by curiosity mainly, and I have some questions. (plus an extra changelog entry: do not use the "new" identifier since it breaks in C++ ;) +enum {flexml_max_err_msg_size =3D 512}; Why is flexml_max_err_msg_size an enum and not a const int? I understand that it makes very little difference, but I would find the latter cleaner, wouldn't it? +static char flexml_err_msg[flexml_max_err_msg_size]; +const char * parse_err_msg() +{ + return flexml_err_msg; +} + +static void reset_parse_err_msg() +{ + flexml_err_msg[0] =3D '\0'; +} Would it be possible to create some sort of option somewhere stating whether we're going to display the errors as some as they appear (former behaviour) or if we put them into this mecanism, expecting the user to pool it from there ? Or, more precisely, do we want to do so (since I know how to do so ;)? Thanks a lot for this commit, I'll try to add this option soonish and release a new version right after. Bye, Mt. |