Skip to content

Commit

Permalink
os400: use like() for enum types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Monnerat authored and veillard committed May 1, 2016
1 parent 2e354d7 commit 91e2e69
Show file tree
Hide file tree
Showing 20 changed files with 125 additions and 59 deletions.
11 changes: 7 additions & 4 deletions os400/libxmlrpg/HTMLparser.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
/define HTML_PARSER_H__

/include "libxmlrpg/xmlversion"
/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/parser"

/if defined(LIBXML_HTML_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/parser"

* Most of the back-end structures from XML and HTML are shared.

d htmlParserCtxtPtr...
Expand Down Expand Up @@ -236,7 +237,8 @@
* to the xmlReadDoc() and similar calls.

d htmlParserOption...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d HTML_PARSE_RECOVER... Relaxed parsing
d c X'00000001'
d HTML_PARSE_NODEFDTD... No default doctype
Expand Down Expand Up @@ -350,7 +352,8 @@

* Further knowledge of HTML structure

d htmlStatus s 10i 0 based(######typedef######) enum
d htmlStatus s based(######typedef######)
d like(xmlCenum)
d HTML_NA c X'0000' No check at all
d HTML_INVALID c X'0001'
d HTML_DEPRECATED...
Expand Down
4 changes: 3 additions & 1 deletion os400/libxmlrpg/c14n.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/if defined(LIBXML_C14N_ENABLED)
/if defined(LIBXML_OUTPUT_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"
/include "libxmlrpg/xpath"

Expand Down Expand Up @@ -52,7 +53,8 @@
* Predefined values for C14N modes

d xmlBufferAllocationScheme...
d xmlC14NMode s 10i 0 based(######typedef######) enum
d xmlC14NMode s based(######typedef######)
d like(xmlCenum)
d XML_C14N_1_0 c 0 Original C14N 1.0
d XML_C14N_EXCLUSIVE_1_0... Exclusive C14N 1.0
d c 1
Expand Down
12 changes: 8 additions & 4 deletions os400/libxmlrpg/catalog.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
/define XML_CATALOG_H__

/include "libxmlrpg/xmlversion"
/include "libxmlrpg/xmlstring"
/include "libxmlrpg/tree"

/if defined(LIBXML_CATALOG_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/xmlstring"
/include "libxmlrpg/tree"

* XML_CATALOGS_NAMESPACE:
*
* The namespace for the XML Catalogs elements.
Expand All @@ -38,7 +40,8 @@
* The API is voluntarily limited to general cataloging.

d xmlCatalogPrefer...
d s 10u 0 based(######typedef######) enum type
d s based(######typedef######)
d like(xmlCenum)
d XML_CATA_PREFER_NONE...
d c 0
d XML_CATA_PREFER_PUBLIC...
Expand All @@ -47,7 +50,8 @@
d c 2

d xmlCatalogAllow...
d s 10u 0 based(######typedef######) enum type
d s based(######typedef######)
d like(xmlCenum)
d XML_CATA_ALLOW_NONE...
d c 0
d XML_CATA_ALLOW_GLOBAL...
Expand Down
4 changes: 3 additions & 1 deletion os400/libxmlrpg/encoding.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/define XML_CHAR_ENCODING_H__

/include "libxmlrpg/xmlversion"
/include "libxmlrpg/xmlTypesC"

* xmlCharEncoding:
*
Expand All @@ -43,7 +44,8 @@
* the specific UTF-16LE and UTF-16BE are present.
d xmlCharEncoding...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_CHAR_ENCODING_ERROR... No encoding detected
d c -1
d XML_CHAR_ENCODING_NONE... No encoding detected
Expand Down
4 changes: 3 additions & 1 deletion os400/libxmlrpg/entities.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
/define XML_ENTITIES_H__

/include "libxmlrpg/xmlversion"
/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"

* The different valid entity types.

d xmlEntityType s 10i 0 based(######typedef######) enum
d xmlEntityType s based(######typedef######)
d like(xmlCenum)
d XML_INTERNAL_GENERAL_ENTITY...
d c 1
d XML_EXTERNAL_GENERAL_PARSED_ENTITY...
Expand Down
12 changes: 8 additions & 4 deletions os400/libxmlrpg/parser.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
* The recursive one use the state info for entities processing.

d xmlParserInputState...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_PARSER_EOF... Nothing to parse
d c -1
d XML_PARSER_START... Nothing parsed
Expand Down Expand Up @@ -168,7 +169,8 @@
*
* A parser can operate in various modes

d xmlParserMode s 10i 0 based(######typedef######) enum
d xmlParserMode s based(######typedef######)
d like(xmlCenum)
d XML_PARSE_UNKNOWN...
d c 0
d XML_PARSE_DOM...
Expand Down Expand Up @@ -1194,7 +1196,8 @@
* to the xmlReadDoc() and similar calls.

d xmlParserOption...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_PARSE_RECOVER... Recover on errors
d c X'00000001'
d XML_PARSE_NOENT... Substitute entities
Expand Down Expand Up @@ -1347,7 +1350,8 @@
* or disabled at compile-time.
* They used to be called XML_FEATURE_xxx but this clashed with Expat

d xmlFeature s 10i 0 based(######typedef######) enum
d xmlFeature s based(######typedef######)
d like(xmlCenum)
d XML_WITH_THREAD...
d c 1
d XML_WITH_TREE c 2
Expand Down
9 changes: 6 additions & 3 deletions os400/libxmlrpg/pattern.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
/define XML_PATTERN_H__

/include "libxmlrpg/xmlversion"
/include "libxmlrpg/tree"
/include "libxmlrpg/dict"

/if defined(LIBXML_PATTERN_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"
/include "libxmlrpg/dict"

* xmlPattern:
*
* A compiled (XPath based) pattern to select nodes
Expand All @@ -28,7 +30,8 @@
* matching with this module

d xmlPatternFlags...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_PATTERN_DEFAULT... Simple pattern match
d c X'0000'
d XML_PATTERN_XPATH... Std XPath pattern
Expand Down
12 changes: 8 additions & 4 deletions os400/libxmlrpg/relaxng.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
/define XML_RELAX_NG__

/include "libxmlrpg/xmlversion"
/include "libxmlrpg/hash"
/include "libxmlrpg/xmlstring"

/if defined(LIBXML_SCHEMAS_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/hash"
/include "libxmlrpg/xmlstring"

d xmlRelaxNGPtr s * based(######typedef######)

* xmlRelaxNGValidityErrorFunc:
Expand Down Expand Up @@ -51,7 +53,8 @@
* List of possible Relax NG validation errors

d xmlRelaxNGValidErr...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_RELAXNG_OK...
d c 0
d XML_RELAXNG_ERR_MEMORY...
Expand Down Expand Up @@ -138,7 +141,8 @@
* List of possible Relax NG Parser flags

d xmlRelaxNGParserFlag...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_RELAXNGP_NONE...
d c 0
d XML_RELAXNGP_FREE_DOC...
Expand Down
11 changes: 8 additions & 3 deletions os400/libxmlrpg/schemasInternals.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
/include "libxmlrpg/xmlversion"

/if defined(LIBXML_SCHEMAS_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/xmlregexp"
/include "libxmlrpg/hash"
/include "libxmlrpg/dict"

d xmlSchemaValType...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_SCHEMAS_UNKNOWN...
d c 0
d XML_SCHEMAS_STRING...
Expand Down Expand Up @@ -119,7 +122,8 @@
* XML Schemas defines multiple type of types.

d xmlSchemaTypeType...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_SCHEMA_TYPE_BASIC... A builtin datatype
d c 1
d XML_SCHEMA_TYPE_ANY...
Expand Down Expand Up @@ -202,7 +206,8 @@
d c 2001

d xmlSchemaContentType...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_SCHEMA_CONTENT_UNKNOWN...
d c 0
d XML_SCHEMA_CONTENT_EMPTY...
Expand Down
4 changes: 3 additions & 1 deletion os400/libxmlrpg/schematron.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@

/if defined(LIBXML_SCHEMATRON_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"

d xmlSchematronValidOptions...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_SCHEMATRON_OUT_QUIET... Quiet no report
d c X'0001'
d XML_SCHEMATRON_OUT_TEXT... Build textual report
Expand Down
24 changes: 16 additions & 8 deletions os400/libxmlrpg/tree.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
* need or double it's allocated size each time it is found too small.

d xmlBufferAllocationScheme...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_BUFFER_ALLOC_DOUBLEIT...
d c 0
d XML_BUFFER_ALLOC_EXACT...
Expand Down Expand Up @@ -150,7 +151,8 @@
* Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
* be deprecated to use an XML_DTD_NODE.

d xmlElementType s 10i 0 based(######typedef######) enum
d xmlElementType s based(######typedef######)
d like(xmlCenum)
d XML_ELEMENT_NODE...
d c 1
d XML_ATTRIBUTE_NODE...
Expand Down Expand Up @@ -212,7 +214,8 @@
* A DTD Attribute type definition.

d xmlAttributeType...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_ATTRIBUTE_CDATA...
d c 1
d XML_ATTRIBUTE_ID...
Expand All @@ -239,7 +242,8 @@
* A DTD Attribute default definition.

d xmlAttributeDefault...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_ATTRIBUTE_NONE...
d c 1
d XML_ATTRIBUTE_REQUIRED...
Expand Down Expand Up @@ -298,7 +302,8 @@
* Possible definitions of element content types.

d xmlElementContentType...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_ELEMENT_CONTENT_PCDATA...
d c 1
d XML_ELEMENT_CONTENT_ELEMENT...
Expand All @@ -313,7 +318,8 @@
* Possible definitions of element content occurrences.

d xmlElementContentOccur...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_ELEMENT_CONTENT_ONCE...
d c 1
d XML_ELEMENT_CONTENT_OPT...
Expand Down Expand Up @@ -347,7 +353,8 @@
* The different possibilities for an element content type.

d xmlElementTypeVal...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_ELEMENT_TYPE_UNDEFINED...
d c 0
d XML_ELEMENT_TYPE_EMPTY...
Expand Down Expand Up @@ -515,7 +522,8 @@
* Some of them are linked to similary named xmlParserOption

d xmlDocProperties...
d s 10i 0 based(######typedef######) enum
d s based(######typedef######)
d like(xmlCenum)
d XML_DOC_WELLFORMED...
d c X'00000001'
d XML_DOC_NSVALID...
Expand Down
13 changes: 9 additions & 4 deletions os400/libxmlrpg/xlink.rpgle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
/define XML_XLINK_H__

/include "libxmlrpg/xmlversion"
/include "libxmlrpg/tree"

/if defined(LIBXML_XPTR_ENABLED)

/include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"

* Various defines for the various Link properties.
*
* NOTE: the link detection layer will try to resolve QName expansion
Expand All @@ -26,7 +28,8 @@
d xlinkRole s * based(######typedef######) xmlChar *
d xlinkTitle s * based(######typedef######) xmlChar *

d xlinkType s 10i 0 based(######typedef######) enum
d xlinkType s based(######typedef######)
d like(xmlCenum)
d XLINK_TYPE_NONE...
d c 0
d XLINK_TYPE_SIMPLE...
Expand All @@ -36,7 +39,8 @@
d XLINK_TYPE_EXTENDED_SET...
d c 3

d xlinkShow s 10i 0 based(######typedef######) enum
d xlinkShow s based(######typedef######)
d like(xmlCenum)
d XLINK_SHOW_NONE...
d c 0
d XLINK_SHOW_NEW...
Expand All @@ -46,7 +50,8 @@
d XLINK_SHOW_REPLACE...
d c 3

d xlinkActuate s 10i 0 based(######typedef######) enum
d xlinkActuate s based(######typedef######)
d like(xmlCenum)
d XLINK_ACTUATE_NONE...
d c 0
d XLINK_ACTUATE_AUTO...
Expand Down
Loading

0 comments on commit 91e2e69

Please sign in to comment.