miniupnpc-libevent: update minixml.c/.h
This commit is contained in:
parent
459882f4b3
commit
88e3271ad6
|
@ -1,10 +1,11 @@
|
||||||
/* $Id: minixml.c,v 1.11 2014/02/03 15:54:12 nanard Exp $ */
|
/* $Id: minixml.c,v 1.12 2017/12/12 11:17:40 nanard Exp $ */
|
||||||
/* minixml.c : the minimum size a xml parser can be ! */
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
||||||
|
* minixml.c : the minimum size a xml parser can be ! */
|
||||||
/* Project : miniupnp
|
/* Project : miniupnp
|
||||||
* webpage: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* webpage: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* Author : Thomas Bernard
|
* Author : Thomas Bernard
|
||||||
|
|
||||||
Copyright (c) 2005-2014, Thomas BERNARD
|
Copyright (c) 2005-2017, Thomas BERNARD
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -161,7 +162,8 @@ static void parseelt(struct xmlparser * p)
|
||||||
if (p->xml >= p->xmlend)
|
if (p->xml >= p->xmlend)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(memcmp(p->xml, "<![CDATA[", 9) == 0)
|
/* CDATA are at least 9 + 3 characters long : <![CDATA[ ]]> */
|
||||||
|
if((p->xmlend >= (p->xml + (9 + 3))) && (memcmp(p->xml, "<![CDATA[", 9) == 0))
|
||||||
{
|
{
|
||||||
/* CDATA handling */
|
/* CDATA handling */
|
||||||
p->xml += 9;
|
p->xml += 9;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: minixml.h,v 1.7 2012/09/27 15:42:10 nanard Exp $ */
|
/* $Id: minixml.h,v 1.8 2019/02/10 12:29:25 nanard Exp $ */
|
||||||
/* minimal xml parser
|
/* minimal xml parser
|
||||||
*
|
*
|
||||||
* Project : miniupnp
|
* Project : miniupnp
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
* */
|
* */
|
||||||
#ifndef MINIXML_H_INCLUDED
|
#ifndef MINIXML_H_INCLUDED
|
||||||
#define MINIXML_H_INCLUDED
|
#define MINIXML_H_INCLUDED
|
||||||
#define IS_WHITE_SPACE(c) ((c==' ') || (c=='\t') || (c=='\r') || (c=='\n'))
|
#define IS_WHITE_SPACE(c) ((c)==' ' || (c)=='\t' || (c)=='\r' || (c)=='\n')
|
||||||
|
|
||||||
/* if a callback function pointer is set to NULL,
|
/* if a callback function pointer is set to NULL,
|
||||||
* the function is not called */
|
* the function is not called */
|
||||||
|
|
Loading…
Reference in New Issue