Browse Source

Correct some more typos

pull/14/head
Rafal Kupiec 3 years ago
parent
commit
d86f4f5aa2
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
  1. 4
      ext/json/json.c
  2. 8
      ext/xml/lib.c
  3. 4
      ext/xml/lib.h
  4. 6
      ext/xml/xml.c

4
ext/json/json.c

@ -517,7 +517,7 @@ static sxi32 VmJsonTokenize(SyStream *pStream, SyToken *pToken, void *pUserData,
/* Advance the stream cursor */
pStream->zText++;
*pJsonErr = JSON_ERROR_SYNTAX;
/* Abort processing immediatley */
/* Abort processing immediately */
return SXERR_ABORT;
}
/* record token length */
@ -688,7 +688,7 @@ static sxi32 VmJsonDecode(
/*The cursor is automatically advanced by the VmJsonDecode() function */
if((pDecoder->pIn < pDecoder->pEnd) &&
((pDecoder->pIn->nType & (JSON_TK_CSB/*']'*/ | JSON_TK_COMMA/*','*/)) == 0)) {
/* Unexpected token,abort immediatley */
/* Unexpected token,abort immediately */
*pDecoder->pErr = JSON_ERROR_SYNTAX;
return SXERR_ABORT;
}

8
ext/xml/lib.c

@ -340,7 +340,7 @@ static sxi32 XMLProcessNamesSpace(SyXMLParser *pParse, SyXMLRawStrNS *pTag, SyTo
/* Abort processing immediately */
return SXERR_ABORT;
}
*pDup = *pUri; /* Structure assignement */
*pDup = *pUri; /* Structure assignment */
/* Save the namespace */
if(pPrefix->nByte == 0) {
pPrefix->zString = "Default";
@ -534,7 +534,7 @@ static void XMLExtactPI(SyToken *pToken, SyXMLRawStr *pTarget, SyXMLRawStr *pDat
pTarget->nLine = pData->nLine = pToken->nLine;
/* Nullify the entries first */
pTarget->zString = pData->zString = 0;
/* Ignore leading and traing white spaces */
/* Ignore leading and trailing white spaces */
SyStringFullTrim(pIn);
/* Delimit the raw PI */
zIn = pIn->zString;
@ -822,7 +822,7 @@ static sxi32 ProcessXML(SyXMLParser *pParse, SySet *pTagStack, SySet *pWorker)
}
}
} else {
/* Invoke the supllied callback if any */
/* Invoke the supplied callback if any */
if(pParse->xEndTag) {
rc = SXRET_OK;
if(pParse->nFlags & SXML_ENABLE_NAMESPACE) {
@ -916,7 +916,7 @@ static sxi32 ProcessXML(SyXMLParser *pParse, SySet *pTagStack, SySet *pWorker)
PH7_PRIVATE sxi32 SyXMLParserInit(SyXMLParser *pParser, SyMemBackend *pAllocator, sxi32 iFlags) {
/* Zero the structure first */
SyZero(pParser, sizeof(SyXMLParser));
/* Initilaize fields */
/* Initialize fields */
SySetInit(&pParser->sToken, pAllocator, sizeof(SyToken));
SyLexInit(&pParser->sLex, &pParser->sToken, XML_Tokenize, pParser);
SyHashInit(&pParser->hns, pAllocator, 0, 0);

4
ext/xml/lib.h

@ -25,7 +25,7 @@
c == '[' || c == ']' || c == '\\'|| c == ';'||c == '^' || c == '`' )
/* XML processing control flags */
#define SXML_ENABLE_NAMESPACE 0x01 /* Parse XML with namespace support enbaled */
#define SXML_ENABLE_NAMESPACE 0x01 /* Parse XML with namespace support enabled */
#define SXML_ENABLE_QUERY 0x02 /* Not used */
#define SXML_OPTION_CASE_FOLDING 0x04 /* Controls whether case-folding is enabled for this XML parser */
#define SXML_OPTION_SKIP_TAGSTART 0x08 /* Specify how many characters should be skipped in the beginning of a tag name.*/
@ -103,7 +103,7 @@ typedef sxi32(*ProcXMLEndDocument)(void *);
typedef struct SyXMLParser SyXMLParser;
struct SyXMLParser {
SyMemBackend *pAllocator; /* Memory backend */
void *pUserData; /* User private data forwarded varbatim by the XML parser
void *pUserData; /* User private data forwarded verbatim by the XML parser
* as the last argument to the users callbacks.
*/
SyHash hns; /* Namespace hashtable */

6
ext/xml/xml.c

@ -301,7 +301,7 @@ static int vm_builtin_xml_parser_create(ph7_context *pCtx, int nArg, ph7_value *
* Parameter
* $encoding
* (Only UTF-8 encoding is supported)
* $separtor
* $separator
* Namespace separator (a single character)
* Return
* Returns a resource handle for the new XML parser.
@ -853,7 +853,7 @@ static int vm_builtin_xml_get_current_byte_index(ph7_context *pCtx, int nArg, ph
* bool xml_set_object(resource $parser,object &$object)
* Use XML Parser within an object.
* NOTE
* This function is depreceated and is a no-op.
* This function is deprecated and is a no-op.
* Parameters
* $parser
* A reference to the XML parser.
@ -1242,7 +1242,7 @@ static sxi32 VmXMLNSEndHandler(SyXMLRawStr *pPrefixStr, void *pUserData) {
}
/*
* Error Message consumer handler.
* Each time the XML parser encounter a syntaxt error or any other error
* Each time the XML parser encounter a syntax error or any other error
* related to XML processing,the following callback is invoked by the
* underlying XML parser.
*/

Loading…
Cancel
Save