[USETUP]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 20 Feb 2011 16:50:38 +0000 (16:50 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 20 Feb 2011 16:50:38 +0000 (16:50 +0000)
- Get rid of indirection
See issue #5190 for more details.

svn path=/trunk/; revision=50834

reactos/base/setup/usetup/inffile.c
reactos/base/setup/usetup/inffile.h
reactos/base/setup/usetup/interface/usetup.c
reactos/base/setup/usetup/registry.c
reactos/base/setup/usetup/usetup.h
reactos/lib/inflib/infros.h

index 7b0d2a9..71c0108 100644 (file)
 
 #ifdef __REACTOS__
 
-VOID WINAPI
-InfpCloseInfFile(
-       IN HINF InfHandle)
-{
-       InfCloseFile(InfHandle);
-}
-
 BOOL WINAPI
 InfpFindFirstLineW(
        IN HINF InfHandle,
@@ -65,28 +58,6 @@ InfpFindFirstLineW(
        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
 InfpOpenInfFileW(
        IN PCWSTR FileName,
@@ -238,12 +209,4 @@ INF_OpenBufferedFileA(
 #endif /* !__REACTOS__ */
 }
 
-VOID INF_SetHeap(
-       IN PVOID Heap)
-{
-#ifdef __REACTOS__
-       InfSetHeap(Heap);
-#endif
-}
-
 /* EOF */
index 4a5b8d9..ba0e45a 100644 (file)
 
 #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,10 +50,6 @@ typedef struct _INFCONTEXT
        PVOID Line;
 } INFCONTEXT;
 
-VOID WINAPI
-InfpCloseInfFile(
-       IN HINF InfHandle);
-
 BOOL WINAPI
 InfpFindFirstLineW(
        IN HINF InfHandle,
@@ -66,22 +57,6 @@ InfpFindFirstLineW(
        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(
        IN PCWSTR FileName,
@@ -113,7 +88,4 @@ INF_OpenBufferedFileA(
        IN LCID LocaleId,
        OUT PUINT ErrorLine);
 
-VOID INF_SetHeap(
-       IN PVOID Heap);
-
 /* EOF */
index 2312380..9fa6d32 100644 (file)
@@ -3978,7 +3978,7 @@ NtProcessStartup(PPEB Peb)
     RtlNormalizeProcessParams(Peb->ProcessParameters);
 
     ProcessHeap = Peb->ProcessHeap;
-    INF_SetHeap(ProcessHeap);
+    InfSetHeap(ProcessHeap);
     RunUSetup();
 }
 #endif /* __REACTOS__ */
index a808129..c595176 100644 (file)
@@ -646,7 +646,7 @@ ImportRegistryFile(PWSTR Filename,
       DPRINT1("registry_callback() failed\n");
     }
 
-  SetupCloseInfFile (hInf);
+  InfCloseFile (hInf);
 
   return TRUE;
 }
index bbb4212..b6f887a 100644 (file)
@@ -78,6 +78,36 @@ extern UNICODE_STRING SourcePath;
 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,
index 80e8692..6a72373 100644 (file)
@@ -14,7 +14,6 @@ extern "C" {
 
 #include <infcommon.h>
 
-extern VOID InfSetHeap(PVOID Heap);
 extern NTSTATUS InfOpenBufferedFile(PHINF InfHandle,
                                     PVOID Buffer,
                                     ULONG BufferSize,
@@ -25,13 +24,10 @@ extern NTSTATUS InfOpenFile(PHINF InfHandle,
 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 BOOLEAN InfFindNextMatchLine(PINFCONTEXT ContextIn,
 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);