42
42
*/
43
43
44
44
#ifndef Expat_INCLUDED
45
- #define Expat_INCLUDED 1
45
+ # define Expat_INCLUDED 1
46
46
47
- #include < stdlib.h>
48
- #include " expat_external.h"
47
+ # include < stdlib.h>
48
+ # include " expat_external.h"
49
49
50
- #ifdef __cplusplus
50
+ # ifdef __cplusplus
51
51
extern " C" {
52
- #endif
52
+ # endif
53
53
54
54
struct XML_ParserStruct ;
55
55
typedef struct XML_ParserStruct *XML_Parser;
56
56
57
57
typedef unsigned char XML_Bool;
58
- #define XML_TRUE ((XML_Bool)1 )
59
- #define XML_FALSE ((XML_Bool)0 )
58
+ # define XML_TRUE ((XML_Bool)1 )
59
+ # define XML_FALSE ((XML_Bool)0 )
60
60
61
61
/* The XML_Status enum gives the possible return values for several
62
62
API functions. The preprocessor #defines are included so this
@@ -73,11 +73,11 @@ typedef unsigned char XML_Bool;
73
73
*/
74
74
enum XML_Status {
75
75
XML_STATUS_ERROR = 0 ,
76
- #define XML_STATUS_ERROR XML_STATUS_ERROR
76
+ # define XML_STATUS_ERROR XML_STATUS_ERROR
77
77
XML_STATUS_OK = 1 ,
78
- #define XML_STATUS_OK XML_STATUS_OK
78
+ # define XML_STATUS_OK XML_STATUS_OK
79
79
XML_STATUS_SUSPENDED = 2
80
- #define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
80
+ # define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
81
81
};
82
82
83
83
enum XML_Error {
@@ -680,7 +680,7 @@ XMLPARSEAPI(void)
680
680
XML_SetUserData(XML_Parser parser, void *userData);
681
681
682
682
/* Returns the last value set by XML_SetUserData or NULL. */
683
- #define XML_GetUserData (parser ) (*(void **)(parser))
683
+ # define XML_GetUserData (parser ) (*(void **)(parser))
684
684
685
685
/* This is equivalent to supplying an encoding argument to
686
686
XML_ParserCreate. On success XML_SetEncoding returns non-zero,
@@ -752,7 +752,7 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
752
752
XMLPARSEAPI (int )
753
753
XML_GetIdAttributeIndex(XML_Parser parser);
754
754
755
- #ifdef XML_ATTR_INFO
755
+ # ifdef XML_ATTR_INFO
756
756
/* Source file byte offsets for the start and end of attribute names and values.
757
757
The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
758
758
file an attribute value of "blah" will yield:
@@ -773,7 +773,7 @@ typedef struct {
773
773
*/
774
774
XMLPARSEAPI (const XML_AttrInfo *)
775
775
XML_GetAttributeInfo(XML_Parser parser);
776
- #endif
776
+ # endif
777
777
778
778
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
779
779
detected. The last call to XML_Parse must have isFinal true; len
@@ -970,9 +970,9 @@ XMLPARSEAPI(const char *)
970
970
XML_GetInputContext(XML_Parser parser, int *offset, int *size);
971
971
972
972
/* For backwards compatibility with previous versions. */
973
- #define XML_GetErrorLineNumber XML_GetCurrentLineNumber
974
- #define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
975
- #define XML_GetErrorByteIndex XML_GetCurrentByteIndex
973
+ # define XML_GetErrorLineNumber XML_GetCurrentLineNumber
974
+ # define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
975
+ # define XML_GetErrorByteIndex XML_GetCurrentByteIndex
976
976
977
977
/* Frees the content model passed to the element declaration handler */
978
978
XMLPARSEAPI (void )
@@ -1032,7 +1032,10 @@ enum XML_FeatureEnum {
1032
1032
XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT,
1033
1033
XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT,
1034
1034
/* Added in Expat 2.6.0. */
1035
- XML_FEATURE_GE
1035
+ XML_FEATURE_GE,
1036
+ /* Added in Expat 2.7.2. */
1037
+ XML_FEATURE_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION_DEFAULT,
1038
+ XML_FEATURE_ALLOC_TRACKER_ACTIVATION_THRESHOLD_DEFAULT,
1036
1039
/* Additional features must be added to the end of this enum. */
1037
1040
};
1038
1041
@@ -1045,7 +1048,7 @@ typedef struct {
1045
1048
XMLPARSEAPI (const XML_Feature *)
1046
1049
XML_GetFeatureList(void );
1047
1050
1048
- #if defined(XML_DTD) || (defined(XML_GE) && XML_GE == 1)
1051
+ # if defined(XML_DTD) || (defined(XML_GE) && XML_GE == 1)
1049
1052
/* Added in Expat 2.4.0 for XML_DTD defined and
1050
1053
* added in Expat 2.6.0 for XML_GE == 1. */
1051
1054
XMLPARSEAPI (XML_Bool)
@@ -1057,7 +1060,17 @@ XML_SetBillionLaughsAttackProtectionMaximumAmplification(
1057
1060
XMLPARSEAPI (XML_Bool)
1058
1061
XML_SetBillionLaughsAttackProtectionActivationThreshold(
1059
1062
XML_Parser parser, unsigned long long activationThresholdBytes);
1060
- #endif
1063
+
1064
+ /* Added in Expat 2.7.2. */
1065
+ XMLPARSEAPI (XML_Bool)
1066
+ XML_SetAllocTrackerMaximumAmplification(XML_Parser parser,
1067
+ float maximumAmplificationFactor);
1068
+
1069
+ /* Added in Expat 2.7.2. */
1070
+ XMLPARSEAPI (XML_Bool)
1071
+ XML_SetAllocTrackerActivationThreshold(
1072
+ XML_Parser parser, unsigned long long activationThresholdBytes);
1073
+ # endif
1061
1074
1062
1075
/* Added in Expat 2.6.0. */
1063
1076
XMLPARSEAPI (XML_Bool)
@@ -1066,12 +1079,12 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
1066
1079
/* Expat follows the semantic versioning convention.
1067
1080
See https://semver.org
1068
1081
*/
1069
- #define XML_MAJOR_VERSION 2
1070
- #define XML_MINOR_VERSION 7
1071
- #define XML_MICRO_VERSION 1
1082
+ # define XML_MAJOR_VERSION 2
1083
+ # define XML_MINOR_VERSION 7
1084
+ # define XML_MICRO_VERSION 2
1072
1085
1073
- #ifdef __cplusplus
1086
+ # ifdef __cplusplus
1074
1087
}
1075
- #endif
1088
+ # endif
1076
1089
1077
1090
#endif /* not Expat_INCLUDED */
0 commit comments