From a779f1300c54f01f62c0b1d9c6175906670237fe Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 23 Aug 2023 18:37:51 +0200 Subject: [PATCH] doc/reference.html: Style NULL in text as code consistently --- expat/doc/reference.html | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/expat/doc/reference.html b/expat/doc/reference.html index 2558361d..d26cd219 100644 --- a/expat/doc/reference.html +++ b/expat/doc/reference.html @@ -406,7 +406,7 @@ ensure are available for reporting via XML_GetInputContext will -always report NULL. Without this, Expat has a smaller memory +always report NULL. Without this, Expat has a smaller memory footprint and can be faster.
XML_STATIC
@@ -1003,9 +1003,9 @@ typedef struct {

Construct a new parser using the suite of memory handling functions -specified in ms. If ms is NULL, then use the +specified in ms. If ms is NULL, then use the standard set of memory management functions. If sep is -non NULL, then namespace processing is enabled in the created parser +non NULL, then namespace processing is enabled in the created parser and the character pointed at by sep is used as the separator between the namespace URI and the local part of the name.

@@ -1128,8 +1128,8 @@ XML_GetBuffer(XML_Parser p,
Obtain a buffer of size len to read a piece of the document -into. A NULL value is returned if Expat can't allocate enough memory for -this buffer. A NULL value may also be returned if len is zero. +into. A NULL value is returned if Expat can't allocate enough memory for +this buffer. A NULL value may also be returned if len is zero. This has to be called prior to every call to XML_ParseBuffer. A typical use would look like this: @@ -1275,7 +1275,7 @@ typedef struct {

Returns status of parser with respect to being initialized, parsing, finished, or suspended, and whether the final buffer is being processed. The status parameter must not be -NULL.

+NULL.

New in Expat 1.95.8.

@@ -1290,7 +1290,7 @@ to ignore all text not descended from a para element. One way it could do this is to set the character handler when a para start tag is seen, and unset it for the corresponding end tag.

-

A handler may be unset by providing a NULL pointer to the +

A handler may be unset by providing a NULL pointer to the appropriate handler setter. None of the handler setting functions have a return value.

@@ -1368,7 +1368,7 @@ is NOT null-terminated. You have to use the length argument to deal with the end of the string. A single block of contiguous text free of markup may still result in a sequence of calls to this handler. In other words, if you're searching for a pattern in the text, it may -be split across calls to this handler. Note: Setting this handler to NULL +be split across calls to this handler. Note: Setting this handler to NULL may NOT immediately terminate call-backs if the parser is currently processing such a single block of contiguous markup-free text, as the parser will continue calling back until the end of the block is reached.

@@ -1526,16 +1526,16 @@ the format expected by the context argument to XML_ExternalEntityParserCreate. code is valid only until the handler returns, so if the referenced entity is -to be parsed later, it must be copied. context is NULL +to be parsed later, it must be copied. context is NULL only when the entity is a parameter entity, which is how one can differentiate between general and parameter entities.

The base parameter is the base to use for relative system identifiers. It is set by XML_SetBase and may be NULL. The +href="#XML_SetBase">XML_SetBase and may be NULL. The publicId parameter is the public id given in the entity -declaration and may be NULL. systemId is the system -identifier specified in the entity declaration and is never NULL.

+declaration and may be NULL. systemId is the system +identifier specified in the entity declaration and is never NULL.

There are a couple of ways in which this handler differs from others. First, this handler returns a status indicator (an @@ -1564,10 +1564,10 @@ XML_SetExternalEntityRefHandlerArg(XML_Parser p,

Set the argument passed to the ExternalEntityRefHandler. If -arg is not NULL, it is the new value passed to the +arg is not NULL, it is the new value passed to the handler set using XML_SetExternalEntityRefHandler; if arg is -NULL, the argument passed to the handler function will be the parser +NULL, the argument passed to the handler function will be the parser object itself.

Note: @@ -1657,7 +1657,7 @@ string s is NOT null-terminated and points at the sequence of bytes to be converted.

The function pointed at by release is called by the -parser when it is finished with the encoding. It may be NULL.

+parser when it is finished with the encoding. It may be NULL.

@@ -1724,8 +1724,8 @@ typedef void

Sets a handler that is called for XML declarations and also for text declarations discovered in external entities. The way to -distinguish is that the version parameter will be NULL -for text declarations. The encoding parameter may be NULL +distinguish is that the version parameter will be NULL +for text declarations. The encoding parameter may be NULL for an XML declaration. The standalone argument will contain -1, 0, or 1 indicating respectively that there was no standalone parameter in the declaration, that it was given as no, or @@ -1749,7 +1749,7 @@ typedef void

Set a handler that is called at the start of a DOCTYPE declaration, before any external or internal subset is parsed. Both sysid -and pubid may be NULL. The has_internal_subset +and pubid may be NULL. The has_internal_subset will be non-zero if the DOCTYPE declaration has an internal subset.

@@ -1831,7 +1831,7 @@ around and freed at a later stage.

XML_Content nodes. If type equals XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be XML_CQUANT_NONE, and the other -fields will be zero or NULL. If type is +fields will be zero or NULL. If type is XML_CTYPE_MIXED, then quant will be XML_CQUANT_NONE or XML_CQUANT_REP and numchildren will contain the number of elements that are @@ -1843,7 +1843,7 @@ XML_CTYPE_NAME with no quantification. Only the root node can be type

For type XML_CTYPE_NAME, the name field points to the name and the numchildren and -children fields will be zero and NULL. The +children fields will be zero and NULL. The quant field will indicate any quantifiers placed on the name.

@@ -1879,11 +1879,11 @@ is in the attname parameter. The attribute type is in the type in the declaration with whitespace removed.

The dflt parameter holds the default value. It will be -NULL in the case of "#IMPLIED" or "#REQUIRED" attributes. You can +NULL in the case of "#IMPLIED" or "#REQUIRED" attributes. You can distinguish these two cases by checking the isrequired parameter, which will be true in the case of "#REQUIRED" attributes. Attributes which are "#FIXED" will have also have a true -isrequired, but they will have the non-NULL fixed value +isrequired, but they will have the non-NULL fixed value in the dflt parameter.

@@ -1911,14 +1911,14 @@ The is_parameter_entity argument will be non-zero in the case of parameter entities and zero otherwise.

For internal entities (<!ENTITY foo "bar">), -value will be non-NULL and systemId, -publicId, and notationName will all be NULL. -The value string is not NULL terminated; the length is +value will be non-NULL and systemId, +publicId, and notationName will all be NULL. +The value string is not NULL terminated; the length is provided in the value_length parameter. Do not use value_length to test for internal entities, since it is legal to have zero-length values. Instead check for whether or not -value is NULL.

The notationName -argument will have a non-NULL value only for unparsed entity +value is NULL.

The notationName +argument will have a non-NULL value only for unparsed entity declarations.

@@ -2093,7 +2093,7 @@ triggering a call spans over a very large amount of input, the actual parse position may be before the beginning of the buffer.

If XML_CONTEXT_BYTES is not defined, this will always -return NULL.

+return NULL.

Billion Laughs Attack Protection

@@ -2385,7 +2385,7 @@ called. The setting of parameter entity parsing, controlled using external entity reference handler set via XML_SetExternalEntityRefHandler with both -publicId and systemId set to NULL.

+publicId and systemId set to NULL.

If this function is called after parsing has begun, it returns XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING and ignores @@ -2506,7 +2506,7 @@ check these features to do so at runtime.

The return value is an array of XML_Feature, terminated by a record with a feature of -XML_FEATURE_END and name of NULL, +XML_FEATURE_END and name of NULL, identifying the feature-test macros Expat was compiled with. Since an application that requires this kind of information needs to determine the type of character the name points to, records for the @@ -2562,7 +2562,7 @@ XML_MemMalloc(XML_Parser parser, size_t size);

Allocate size bytes of memory using the allocator the parser object has been configured to use. Returns a -pointer to the memory or NULL on failure. Memory allocated in this +pointer to the memory or NULL on failure. Memory allocated in this way must be freed using XML_MemFree.
@@ -2577,9 +2577,9 @@ Allocate size bytes of memory using the allocator the parser object has been configured to use. ptr must point to a block of memory allocated by XML_MemMalloc or -XML_MemRealloc, or be NULL. This function tries to +XML_MemRealloc, or be NULL. This function tries to expand the block pointed to by ptr if possible. Returns -a pointer to the memory or NULL on failure. On success, the original +a pointer to the memory or NULL on failure. On success, the original block has either been expanded or freed. On failure, the original block has not been freed; the caller is responsible for freeing the original block. Memory allocated in this way must be freed using @@ -2595,7 +2595,7 @@ XML_MemFree(XML_Parser parser, void *ptr);
Free a block of memory pointed to by ptr. The block must have been allocated by XML_MemMalloc or XML_MemRealloc, or be NULL. +>XML_MemMalloc or XML_MemRealloc, or be NULL.