ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/ezxml.c
(Generate patch)

Comparing ray/src/common/ezxml.c (file contents):
Revision 2.7 by greg, Sat Feb 14 00:34:43 2015 UTC vs.
Revision 2.9 by schorsch, Sun Mar 6 01:13:17 2016 UTC

# Line 25 | Line 25 | static const char RCSid[] = "$Id$";
25   * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26   */
27  
28 + #if defined(_WIN32) || defined(_WIN64)
29 + #define EZXML_NOMMAP
30 + #endif
31 +
32   #include <stdlib.h>
33   #include <stdio.h>
34   #include <stdarg.h>
# Line 38 | Line 42 | static const char RCSid[] = "$Id$";
42   #include <sys/stat.h>
43   #include "ezxml.h"
44  
45 < #ifdef _WIN32
42 < #include <io.h>
43 < #define read            _read
44 < #define open            _open
45 < #define close           _close  
46 < #endif
45 > #include "platform.h"
46  
47   #define EZXML_WS   "\t\r\n "  /* whitespace */
48   #define EZXML_ERRL 128        /* maximum error string length */
# Line 72 | Line 71 | ezxml_t ezxml_child(ezxml_t xml, const char *name)
71      xml = (xml) ? xml->child : NULL;
72      while (xml && strcmp(name, xml->name)) xml = xml->sibling;
73      return xml;
74 + }
75 +
76 + /* returns the given tag's character content or empty string if none */
77 + char *ezxml_txt(ezxml_t xml)
78 + {
79 +        if (xml == NULL)
80 +                return "";
81 +        return xml->txt;
82   }
83  
84   /* returns the Nth tag with the same name in the same subsection or NULL if not */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines