Author: janderwald
Date: Sun Feb 20 16:50:38 2011
New Revision: 50834
URL:
http://svn.reactos.org/svn/reactos?rev=50834&view=rev
Log:
[USETUP]
- Get rid of indirection
See issue #5190 for more details.
Modified:
trunk/reactos/base/setup/usetup/inffile.c
trunk/reactos/base/setup/usetup/inffile.h
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/registry.c
trunk/reactos/base/setup/usetup/usetup.h
trunk/reactos/lib/inflib/infros.h
Modified: trunk/reactos/base/setup/usetup/inffile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/inffile.…
==============================================================================
--- trunk/reactos/base/setup/usetup/inffile.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/inffile.c [iso-8859-1] Sun Feb 20 16:50:38 2011
@@ -39,13 +39,6 @@
#ifdef __REACTOS__
-VOID WINAPI
-InfpCloseInfFile(
- IN HINF InfHandle)
-{
- InfCloseFile(InfHandle);
-}
-
BOOL WINAPI
InfpFindFirstLineW(
IN HINF InfHandle,
@@ -63,28 +56,6 @@
memcpy(Context, pContext, sizeof(INFCONTEXT));
InfFreeContext(pContext);
return TRUE;
-}
-
-BOOL WINAPI
-InfpGetMultiSzFieldW(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT PWSTR ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize)
-{
- return InfGetMultiSzField(Context, FieldIndex, ReturnBuffer, ReturnBufferSize,
RequiredSize);
-}
-
-BOOL WINAPI
-InfpGetStringFieldW(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT PWSTR ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize)
-{
- return InfGetStringField(Context, FieldIndex, ReturnBuffer, ReturnBufferSize,
RequiredSize);
}
HINF WINAPI
@@ -238,12 +209,4 @@
#endif /* !__REACTOS__ */
}
-VOID INF_SetHeap(
- IN PVOID Heap)
-{
-#ifdef __REACTOS__
- InfSetHeap(Heap);
-#endif
-}
-
/* EOF */
Modified: trunk/reactos/base/setup/usetup/inffile.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/inffile.…
==============================================================================
--- trunk/reactos/base/setup/usetup/inffile.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/inffile.h [iso-8859-1] Sun Feb 20 16:50:38 2011
@@ -34,14 +34,9 @@
#include <infcommon.h>
-#define SetupCloseInfFile InfpCloseInfFile
#define SetupFindFirstLineW InfpFindFirstLineW
-#define SetupFindNextLine InfFindNextLine
-#define SetupGetBinaryField InfGetBinaryField
#define SetupGetFieldCount InfGetFieldCount
#define SetupGetIntField InfGetIntField
-#define SetupGetMultiSzFieldW InfpGetMultiSzFieldW
-#define SetupGetStringFieldW InfpGetStringFieldW
#define SetupOpenInfFileW InfpOpenInfFileW
#define INF_STYLE_WIN4 0x00000002
@@ -55,32 +50,12 @@
PVOID Line;
} INFCONTEXT;
-VOID WINAPI
-InfpCloseInfFile(
- IN HINF InfHandle);
-
BOOL WINAPI
InfpFindFirstLineW(
IN HINF InfHandle,
IN PCWSTR Section,
IN PCWSTR Key,
IN OUT PINFCONTEXT Context);
-
-BOOL WINAPI
-InfpGetMultiSzFieldW(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT PWSTR ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize);
-
-BOOL WINAPI
-InfpGetStringFieldW(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT PWSTR ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize);
HINF WINAPI
InfpOpenInfFileW(
@@ -113,7 +88,4 @@
IN LCID LocaleId,
OUT PUINT ErrorLine);
-VOID INF_SetHeap(
- IN PVOID Heap);
-
/* EOF */
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Sun Feb 20 16:50:38
2011
@@ -3978,7 +3978,7 @@
RtlNormalizeProcessParams(Peb->ProcessParameters);
ProcessHeap = Peb->ProcessHeap;
- INF_SetHeap(ProcessHeap);
+ InfSetHeap(ProcessHeap);
RunUSetup();
}
#endif /* __REACTOS__ */
Modified: trunk/reactos/base/setup/usetup/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/registry…
==============================================================================
--- trunk/reactos/base/setup/usetup/registry.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/registry.c [iso-8859-1] Sun Feb 20 16:50:38 2011
@@ -646,7 +646,7 @@
DPRINT1("registry_callback() failed\n");
}
- SetupCloseInfFile (hInf);
+ InfCloseFile (hInf);
return TRUE;
}
Modified: trunk/reactos/base/setup/usetup/usetup.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.h…
==============================================================================
--- trunk/reactos/base/setup/usetup/usetup.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/usetup.h [iso-8859-1] Sun Feb 20 16:50:38 2011
@@ -78,6 +78,36 @@
extern BOOLEAN IsUnattendedSetup;
extern PWCHAR SelectedLanguageId;
+#ifdef __REACTOS__
+
+extern VOID InfSetHeap(PVOID Heap);
+extern VOID InfCloseFile(HINF InfHandle);
+extern BOOLEAN InfFindNextLine(PINFCONTEXT ContextIn,
+ PINFCONTEXT ContextOut);
+extern BOOLEAN InfGetBinaryField(PINFCONTEXT Context,
+ ULONG FieldIndex,
+ PUCHAR ReturnBuffer,
+ ULONG ReturnBufferSize,
+ PULONG RequiredSize);
+extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
+ ULONG FieldIndex,
+ PWSTR ReturnBuffer,
+ ULONG ReturnBufferSize,
+ PULONG RequiredSize);
+extern BOOLEAN InfGetStringField(PINFCONTEXT Context,
+ ULONG FieldIndex,
+ PWSTR ReturnBuffer,
+ ULONG ReturnBufferSize,
+ PULONG RequiredSize);
+
+#define SetupCloseInfFile InfCloseFile
+#define SetupFindNextLine InfFindNextLine
+#define SetupGetBinaryField InfGetBinaryField
+#define SetupGetMultiSzFieldW InfGetMultiSzField
+#define SetupGetStringFieldW InfGetStringField
+
+#endif /* __REACTOS__ */
+
typedef enum _PAGE_NUMBER
{
START_PAGE,
Modified: trunk/reactos/lib/inflib/infros.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/infros.h?rev=50…
==============================================================================
--- trunk/reactos/lib/inflib/infros.h [iso-8859-1] (original)
+++ trunk/reactos/lib/inflib/infros.h [iso-8859-1] Sun Feb 20 16:50:38 2011
@@ -14,7 +14,6 @@
#include <infcommon.h>
-extern VOID InfSetHeap(PVOID Heap);
extern NTSTATUS InfOpenBufferedFile(PHINF InfHandle,
PVOID Buffer,
ULONG BufferSize,
@@ -25,13 +24,10 @@
extern NTSTATUS InfWriteFile(HINF InfHandle,
PUNICODE_STRING FileName,
PUNICODE_STRING HeaderComment);
-extern VOID InfCloseFile(HINF InfHandle);
extern BOOLEAN InfFindFirstLine(HINF InfHandle,
PCWSTR Section,
PCWSTR Key,
PINFCONTEXT *Context);
-extern BOOLEAN InfFindNextLine(PINFCONTEXT ContextIn,
- PINFCONTEXT ContextOut);
extern BOOLEAN InfFindFirstMatchLine(PINFCONTEXT ContextIn,
PCWSTR Key,
PINFCONTEXT ContextOut);
@@ -41,24 +37,9 @@
extern LONG InfGetLineCount(HINF InfHandle,
PCWSTR Section);
extern LONG InfGetFieldCount(PINFCONTEXT Context);
-extern BOOLEAN InfGetBinaryField(PINFCONTEXT Context,
- ULONG FieldIndex,
- PUCHAR ReturnBuffer,
- ULONG ReturnBufferSize,
- PULONG RequiredSize);
extern BOOLEAN InfGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
PINT IntegerValue);
-extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
- ULONG FieldIndex,
- PWSTR ReturnBuffer,
- ULONG ReturnBufferSize,
- PULONG RequiredSize);
-extern BOOLEAN InfGetStringField(PINFCONTEXT Context,
- ULONG FieldIndex,
- PWSTR ReturnBuffer,
- ULONG ReturnBufferSize,
- PULONG RequiredSize);
extern BOOLEAN InfGetData(PINFCONTEXT Context,
PWCHAR *Key,
PWCHAR *Data);