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
48 #define strcasecmp stricmp
51 extern unsigned long DbgPrint(char *Fmt
, ...);
53 #else /* ! defined(INFLIB_HOST) */
55 /* ReactOS definitions */
60 #define WIN32_NO_STATUS
62 #define NTOS_MODE_USER
63 #include <ndk/ntndk.h>
65 extern PVOID InfpHeap
;
67 #define FREE(Area) RtlFreeHeap(InfpHeap, 0, (Area))
68 #define MALLOC(Size) RtlAllocateHeap(InfpHeap, 0, (Size))
69 #define ZEROMEMORY(Area, Size) RtlZeroMemory((Area), (Size))
70 #define MEMCPY(Dest, Src, Size) RtlCopyMemory((Dest), (Src), (Size))
72 #define INF_STATUS_SUCCESS STATUS_SUCCESS
73 #define INF_STATUS_NO_MEMORY STATUS_NO_MEMORY
74 #define INF_STATUS_INVALID_PARAMETER STATUS_INVALID_PARAMETER
75 #define INF_STATUS_NOT_FOUND STATUS_NOT_FOUND
76 #define INF_STATUS_BUFFER_OVERFLOW STATUS_BUFFER_OVERFLOW
77 #define INF_SUCCESS(x) (0 <= (x))
81 #endif /* INFLIB_HOST */
83 typedef const TCHAR
*PCTSTR
;