Conversation
GitMensch
left a comment
There was a problem hiding this comment.
just a quick note for the first iteration; note that Chucks changes are based on mlio from August 2025, so the "real" version may be easier to get by checking out a previous commit, then replace the file and commit locally, then fetch the newer commit with rebase-merging
|
@chuck-haatvedt passed me the newest file (you may do a diff to add a changelog entry) which looks much better concerning libxml version compat. It is from November 14th: mlio.c with a note
|
GitMensch
left a comment
There was a problem hiding this comment.
Thanks for inspecting / working on necessary changes.
I think we can have those in at least a second commit :-)
This is work by Chuck Haatvedt edited by David Declerck. * mlio.c: modified to support xml parse with xmlss. eliminated the xml_event_data structure and moved that data into the xml_event structure. Created a new enum cob_xml_registers and added it to the add_xml_event_data function. This function was modified to update the xml_event structure. All of the context parser callback functions were modified to use the add_xml_event_data function. the cob_xml_parse and xml_parse functions were modified to support the new end_of_input event required by xmlss. a new eof variable was added to the xml_state structure so that the endDocument callback function could be triggered by the parser in the xml_parse funtction. TODO ==> logic needs to be added to support returning NATIONAL data this needs to support the RETURNING NATIONAL phrase.
* common.h: rename COB_XML_PARSE_XMLNSS into COB_XML_PARSE_XMLSS to match the IBM option name * mlio.c [WITH_XML2]: Fix issues in XML PARSE handling most notably a use after free error if the internal buffer needs to grow during the parsing. Respect the high order half-word for exception XML-CODE. Reduce the number of parsing states by removing useless ones, and encode eof in these states. Handle XML chunks with more than one recoverable error. Trigger ON EXCEPTION code after EXCEPTION XML events. * parser.y: remove the CB_PENDING warning on XML PARSE but still warn for untested XML PARSE RETURNING NATIONAL and XML PARSE VALIDATING. * typeck.c: remove invalid call to cob_check_based for XML-* builtin variable length registers (like XML-TEXT) * codegen.c: remove the uninitialized and unused b_* field for XML-* builtin variable length registers
|
I am taking the responsibility for this PR on OCamlPro's behalf. I applied changes according to your comments and fixed several issues. @GitMensch: is this new version more satisfying ? |
Note: initial commit from Chuck, fixes to come