Author: cwittich
Date: Tue Mar 16 18:50:04 2010
New Revision: 46229
URL:
http://svn.reactos.org/svn/reactos?rev=46229&view=rev
Log:
[KERNEL32]
reduce diff to wine
Modified:
trunk/reactos/dll/win32/kernel32/misc/profile.c
trunk/reactos/dll/win32/kernel32/misc/stubs.c
Modified: trunk/reactos/dll/win32/kernel32/misc/profile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/pr…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/profile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/profile.c [iso-8859-1] Tue Mar 16 18:50:04 2010
@@ -993,7 +993,7 @@
*
*/
static INT PROFILE_GetString( LPCWSTR section, LPCWSTR key_name,
- LPCWSTR def_val, LPWSTR buffer, UINT len, BOOL win32 )
+ LPCWSTR def_val, LPWSTR buffer, UINT len )
{
PROFILEKEY *key = NULL;
static const WCHAR empty_strW[] = { 0 };
@@ -1114,16 +1114,12 @@
return GetPrivateProfileIntW( section, entry, def_val, L"win.ini" );
}
-/*
- * if win32, copy:
- * - Section names if 'section' is NULL
- * - Keys in a Section if 'entry' is NULL
- * (see MSDN doc for GetPrivateProfileString)
- */
-static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
- LPCWSTR def_val, LPWSTR buffer,
- UINT len, LPCWSTR filename,
- BOOL win32 )
+/***********************************************************************
+ * GetPrivateProfileStringW (KERNEL32.@)
+ */
+DWORD WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
+ LPCWSTR def_val, LPWSTR buffer,
+ DWORD len, LPCWSTR filename )
{
int ret;
LPWSTR defval_tmp = NULL;
@@ -1141,30 +1137,30 @@
if (p >= def_val)
{
- int len = (int)(p - def_val) + 1;
-
- defval_tmp = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
- if (!defval_tmp) return 0;
- memcpy(defval_tmp, def_val, len * sizeof(WCHAR));
- defval_tmp[len] = '\0';
- def_val = defval_tmp;
+ int len = (int)(p - def_val) + 1;
+
+ defval_tmp = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
+ if (!defval_tmp) return 0;
+ memcpy(defval_tmp, def_val, len * sizeof(WCHAR));
+ defval_tmp[len] = '\0';
+ def_val = defval_tmp;
}
}
RtlEnterCriticalSection( &PROFILE_CritSect );
if (PROFILE_Open( filename, FALSE )) {
- if (win32 && (section == NULL))
+ if (section == NULL)
ret = PROFILE_GetSectionNames(buffer, len);
else
/* PROFILE_GetString can handle the 'entry == NULL' case */
- ret = PROFILE_GetString( section, entry, def_val, buffer, len, win32 );
+ ret = PROFILE_GetString( section, entry, def_val, buffer, len );
} else if (buffer && def_val) {
lstrcpynW( buffer, def_val, len );
ret = wcslen( buffer );
}
- else
- ret = 0;
+ else
+ ret = 0;
RtlLeaveCriticalSection( &PROFILE_CritSect );
@@ -1174,7 +1170,6 @@
return ret;
}
-
/***********************************************************************
* GetPrivateProfileStringA (KERNEL32.@)
@@ -1220,21 +1215,6 @@
}
/***********************************************************************
- * GetPrivateProfileStringW (KERNEL32.@)
- */
-DWORD WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
- LPCWSTR def_val, LPWSTR buffer,
- DWORD len, LPCWSTR filename )
-{
- DPRINT("(%S, %S, %S, %p, %d, %S)\n",
- section, entry, def_val, buffer, len, filename);
-
- return PROFILE_GetPrivateProfileString( section, entry, def_val,
- buffer, len, filename, TRUE );
-}
-
-
-/***********************************************************************
* GetProfileStringA (KERNEL32.@)
*/
DWORD WINAPI GetProfileStringA( LPCSTR section, LPCSTR entry, LPCSTR def_val,
@@ -1243,7 +1223,6 @@
return GetPrivateProfileStringA( section, entry, def_val,
buffer, len, "win.ini" );
}
-
/***********************************************************************
* GetProfileStringW (KERNEL32.@)
@@ -1853,10 +1832,19 @@
/***********************************************************************
- * CloseProfileUserMapping
- */
-BOOL WINAPI
-CloseProfileUserMapping(VOID)
+ * OpenProfileUserMapping (KERNEL32.@)
+ */
+BOOL WINAPI OpenProfileUserMapping(VOID)
+{
+ DPRINT1("(), stub!\n");
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+/***********************************************************************
+ * CloseProfileUserMapping (KERNEL32.@)
+ */
+BOOL WINAPI CloseProfileUserMapping(VOID)
{
DPRINT1("(), stub!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
Modified: trunk/reactos/dll/win32/kernel32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/st…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] Tue Mar 16 18:50:04 2010
@@ -1158,14 +1158,6 @@
BOOL
WINAPI
-OpenProfileUserMapping(VOID)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
PrivMoveFileIdentityW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3)
{
STUB;