faee96e7bedebe8596f7d156c7cc5f6966a7c074
2 * PROJECT: .inf file parser
3 * LICENSE: GPL - See COPYING in the top level directory
4 * COPYRIGHT: Copyright 2005 Ge van Geldorp <gvg@reactos.org>
9 /* Definitions native to the host on which we're building */
19 #define FREE(Area) free(Area)
20 #define MALLOC(Size) malloc(Size)
21 #define ZEROMEMORY(Area, Size) memset((Area), '\0', (Size))
22 #define MEMCPY(Dest, Src, Size) memcpy((Dest), (Src), (Size))
24 #define INF_STATUS_SUCCESS 0
25 #define INF_STATUS_NO_MEMORY ENOMEM
26 #define INF_STATUS_INVALID_PARAMETER EINVAL
27 #define INF_STATUS_NOT_FOUND ENOENT
28 #define INF_STATUS_BUFFER_OVERFLOW E2BIG
29 #define INF_SUCCESS(x) (0 == (x))
31 typedef char CHAR
, *PCHAR
;
32 typedef unsigned char UCHAR
, *PUCHAR
;
33 typedef long LONG
, *PLONG
;
34 typedef unsigned long ULONG
, *PULONG
;
35 typedef void VOID
, *PVOID
;
36 typedef UCHAR BOOLEAN
, *PBOOLEAN
;
38 typedef char TCHAR
, *PTCHAR
, *PTSTR
;
40 #define _tcsicmp strcasecmp
41 #define _tcslen strlen
42 #define _tcscpy strcpy
43 #define _tcstoul strtoul
44 #define _tcstol strtol
47 extern void DbgPrint(const char *Fmt
, ...);
49 #else /* ! defined(INFLIB_HOST) */
51 /* ReactOS definitions */
56 #define WIN32_NO_STATUS
58 #define NTOS_MODE_USER
59 #include <ndk/ntndk.h>
61 extern PVOID InfpHeap
;
63 #define FREE(Area) RtlFreeHeap(InfpHeap, 0, (Area))
64 #define MALLOC(Size) RtlAllocateHeap(InfpHeap, 0, (Size))
65 #define ZEROMEMORY(Area, Size) RtlZeroMemory((Area), (Size))
66 #define MEMCPY(Dest, Src, Size) RtlCopyMemory((Dest), (Src), (Size))
68 #define INF_STATUS_SUCCESS STATUS_SUCCESS
69 #define INF_STATUS_NO_MEMORY STATUS_NO_MEMORY
70 #define INF_STATUS_INVALID_PARAMETER STATUS_INVALID_PARAMETER
71 #define INF_STATUS_NOT_FOUND STATUS_NOT_FOUND
72 #define INF_STATUS_BUFFER_OVERFLOW STATUS_BUFFER_OVERFLOW
73 #define INF_SUCCESS(x) (0 <= (x))
77 #endif /* INFLIB_HOST */
79 typedef const TCHAR
*PCTSTR
;