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 */
11 #include <host/typedefs.h>
18 #define FREE(Area) free(Area)
19 #define MALLOC(Size) malloc(Size)
20 #define ZEROMEMORY(Area, Size) memset((Area), '\0', (Size))
21 #define MEMCPY(Dest, Src, Size) memcpy((Dest), (Src), (Size))
23 #define INF_STATUS_SUCCESS 0
24 #define INF_STATUS_NO_MEMORY ENOMEM
25 #define INF_STATUS_INVALID_PARAMETER EINVAL
26 #define INF_STATUS_NOT_FOUND ENOENT
27 #define INF_STATUS_BUFFER_OVERFLOW E2BIG
28 #define INF_SUCCESS(x) (0 == (x))
30 typedef char TCHAR
, *PTCHAR
, *PTSTR
;
32 #define _tcsicmp strcasecmp
33 #define _tcslen strlen
34 #define _tcscpy strcpy
35 #define _tcstoul strtoul
36 #define _tcstol strtol
40 #define strcasecmp _stricmp
43 #else /* ! defined(INFLIB_HOST) */
45 /* ReactOS definitions */
50 #define WIN32_NO_STATUS
52 #define NTOS_MODE_USER
53 #include <ndk/ntndk.h>
55 extern PVOID InfpHeap
;
57 #define FREE(Area) RtlFreeHeap(InfpHeap, 0, (Area))
58 #define MALLOC(Size) RtlAllocateHeap(InfpHeap, 0, (Size))
59 #define ZEROMEMORY(Area, Size) RtlZeroMemory((Area), (Size))
60 #define MEMCPY(Dest, Src, Size) RtlCopyMemory((Dest), (Src), (Size))
62 #define INF_STATUS_SUCCESS STATUS_SUCCESS
63 #define INF_STATUS_NO_MEMORY STATUS_NO_MEMORY
64 #define INF_STATUS_INVALID_PARAMETER STATUS_INVALID_PARAMETER
65 #define INF_STATUS_NOT_FOUND STATUS_NOT_FOUND
66 #define INF_STATUS_BUFFER_OVERFLOW STATUS_BUFFER_OVERFLOW
67 #define INF_SUCCESS(x) (0 <= (x))
71 #endif /* INFLIB_HOST */
73 typedef const TCHAR
*PCTSTR
;