1999-02-27 04:41:01 +03:00
|
|
|
/*
|
2000-08-30 04:17:14 +04:00
|
|
|
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
|
|
|
See the file copying.txt for copying permission.
|
1999-02-27 04:41:01 +03:00
|
|
|
*/
|
|
|
|
|
1999-04-04 09:50:50 +04:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#ifdef XML_WINLIB
|
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#define STRICT
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#define malloc(x) HeapAlloc(GetProcessHeap(), 0, (x))
|
|
|
|
#define calloc(x, y) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (x)*(y))
|
|
|
|
#define free(x) HeapFree(GetProcessHeap(), 0, (x))
|
|
|
|
#define realloc(x, y) HeapReAlloc(GetProcessHeap(), 0, x, y)
|
|
|
|
#define abort() /* as nothing */
|
|
|
|
|
|
|
|
#else /* not XML_WINLIB */
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#endif /* not XML_WINLIB */
|
|
|
|
|
1999-02-27 04:41:01 +03:00
|
|
|
/* This file can be used for any definitions needed in
|
|
|
|
particular environments. */
|
|
|
|
|
2000-08-30 04:17:14 +04:00
|
|
|
/* Mozilla specific defines */
|
|
|
|
|
1999-08-26 04:18:25 +04:00
|
|
|
#ifdef MOZILLA_CLIENT
|
1999-02-27 04:41:01 +03:00
|
|
|
|
|
|
|
#include "nspr.h"
|
1999-08-10 03:52:45 +04:00
|
|
|
#define malloc(x) PR_Malloc((size_t)(x))
|
|
|
|
#define realloc(x, y) PR_Realloc((x), (size_t)(y))
|
1999-02-27 04:41:01 +03:00
|
|
|
#define calloc(x, y) PR_Calloc((x),(y))
|
|
|
|
#define free(x) PR_Free(x)
|
1999-08-10 02:51:53 +04:00
|
|
|
#if PR_BYTES_PER_INT != 4
|
2000-08-30 04:17:14 +04:00
|
|
|
#define int int32
|
1999-08-10 02:51:53 +04:00
|
|
|
#endif
|
2001-03-10 10:27:16 +03:00
|
|
|
#define abort() /* as nothing */
|
1999-08-10 02:51:53 +04:00
|
|
|
|
2000-08-30 04:17:14 +04:00
|
|
|
/* Enable Unicode string processing in expat. */
|
|
|
|
#ifndef XML_UNICODE
|
1999-04-23 00:51:47 +04:00
|
|
|
#define XML_UNICODE
|
2000-08-30 04:17:14 +04:00
|
|
|
#endif
|
1999-07-17 01:54:04 +04:00
|
|
|
|
2000-08-30 04:17:14 +04:00
|
|
|
/* Enable external parameter entity parsing in expat */
|
1999-07-17 01:54:04 +04:00
|
|
|
#ifndef XML_DTD
|
|
|
|
#define XML_DTD 1
|
1999-07-17 04:34:16 +04:00
|
|
|
#endif
|
1999-08-26 04:18:25 +04:00
|
|
|
|
2000-12-12 23:23:50 +03:00
|
|
|
#ifdef IS_LITTLE_ENDIAN
|
|
|
|
#define XML_BYTE_ORDER 12
|
|
|
|
#else
|
|
|
|
#define XML_BYTE_ORDER 21
|
|
|
|
#endif /* IS_LITTLE_ENDIAN */
|
|
|
|
|
2000-08-30 04:17:14 +04:00
|
|
|
#endif /* MOZILLA_CLIENT */
|