Author: akhaldi
Date: Fri Aug 13 14:47:01 2010
New Revision: 48530
URL:
http://svn.reactos.org/svn/reactos?rev=48530&view=rev
Log:
[CMAKE]
- Sync kernel32 with trunk.
Modified:
branches/cmake-bringup/dll/win32/kernel32/file/backup.c
branches/cmake-bringup/dll/win32/kernel32/file/bintype.c
branches/cmake-bringup/dll/win32/kernel32/file/cnotify.c
branches/cmake-bringup/dll/win32/kernel32/file/copy.c
branches/cmake-bringup/dll/win32/kernel32/file/create.c
branches/cmake-bringup/dll/win32/kernel32/file/curdir.c
branches/cmake-bringup/dll/win32/kernel32/file/delete.c
branches/cmake-bringup/dll/win32/kernel32/file/deviceio.c
branches/cmake-bringup/dll/win32/kernel32/file/dir.c
branches/cmake-bringup/dll/win32/kernel32/file/dosdev.c
branches/cmake-bringup/dll/win32/kernel32/file/file.c
branches/cmake-bringup/dll/win32/kernel32/file/find.c
branches/cmake-bringup/dll/win32/kernel32/file/hardlink.c
branches/cmake-bringup/dll/win32/kernel32/file/iocompl.c
branches/cmake-bringup/dll/win32/kernel32/file/lfile.c
branches/cmake-bringup/dll/win32/kernel32/file/lock.c
branches/cmake-bringup/dll/win32/kernel32/file/mailslot.c
branches/cmake-bringup/dll/win32/kernel32/file/move.c
branches/cmake-bringup/dll/win32/kernel32/file/npipe.c
branches/cmake-bringup/dll/win32/kernel32/file/pipe.c
branches/cmake-bringup/dll/win32/kernel32/file/rw.c
branches/cmake-bringup/dll/win32/kernel32/file/tape.c
branches/cmake-bringup/dll/win32/kernel32/file/volume.c
branches/cmake-bringup/dll/win32/kernel32/include/kernel32.h
branches/cmake-bringup/dll/win32/kernel32/locale_rc.rc
branches/cmake-bringup/dll/win32/kernel32/misc/actctx.c
branches/cmake-bringup/dll/win32/kernel32/misc/console.c
branches/cmake-bringup/dll/win32/kernel32/misc/format_msg.c
branches/cmake-bringup/dll/win32/kernel32/misc/lang.c
branches/cmake-bringup/dll/win32/kernel32/misc/lcformat.c
branches/cmake-bringup/dll/win32/kernel32/misc/profile.c
branches/cmake-bringup/dll/win32/kernel32/misc/stubs.c
branches/cmake-bringup/dll/win32/kernel32/misc/version.c
branches/cmake-bringup/dll/win32/kernel32/nls/cym.nls
branches/cmake-bringup/dll/win32/kernel32/nls/lth.nls
branches/cmake-bringup/dll/win32/kernel32/nls/ukr.nls
branches/cmake-bringup/dll/win32/kernel32/process/session.c
Modified: branches/cmake-bringup/dll/win32/kernel32/file/backup.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/backup.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/backup.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -11,9 +11,8 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/bintype.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/bintype.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/bintype.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -13,9 +13,10 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/cnotify.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/cnotify.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/cnotify.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -10,9 +10,8 @@
*/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
/*
* @implemented
Modified: branches/cmake-bringup/dll/win32/kernel32/file/copy.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/copy.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/copy.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -13,9 +13,9 @@
/* INCLUDES ****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/create.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/create.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/create.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -15,9 +15,9 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
#define SYMLINK_FLAG_RELATIVE 1
Modified: branches/cmake-bringup/dll/win32/kernel32/file/curdir.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/curdir.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/curdir.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -17,9 +17,9 @@
/* INCLUDES ******************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* GLOBAL VARIABLES **********************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/delete.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/delete.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/delete.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -12,9 +12,9 @@
/* INCLUDES ****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <reactos/debug.h>
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/deviceio.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/deviceio.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/deviceio.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -9,7 +9,8 @@
/* INCLUDES *******************************************************************/
#include <k32.h>
-#include <wine/debug.h>
+#define NDEBUG
+#include <debug.h>
/* FUNCTIONS ******************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/dir.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/dir.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/dir.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -16,9 +16,9 @@
/* INCLUDES ******************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
UNICODE_STRING DllDirectory = {0, 0, NULL};
@@ -972,7 +972,7 @@
{
if (RtlDetermineDosPathNameType_U(name) != RtlPathTypeRelative) return TRUE;
if (name[0] != '.') return FALSE;
- if (name[1] == '/' || name[1] == '\\') return TRUE;
+ if (name[1] == '/' || name[1] == '\\' || name[1] == '\0')
return TRUE;
return (name[1] == '.' && (name[2] == '/' || name[2] ==
'\\'));
}
Modified: branches/cmake-bringup/dll/win32/kernel32/file/dosdev.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/dosdev.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/dosdev.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -12,9 +12,9 @@
/* INCLUDES ******************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS *****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/file.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/file.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/file.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -13,9 +13,9 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* GLOBALS ******************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/find.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/find.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/find.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -12,9 +12,9 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* TYPES ********************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/hardlink.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/hardlink.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/hardlink.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -12,9 +12,9 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/iocompl.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/iocompl.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/iocompl.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -10,13 +10,12 @@
*/
#include <k32.h>
-#include <wine/debug.h>
+#define NDEBUG
+#include <debug.h>
#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100)
#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000))
#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000))
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/*
* @implemented
Modified: branches/cmake-bringup/dll/win32/kernel32/file/lfile.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/lfile.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/lfile.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -10,9 +10,8 @@
*/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
/*
* @implemented
Modified: branches/cmake-bringup/dll/win32/kernel32/file/lock.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/lock.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/lock.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -14,9 +14,9 @@
/* INCLUDES ****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/mailslot.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/mailslot.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/mailslot.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -11,9 +11,9 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/move.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/move.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/move.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -17,9 +17,9 @@
#include <k32.h>
#include <malloc.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* GLOBALS *****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/npipe.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/npipe.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/npipe.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -10,9 +10,9 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
//#define USING_PROPER_NPFS_WAIT_SEMANTICS
Modified: branches/cmake-bringup/dll/win32/kernel32/file/pipe.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/pipe.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/pipe.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -11,9 +11,9 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* GLOBALS ******************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/rw.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/rw.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/rw.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -12,9 +12,9 @@
/* INCLUDES ****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/tape.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/tape.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/tape.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -12,9 +12,8 @@
/* INCLUDES *****************************************************************/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
/* FUNCTIONS ****************************************************************/
Modified: branches/cmake-bringup/dll/win32/kernel32/file/volume.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/file/volume.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/file/volume.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -20,9 +20,9 @@
*/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
#define MAX_DOS_DRIVES 26
Modified: branches/cmake-bringup/dll/win32/kernel32/include/kernel32.h
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -1,5 +1,25 @@
#pragma once
+//
+// Kernel32 Filter IDs
+//
+#define kernel32file 200
+#define kernel32ver 201
+#define actctx 202
+#define resource 203
+#define kernel32session 204
+
+#define TRACE(fmt, ...) TRACE__(gDebugChannel, fmt, ##__VA_ARGS__)
+#define WARN(fmt, ...) WARN__(gDebugChannel, fmt, ##__VA_ARGS__)
+#define FIXME(fmt, ...) WARN__(gDebugChannel, fmt,## __VA_ARGS__)
+#define ERR(fmt, ...) ERR__(gDebugChannel, fmt, ##__VA_ARGS__)
+
+#define debugstr_a
+#define debugstr_w
+#define wine_dbgstr_w
+#define debugstr_guid
+
+#include "wine/unicode.h"
#include "baseheap.h"
#define BINARY_UNKNOWN (0)
@@ -40,8 +60,9 @@
/* Undocumented CreateProcess flag */
#define STARTF_SHELLPRIVATE 0x400
-#define SetLastErrorByStatus(__S__) \
- ((void)SetLastError(RtlNtStatusToDosError(__S__)))
+#define SetLastErrorByStatus(x) RtlSetLastWin32ErrorAndNtStatusFromNtStatus((x))
+#define GetLastError() NtCurrentTeb()->LastErrorValue
+#define SetLastError(x) NtCurrentTeb()->LastErrorValue = (x)
typedef struct _CODEPAGE_ENTRY
{
@@ -100,6 +121,7 @@
#define HeapAlloc RtlAllocateHeap
#define HeapReAlloc RtlReAllocateHeap
#define HeapFree RtlFreeHeap
+#define _lread (_readfun)_hread
POBJECT_ATTRIBUTES
WINAPI
Modified: branches/cmake-bringup/dll/win32/kernel32/locale_rc.rc
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/locale_rc.rc [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/locale_rc.rc [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -48,11 +48,11 @@
#include "nls/cat.nls" /* 0x0403 LANG_CATALAN, SUBLANG_DEFAULT */
-#include "nls/cht.nls" /* 0x0404 LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
*/
+//#include "nls/cht.nls" /* 0x0404 LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
*/
#include "nls/chs.nls" /* 0x0804 LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
*/
-#include "nls/zhh.nls" /* 0x0c04 LANG_CHINESE, SUBLANG_CHINESE_HONGKONG */
+//#include "nls/zhh.nls" /* 0x0c04 LANG_CHINESE, SUBLANG_CHINESE_HONGKONG
*/
#include "nls/zhi.nls" /* 0x1004 LANG_CHINESE, SUBLANG_CHINESE_SINGAPORE */
-#include "nls/zhm.nls" /* 0x1404 LANG_CHINESE, SUBLANG_CHINESE_MACAU */
+//#include "nls/zhm.nls" /* 0x1404 LANG_CHINESE, SUBLANG_CHINESE_MACAU */
#include "nls/csy.nls" /* 0x0405 LANG_CZECH, SUBLANG_DEFAULT */
@@ -119,7 +119,7 @@
#include "nls/ita.nls" /* 0x0410 LANG_ITALIAN, SUBLANG_ITALIAN */
#include "nls/its.nls" /* 0x0810 LANG_ITALIAN, SUBLANG_ITALIAN_SWISS */
-#include "nls/jpn.nls" /* 0x0411 LANG_JAPANESE, SUBLANG_DEFAULT */
+//#include "nls/jpn.nls" /* 0x0411 LANG_JAPANESE, SUBLANG_DEFAULT */
#include "nls/kor.nls" /* 0x0412 LANG_KOREAN, SUBLANG_KOREAN */
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/actctx.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/actctx.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/actctx.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -13,10 +13,9 @@
/* synched with wine 1.1.26 */
#include <k32.h>
-
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(actctx);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = actctx;
#define ACTCTX_FAKE_HANDLE ((HANDLE) 0xf00baa)
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/console.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/console.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -1370,20 +1370,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
-
-
-/*
- * @unimplemented (Undocumented)
- */
-BOOL
-WINAPI
-SetLastConsoleEventActive(VOID)
-{
- DPRINT1("SetLastConsoleEventActive() UNIMPLEMENTED!\n");
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
/*
* @unimplemented (Undocumented)
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/format_msg.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/format_msg.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/format_msg.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -20,12 +20,9 @@
*/
#include <k32.h>
-
-
-#include "wine/unicode.h"
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(resource);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = resource;
struct format_args
{
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/lang.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/lang.c [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -155,142 +155,6 @@
}
return lcid;
-}
-
-
-/**************************************************************************
- * EnumDateFormatsExA (KERNEL32.@)
- *
- * FIXME: MSDN mentions only LOCALE_USE_CP_ACP, should we handle
- * LOCALE_NOUSEROVERRIDE here as well?
- */
-BOOL
-WINAPI
-EnumDateFormatsExA(
- DATEFMT_ENUMPROCEXA lpDateFmtEnumProcEx,
- LCID Locale,
- DWORD dwFlags)
-{
- CALID cal_id;
- char szBuf[256];
-
- if (!lpDateFmtEnumProcEx)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- if (!GetLocaleInfoW(Locale,
- LOCALE_ICALENDARTYPE|LOCALE_RETURN_NUMBER,
- (LPWSTR)&cal_id,
- sizeof(cal_id)/sizeof(WCHAR)))
- {
- return FALSE;
- }
-
- switch (dwFlags & ~LOCALE_USE_CP_ACP)
- {
- case 0:
- case DATE_SHORTDATE:
- if (GetLocaleInfoA(Locale,
- LOCALE_SSHORTDATE | (dwFlags & LOCALE_USE_CP_ACP),
- szBuf, 256))
- {
- lpDateFmtEnumProcEx(szBuf, cal_id);
- }
- break;
-
- case DATE_LONGDATE:
- if (GetLocaleInfoA(Locale,
- LOCALE_SLONGDATE | (dwFlags & LOCALE_USE_CP_ACP),
- szBuf, 256))
- {
- lpDateFmtEnumProcEx(szBuf, cal_id);
- }
- break;
-
- case DATE_YEARMONTH:
- if (GetLocaleInfoA(Locale,
- LOCALE_SYEARMONTH | (dwFlags & LOCALE_USE_CP_ACP),
- szBuf, 256))
- {
- lpDateFmtEnumProcEx(szBuf, cal_id);
- }
- break;
-
- default:
- SetLastError(ERROR_INVALID_FLAGS);
- return FALSE;
- }
- return TRUE;
-}
-
-
-/**************************************************************************
- * EnumDateFormatsExW (KERNEL32.@)
- */
-BOOL
-WINAPI
-EnumDateFormatsExW(
- DATEFMT_ENUMPROCEXW lpDateFmtEnumProcEx,
- LCID Locale,
- DWORD dwFlags)
-{
- CALID cal_id;
- WCHAR wbuf[256]; // FIXME
-
- if (!lpDateFmtEnumProcEx)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- if (!GetLocaleInfoW(Locale,
- LOCALE_ICALENDARTYPE | LOCALE_RETURN_NUMBER,
- (LPWSTR)&cal_id,
- sizeof(cal_id)/sizeof(WCHAR)))
- {
- return FALSE;
- }
-
- switch (dwFlags & ~LOCALE_USE_CP_ACP)
- {
- case 0:
- case DATE_SHORTDATE:
- if (GetLocaleInfoW(Locale,
- LOCALE_SSHORTDATE | (dwFlags & LOCALE_USE_CP_ACP),
- wbuf,
- 256))
- {
- lpDateFmtEnumProcEx(wbuf, cal_id);
- }
- break;
-
- case DATE_LONGDATE:
- if (GetLocaleInfoW(Locale,
- LOCALE_SLONGDATE | (dwFlags & LOCALE_USE_CP_ACP),
- wbuf,
- 256))
- {
- lpDateFmtEnumProcEx(wbuf, cal_id);
- }
- break;
-
- case DATE_YEARMONTH:
- if (GetLocaleInfoW(Locale,
- LOCALE_SYEARMONTH | (dwFlags & LOCALE_USE_CP_ACP),
- wbuf,
- 256))
- {
- lpDateFmtEnumProcEx(wbuf, cal_id);
- }
- break;
-
- default:
- SetLastError(ERROR_INVALID_FLAGS);
- return FALSE;
- }
- return TRUE;
}
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/lcformat.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/lcformat.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/lcformat.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -5,6 +5,7 @@
* Copyright 1998 David Lee Lambert
* Copyright 2000 Julio César Gázquez
* Copyright 2003 Jon Griffiths
+ * Copyright 2005 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -18,7 +19,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
@@ -29,16 +30,9 @@
*/
#include <k32.h>
-
-#include "wine/config.h"
-#include "wine/unicode.h"
#define NDEBUG
#include <debug.h>
-
-#define TRACE DPRINT
-#define WARN DPRINT1
-#define ERR DPRINT1
-#define FIXME DPRINT1
+static ULONG gDebugChannel = resource;
#define DATE_DATEVARSONLY 0x0100 /* only date stuff: yMdg */
#define TIME_TIMEVARSONLY 0x0200 /* only time stuff: hHmst */
@@ -52,7 +46,7 @@
*
* Our cache takes the form of a singly linked list, whose node is below:
*/
-#define NLS_NUM_CACHED_STRINGS 45
+#define NLS_NUM_CACHED_STRINGS 57
typedef struct _NLS_FORMAT_NODE
{
@@ -72,14 +66,15 @@
#define GetLongDate(fmt) fmt->lppszStrings[1]
#define GetShortDate(fmt) fmt->lppszStrings[2]
#define GetTime(fmt) fmt->lppszStrings[3]
-#define GetAM(fmt) fmt->lppszStrings[42]
-#define GetPM(fmt) fmt->lppszStrings[43]
-#define GetYearMonth(fmt) fmt->lppszStrings[44]
-
-#define GetLongDay(fmt,day) fmt->lppszStrings[4 + day]
-#define GetShortDay(fmt,day) fmt->lppszStrings[11 + day]
-#define GetLongMonth(fmt,mth) fmt->lppszStrings[18 + mth]
-#define GetShortMonth(fmt,mth) fmt->lppszStrings[30 + mth]
+#define GetAM(fmt) fmt->lppszStrings[54]
+#define GetPM(fmt) fmt->lppszStrings[55]
+#define GetYearMonth(fmt) fmt->lppszStrings[56]
+
+#define GetLongDay(fmt,day) fmt->lppszStrings[4 + day]
+#define GetShortDay(fmt,day) fmt->lppszStrings[11 + day]
+#define GetLongMonth(fmt,mth) fmt->lppszStrings[18 + mth]
+#define GetGenitiveMonth(fmt,mth) fmt->lppszStrings[30 + mth]
+#define GetShortMonth(fmt,mth) fmt->lppszStrings[42 + mth]
/* Write access to the cache is protected by this critical section */
static RTL_CRITICAL_SECTION NLS_FormatsCS;
@@ -91,53 +86,6 @@
0, 0, 0, 0, 0
};
static RTL_CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0
};
-
-/**************************************************************************
- * NLS_isSystemLocale <internal>
- *
- * Return TRUE, if locale is system-type
- */
-BOOL NLS_isSystemLocale(LCID lcid)
-{
- if(lcid == LOCALE_SYSTEM_DEFAULT ||
- lcid == LOCALE_NEUTRAL ||
- lcid == LOCALE_USER_DEFAULT)
- {
- return TRUE;
- }
- return FALSE;
-}
-
-/**************************************************************************
- * NLS_getDefaultLocale <internal>
- *
- * Return default system or user locale
- */
-LCID NLS_getDefaultLocale(LCID lcid)
-{
- LCID lcidTmp;
-
- DPRINT("Called NLS_getDefaultLocale(0x%04lx)\n", lcid);
-
- switch(lcid)
- {
- case LOCALE_SYSTEM_DEFAULT:
- NtQueryDefaultLocale(FALSE, &lcidTmp);
- return lcidTmp;
- break;
-
- case LOCALE_USER_DEFAULT:
- case LOCALE_NEUTRAL:
- NtQueryDefaultLocale(TRUE, &lcidTmp);
- return lcidTmp;
- break;
-
- default:
- DPRINT1("FIXME: unknown system lcid\n");
- }
-
- return lcid;
-}
/**************************************************************************
* NLS_GetLocaleNumber <internal>
@@ -184,10 +132,10 @@
}
#define GET_LOCALE_NUMBER(num, type) num = NLS_GetLocaleNumber(lcid, type|dwFlags); \
- TRACE( #type ": %ld (%08lx)\n", (DWORD)num, (DWORD)num)
+ TRACE( #type ": %d (%08x)\n", (DWORD)num, (DWORD)num)
#define GET_LOCALE_STRING(str, type) str = NLS_GetLocaleString(lcid, type|dwFlags); \
- TRACE( #type ": '%S'\n", (str))
+ TRACE( #type ": %s\n", debugstr_w(str))
/**************************************************************************
* NLS_GetFormats <internal>
@@ -197,7 +145,7 @@
static const NLS_FORMAT_NODE *NLS_GetFormats(LCID lcid, DWORD dwFlags)
{
/* GetLocaleInfo() identifiers for cached formatting strings */
- static const USHORT NLS_LocaleIndices[] = {
+ static const LCTYPE NLS_LocaleIndices[] = {
LOCALE_SNEGATIVESIGN,
LOCALE_SLONGDATE, LOCALE_SSHORTDATE,
LOCALE_STIMEFORMAT,
@@ -210,6 +158,18 @@
LOCALE_SMONTHNAME4, LOCALE_SMONTHNAME5, LOCALE_SMONTHNAME6,
LOCALE_SMONTHNAME7, LOCALE_SMONTHNAME8, LOCALE_SMONTHNAME9,
LOCALE_SMONTHNAME10, LOCALE_SMONTHNAME11, LOCALE_SMONTHNAME12,
+ LOCALE_SMONTHNAME1 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME2 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME3 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME4 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME5 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME6 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME7 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME8 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME9 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME10 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME11 | LOCALE_RETURN_GENITIVE_NAMES,
+ LOCALE_SMONTHNAME12 | LOCALE_RETURN_GENITIVE_NAMES,
LOCALE_SABBREVMONTHNAME1, LOCALE_SABBREVMONTHNAME2, LOCALE_SABBREVMONTHNAME3,
LOCALE_SABBREVMONTHNAME4, LOCALE_SABBREVMONTHNAME5, LOCALE_SABBREVMONTHNAME6,
LOCALE_SABBREVMONTHNAME7, LOCALE_SABBREVMONTHNAME8, LOCALE_SABBREVMONTHNAME9,
@@ -222,7 +182,7 @@
dwFlags &= LOCALE_NOUSEROVERRIDE;
- TRACE("(0x%04lx,0x%08lx)\n", lcid, dwFlags);
+ TRACE("(0x%04x,0x%08x)\n", lcid, dwFlags);
/* See if we have already cached the locales number format */
while (node && (node->lcid != lcid || node->dwFlags != dwFlags)
&& node->next)
@@ -296,6 +256,16 @@
{
GET_LOCALE_STRING(new_node->lppszStrings[i], NLS_LocaleIndices[i]);
}
+ /* Save some memory if month genitive name is the same or not present */
+ for (i = 0; i < 12; i++)
+ {
+ if (strcmpW(GetLongMonth(new_node, i), GetGenitiveMonth(new_node, i)) == 0)
+ {
+ HeapFree(GetProcessHeap(), 0, GetGenitiveMonth(new_node, i));
+ GetGenitiveMonth(new_node, i) = NULL;
+ }
+ }
+
new_node->szShortAM[0] = GetAM(new_node)[0]; new_node->szShortAM[1] =
'\0';
new_node->szShortPM[0] = GetPM(new_node)[0]; new_node->szShortPM[1] =
'\0';
@@ -360,7 +330,7 @@
case LANG_MARATHI:
case LANG_PUNJABI:
case LANG_SANSKRIT:
- TRACE("lcid 0x%08lx: langid 0x%4x is Unicode Only\n", lcid,
PRIMARYLANGID(lcid));
+ TRACE("lcid 0x%08x: langid 0x%4x is Unicode Only\n", lcid,
PRIMARYLANGID(lcid));
return TRUE;
default:
return FALSE;
@@ -399,14 +369,11 @@
INT cchWritten = 0;
INT lastFormatPos = 0;
BOOL bSkipping = FALSE; /* Skipping text around marker? */
+ BOOL d_dd_formatted = FALSE; /* previous formatted part was for d or dd */
/* Verify our arguments */
if ((cchOut && !lpStr) || !(node = NLS_GetFormats(lcid, dwFlags)))
- {
-NLS_GetDateTimeFormatW_InvalidParameter:
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
+ goto invalid_parameter;
if (dwFlags & ~(DATE_DATEVARSONLY|TIME_TIMEVARSONLY))
{
@@ -414,15 +381,13 @@
((dwFlags & DATE_DATEVARSONLY && dwFlags & ~DATE_FORMAT_FLAGS)
||
(dwFlags & TIME_TIMEVARSONLY && dwFlags & ~TIME_FORMAT_FLAGS)))
{
-NLS_GetDateTimeFormatW_InvalidFlags:
- SetLastError(ERROR_INVALID_FLAGS);
- return 0;
+ goto invalid_flags;
}
if (dwFlags & DATE_DATEVARSONLY)
{
if ((dwFlags & (DATE_LTRREADING|DATE_RTLREADING)) ==
(DATE_LTRREADING|DATE_RTLREADING))
- goto NLS_GetDateTimeFormatW_InvalidFlags;
+ goto invalid_flags;
else if (dwFlags & (DATE_LTRREADING|DATE_RTLREADING))
FIXME("Unsupported flags: DATE_LTRREADING/DATE_RTLREADING\n");
@@ -434,10 +399,10 @@
case DATE_LONGDATE:
case DATE_YEARMONTH:
if (lpFormat)
- goto NLS_GetDateTimeFormatW_InvalidFlags;
+ goto invalid_flags;
break;
default:
- goto NLS_GetDateTimeFormatW_InvalidFlags;
+ goto invalid_flags;
}
}
}
@@ -476,7 +441,7 @@
st.wDay = lpTime->wDay;
if (st.wDay > 31 || st.wMonth > 12 || !SystemTimeToFileTime(&st,
&ftTmp))
- goto NLS_GetDateTimeFormatW_InvalidParameter;
+ goto invalid_parameter;
FileTimeToSystemTime(&ftTmp, &st);
lpTime = &st;
@@ -486,7 +451,7 @@
{
/* Verify the time */
if (lpTime->wHour > 24 || lpTime->wMinute > 59 || lpTime->wSecond
> 59)
- goto NLS_GetDateTimeFormatW_InvalidParameter;
+ goto invalid_parameter;
}
}
@@ -511,7 +476,7 @@
if (!cchOut)
cchWritten++; /* Count size only */
else if (cchWritten >= cchOut)
- goto NLS_GetDateTimeFormatW_Overrun;
+ goto overrun;
else if (!bSkipping)
{
lpStr[cchWritten] = *lpFormat;
@@ -523,7 +488,6 @@
else if ((dwFlags & DATE_DATEVARSONLY && IsDateFmtChar(*lpFormat)) ||
(dwFlags & TIME_TIMEVARSONLY && IsTimeFmtChar(*lpFormat)))
{
- char buffA[32];
WCHAR buff[32], fmtChar;
LPCWSTR szAdd = NULL;
DWORD dwVal = 0;
@@ -539,6 +503,7 @@
}
buff[0] = '\0';
+ if (fmtChar != 'M') d_dd_formatted = FALSE;
switch(fmtChar)
{
case 'd':
@@ -550,12 +515,59 @@
{
dwVal = lpTime->wDay;
szAdd = buff;
+ d_dd_formatted = TRUE;
}
break;
case 'M':
if (count >= 4)
+ {
+ LPCWSTR genitive = GetGenitiveMonth(node, lpTime->wMonth - 1);
+ if (genitive)
+ {
+ if (d_dd_formatted)
+ {
+ szAdd = genitive;
+ break;
+ }
+ else
+ {
+ LPCWSTR format = lpFormat;
+ /* Look forward now, if next format pattern is for day genitive
+ name should be used */
+ while (*format)
+ {
+ /* Skip parts within markers */
+ if (IsLiteralMarker(*format))
+ {
+ ++format;
+ while (*format)
+ {
+ if (IsLiteralMarker(*format))
+ {
+ ++format;
+ if (!IsLiteralMarker(*format)) break;
+ }
+ }
+ }
+ if (*format != ' ') break;
+ ++format;
+ }
+ /* Only numeric day form matters */
+ if (*format && *format == 'd')
+ {
+ INT dcount = 1;
+ while (*++format == 'd') dcount++;
+ if (dcount < 3)
+ {
+ szAdd = genitive;
+ break;
+ }
+ }
+ }
+ }
szAdd = GetLongMonth(node, lpTime->wMonth - 1);
+ }
else if (count == 3)
szAdd = GetShortMonth(node, lpTime->wMonth - 1);
else
@@ -657,9 +669,9 @@
if (szAdd == buff && buff[0] == '\0')
{
+ static const WCHAR fmtW[] = {'%','.','*','d',0};
/* We have a numeric value to add */
- sprintf(buffA, "%.*ld", count, dwVal);
- MultiByteToWideChar(CP_ACP, 0, buffA, -1, buff, sizeof(buff)/sizeof(WCHAR));
+ snprintfW(buff, sizeof(buff)/sizeof(WCHAR), fmtW, count, dwVal);
}
dwLen = szAdd ? strlenW(szAdd) : 0;
@@ -671,7 +683,7 @@
else
{
memcpy(lpStr + cchWritten, szAdd, (cchOut - cchWritten) * sizeof(WCHAR));
- goto NLS_GetDateTimeFormatW_Overrun;
+ goto overrun;
}
}
cchWritten += dwLen;
@@ -683,7 +695,7 @@
if (!cchOut)
cchWritten++; /* Count size only */
else if (cchWritten >= cchOut)
- goto NLS_GetDateTimeFormatW_Overrun;
+ goto overrun;
else if (!bSkipping || *lpFormat == ' ')
{
lpStr[cchWritten] = *lpFormat;
@@ -697,19 +709,27 @@
if (cchOut)
{
if (cchWritten >= cchOut)
- goto NLS_GetDateTimeFormatW_Overrun;
+ goto overrun;
else
lpStr[cchWritten] = '\0';
}
cchWritten++; /* Include terminating NUL */
- TRACE("returning length=%d, ouput='%S'\n", cchWritten, lpStr);
+ TRACE("returning length=%d, ouput=%s\n", cchWritten, debugstr_w(lpStr));
return cchWritten;
-NLS_GetDateTimeFormatW_Overrun:
+overrun:
TRACE("returning 0, (ERROR_INSUFFICIENT_BUFFER)\n");
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
+
+invalid_parameter:
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+
+invalid_flags:
+ SetLastError(ERROR_INVALID_FLAGS);
+ return 0;
}
/******************************************************************************
@@ -725,12 +745,11 @@
WCHAR szFormat[128], szOut[128];
INT iRet;
- TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime,
- lpFormat, lpStr, cchOut);
+ TRACE("(0x%04x,0x%08x,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime,
+ debugstr_a(lpFormat), lpStr, cchOut);
if (NLS_IsUnicodeOnlyLcid(lcid))
{
-GetDateTimeFormatA_InvalidParameter:
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
@@ -739,7 +758,11 @@
{
const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
if (!node)
- goto GetDateTimeFormatA_InvalidParameter;
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
cp = node->dwCodePage;
}
@@ -810,8 +833,8 @@
INT WINAPI GetDateFormatA( LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut)
{
- TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
- lpFormat, lpDateStr, cchOut);
+ TRACE("(0x%04x,0x%08x,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
+ debugstr_a(lpFormat), lpDateStr, cchOut);
return NLS_GetDateTimeFormatA(lcid, dwFlags | DATE_DATEVARSONLY, lpTime,
lpFormat, lpDateStr, cchOut);
@@ -826,8 +849,8 @@
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
{
- TRACE("(0x%04lx,0x%08lx,%p,%S,%p,%d)\n", lcid, dwFlags, lpTime,
- lpFormat, lpDateStr, cchOut);
+ TRACE("(0x%04x,0x%08x,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime,
+ debugstr_w(lpFormat), lpDateStr, cchOut);
return NLS_GetDateTimeFormatW(lcid, dwFlags|DATE_DATEVARSONLY, lpTime,
lpFormat, lpDateStr, cchOut);
@@ -877,8 +900,8 @@
INT WINAPI GetTimeFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
LPCSTR lpFormat, LPSTR lpTimeStr, INT cchOut)
{
- TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
- lpFormat, lpTimeStr, cchOut);
+ TRACE("(0x%04x,0x%08x,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
+ debugstr_a(lpFormat), lpTimeStr, cchOut);
return NLS_GetDateTimeFormatA(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime,
lpFormat, lpTimeStr, cchOut);
@@ -892,8 +915,8 @@
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
{
- TRACE("(0x%04lx,0x%08lx,%p,%S,%p,%d)\n",lcid, dwFlags, lpTime,
- lpFormat, lpTimeStr, cchOut);
+ TRACE("(0x%04x,0x%08x,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
+ debugstr_w(lpFormat), lpTimeStr, cchOut);
return NLS_GetDateTimeFormatW(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime,
lpFormat, lpTimeStr, cchOut);
@@ -936,12 +959,11 @@
const NUMBERFMTW *pfmt = NULL;
INT iRet;
- TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, lpszValue,
+ TRACE("(0x%04x,0x%08x,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_a(lpszValue),
lpFormat, lpNumberStr, cchOut);
if (NLS_IsUnicodeOnlyLcid(lcid))
{
-GetNumberFormatA_InvalidParameter:
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
@@ -950,7 +972,11 @@
{
const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
if (!node)
- goto GetNumberFormatA_InvalidParameter;
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
cp = node->dwCodePage;
}
@@ -1013,28 +1039,16 @@
WCHAR szNegBuff[8];
const WCHAR *lpszNeg = NULL, *lpszNegStart, *szSrc;
DWORD dwState = 0, dwDecimals = 0, dwGroupCount = 0, dwCurrentGroupCount = 0;
- DWORD dwLeadingZeros = 0;
INT iRet;
- TRACE("(0x%04lx,0x%08lx,%S,%p,%p,%d)\n", lcid, dwFlags, lpszValue,
+ TRACE("(0x%04x,0x%08x,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue),
lpFormat, lpNumberStr, cchOut);
- if(NLS_isSystemLocale(lcid))
- {
- lcid = NLS_getDefaultLocale(lcid);
- }
- else if(!IsValidLocale(lcid, LCID_INSTALLED))
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
-
if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpNumberStr) ||
+ !IsValidLocale(lcid, 0) ||
(lpFormat && (dwFlags || !lpFormat->lpDecimalSep ||
!lpFormat->lpThousandSep)))
{
-GetNumberFormatW_Error:
- SetLastError(lpFormat && dwFlags ? ERROR_INVALID_FLAGS :
ERROR_INVALID_PARAMETER);
- return 0;
+ goto error;
}
if (!lpFormat)
@@ -1042,7 +1056,7 @@
const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
if (!node)
- goto GetNumberFormatW_Error;
+ goto error;
lpFormat = &node->fmt;
lpszNegStart = lpszNeg = GetNegative(node);
}
@@ -1064,11 +1078,7 @@
/* Check the number for validity */
while (*szSrc)
{
- if (*szSrc == '0' && !(dwState & NF_DIGITS))
- {
- dwLeadingZeros++;
- }
- else if ((*szSrc >= '1' && *szSrc <= '9') || (*szSrc ==
'0' && (dwState & NF_DIGITS)))
+ if (*szSrc >= '0' && *szSrc <= '9')
{
dwState |= NF_DIGITS;
if (dwState & NF_ISREAL)
@@ -1077,23 +1087,23 @@
else if (*szSrc == '-')
{
if (dwState)
- goto GetNumberFormatW_Error; /* '-' not first character */
+ goto error; /* '-' not first character */
dwState |= NF_ISNEGATIVE;
}
else if (*szSrc == '.')
{
if (dwState & NF_ISREAL)
- goto GetNumberFormatW_Error; /* More than one '.' */
+ goto error; /* More than one '.' */
dwState |= NF_ISREAL;
}
else
- goto GetNumberFormatW_Error; /* Invalid char */
+ goto error; /* Invalid char */
szSrc++;
}
szSrc--; /* Point to last character */
if (!(dwState & NF_DIGITS))
- goto GetNumberFormatW_Error; /* No digits */
+ goto error; /* No digits */
/* Add any trailing negative sign */
if (dwState & NF_ISNEGATIVE)
@@ -1181,7 +1191,7 @@
dwGroupCount = lpFormat->Grouping == 32 ? 3 : lpFormat->Grouping;
/* Write the remaining whole number digits, including grouping chars */
- while (szSrc >= (lpszValue + dwLeadingZeros) && *szSrc >= '0'
&& *szSrc <= '9')
+ while (szSrc >= lpszValue && *szSrc >= '0' && *szSrc
<= '9')
{
if (dwState & NF_ROUND)
{
@@ -1199,7 +1209,7 @@
dwState |= NF_DIGITS_OUT;
dwCurrentGroupCount++;
- if (szSrc >= (lpszValue + dwLeadingZeros) && dwCurrentGroupCount ==
dwGroupCount && *szSrc != '-')
+ if (szSrc >= lpszValue && dwCurrentGroupCount == dwGroupCount &&
*szSrc != '-')
{
LPWSTR lpszGrp = lpFormat->lpThousandSep + strlenW(lpFormat->lpThousandSep) -
1;
@@ -1251,6 +1261,10 @@
}
}
return iRet;
+
+error:
+ SetLastError(lpFormat && dwFlags ? ERROR_INVALID_FLAGS :
ERROR_INVALID_PARAMETER);
+ return 0;
}
/**************************************************************************
@@ -1290,12 +1304,11 @@
const CURRENCYFMTW *pfmt = NULL;
INT iRet;
- TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, lpszValue,
+ TRACE("(0x%04x,0x%08x,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_a(lpszValue),
lpFormat, lpCurrencyStr, cchOut);
if (NLS_IsUnicodeOnlyLcid(lcid))
{
-GetCurrencyFormatA_InvalidParameter:
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
@@ -1304,7 +1317,11 @@
{
const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
if (!node)
- goto GetCurrencyFormatA_InvalidParameter;
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
cp = node->dwCodePage;
}
@@ -1395,32 +1412,16 @@
DWORD dwState = 0, dwDecimals = 0, dwGroupCount = 0, dwCurrentGroupCount = 0, dwFmt;
INT iRet;
- DPRINT1("GetCurrencyFormatW(0x%04lx,0x%08lx,%S,%p,%p,%d)\n",
- lcid,
- dwFlags,
- lpszValue,
- lpFormat,
- lpCurrencyStr,
- cchOut);
-
- if(NLS_isSystemLocale(lcid))
- {
- lcid = NLS_getDefaultLocale(lcid);
- }
- else if(!IsValidLocale(lcid, LCID_INSTALLED))
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
+ TRACE("(0x%04x,0x%08x,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue),
+ lpFormat, lpCurrencyStr, cchOut);
if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpCurrencyStr) ||
+ !IsValidLocale(lcid, 0) ||
(lpFormat && (dwFlags || !lpFormat->lpDecimalSep ||
!lpFormat->lpThousandSep ||
!lpFormat->lpCurrencySymbol || lpFormat->NegativeOrder > 15 ||
lpFormat->PositiveOrder > 3)))
{
-GetCurrencyFormatW_Error:
- SetLastError(lpFormat && dwFlags ? ERROR_INVALID_FLAGS :
ERROR_INVALID_PARAMETER);
- return 0;
+ goto error;
}
if (!lpFormat)
@@ -1428,7 +1429,8 @@
const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
if (!node)
- goto GetCurrencyFormatW_Error;
+ goto error;
+
lpFormat = &node->cyfmt;
lpszNegStart = lpszNeg = GetNegative(node);
}
@@ -1461,23 +1463,23 @@
else if (*szSrc == '-')
{
if (dwState)
- goto GetCurrencyFormatW_Error; /* '-' not first character */
+ goto error; /* '-' not first character */
dwState |= NF_ISNEGATIVE;
}
else if (*szSrc == '.')
{
if (dwState & NF_ISREAL)
- goto GetCurrencyFormatW_Error; /* More than one '.' */
+ goto error; /* More than one '.' */
dwState |= NF_ISREAL;
}
else
- goto GetCurrencyFormatW_Error; /* Invalid char */
+ goto error; /* Invalid char */
szSrc++;
}
szSrc--; /* Point to last character */
if (!(dwState & NF_DIGITS))
- goto GetCurrencyFormatW_Error; /* No digits */
+ goto error; /* No digits */
if (dwState & NF_ISNEGATIVE)
dwFmt = NLS_NegCyFormats[lpFormat->NegativeOrder];
@@ -1652,6 +1654,10 @@
}
}
return iRet;
+
+error:
+ SetLastError(lpFormat && dwFlags ? ERROR_INVALID_FLAGS :
ERROR_INVALID_PARAMETER);
+ return 0;
}
/* FIXME: Everything below here needs to move somewhere else along with the
@@ -1660,40 +1666,132 @@
*/
/**************************************************************************
- * EnumDateFormatsA (KERNEL32.@)
- */
-BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD
dwFlags)
-{
+ * EnumDateFormatsExA (KERNEL32.@)
+ *
+ * FIXME: MSDN mentions only LOCALE_USE_CP_ACP, should we handle
+ * LOCALE_NOUSEROVERRIDE here as well?
+ */
+BOOL WINAPI EnumDateFormatsExA(DATEFMT_ENUMPROCEXA proc, LCID lcid, DWORD flags)
+{
+ CALID cal_id;
char buf[256];
- if (!lpDateFmtEnumProc)
+ if (!proc)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- switch (dwFlags & ~LOCALE_USE_CP_ACP)
- {
- case 0:
- case DATE_SHORTDATE:
- if (GetLocaleInfoA(Locale, LOCALE_SSHORTDATE | (dwFlags &
LOCALE_USE_CP_ACP), buf, 256))
- lpDateFmtEnumProc(buf);
- break;
-
- case DATE_LONGDATE:
- if (GetLocaleInfoA(Locale, LOCALE_SLONGDATE | (dwFlags &
LOCALE_USE_CP_ACP), buf, 256))
- lpDateFmtEnumProc(buf);
- break;
-
- case DATE_YEARMONTH:
- if (GetLocaleInfoA(Locale, LOCALE_SYEARMONTH | (dwFlags &
LOCALE_USE_CP_ACP), buf, 256))
- lpDateFmtEnumProc(buf);
- break;
-
- default:
- FIXME("Unknown date format (%d)\n", dwFlags);
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
+ if (!GetLocaleInfoW(lcid, LOCALE_ICALENDARTYPE|LOCALE_RETURN_NUMBER,
(LPWSTR)&cal_id, sizeof(cal_id)/sizeof(WCHAR)))
+ return FALSE;
+
+ switch (flags & ~LOCALE_USE_CP_ACP)
+ {
+ case 0:
+ case DATE_SHORTDATE:
+ if (GetLocaleInfoA(lcid, LOCALE_SSHORTDATE | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf, cal_id);
+ break;
+
+ case DATE_LONGDATE:
+ if (GetLocaleInfoA(lcid, LOCALE_SLONGDATE | (flags & LOCALE_USE_CP_ACP), buf,
256))
+ proc(buf, cal_id);
+ break;
+
+ case DATE_YEARMONTH:
+ if (GetLocaleInfoA(lcid, LOCALE_SYEARMONTH | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf, cal_id);
+ break;
+
+ default:
+ FIXME("Unknown date format (%d)\n", flags);
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**************************************************************************
+ * EnumDateFormatsExW (KERNEL32.@)
+ */
+BOOL WINAPI EnumDateFormatsExW(DATEFMT_ENUMPROCEXW proc, LCID lcid, DWORD flags)
+{
+ CALID cal_id;
+ WCHAR buf[256];
+
+ if (!proc)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if (!GetLocaleInfoW(lcid, LOCALE_ICALENDARTYPE|LOCALE_RETURN_NUMBER,
(LPWSTR)&cal_id, sizeof(cal_id)/sizeof(WCHAR)))
+ return FALSE;
+
+ switch (flags & ~LOCALE_USE_CP_ACP)
+ {
+ case 0:
+ case DATE_SHORTDATE:
+ if (GetLocaleInfoW(lcid, LOCALE_SSHORTDATE | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf, cal_id);
+ break;
+
+ case DATE_LONGDATE:
+ if (GetLocaleInfoW(lcid, LOCALE_SLONGDATE | (flags & LOCALE_USE_CP_ACP), buf,
256))
+ proc(buf, cal_id);
+ break;
+
+ case DATE_YEARMONTH:
+ if (GetLocaleInfoW(lcid, LOCALE_SYEARMONTH | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf, cal_id);
+ break;
+
+ default:
+ FIXME("Unknown date format (%d)\n", flags);
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**************************************************************************
+ * EnumDateFormatsA (KERNEL32.@)
+ *
+ * FIXME: MSDN mentions only LOCALE_USE_CP_ACP, should we handle
+ * LOCALE_NOUSEROVERRIDE here as well?
+ */
+BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA proc, LCID lcid, DWORD flags)
+{
+ char buf[256];
+
+ if (!proc)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ switch (flags & ~LOCALE_USE_CP_ACP)
+ {
+ case 0:
+ case DATE_SHORTDATE:
+ if (GetLocaleInfoA(lcid, LOCALE_SSHORTDATE | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf);
+ break;
+
+ case DATE_LONGDATE:
+ if (GetLocaleInfoA(lcid, LOCALE_SLONGDATE | (flags & LOCALE_USE_CP_ACP), buf,
256))
+ proc(buf);
+ break;
+
+ case DATE_YEARMONTH:
+ if (GetLocaleInfoA(lcid, LOCALE_SYEARMONTH | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf);
+ break;
+
+ default:
+ FIXME("Unknown date format (%d)\n", flags);
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
}
return TRUE;
}
@@ -1701,180 +1799,99 @@
/**************************************************************************
* EnumDateFormatsW (KERNEL32.@)
*/
-BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW lpDateFmtEnumProc, LCID Locale, DWORD
dwFlags)
+BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW proc, LCID lcid, DWORD flags)
{
WCHAR buf[256];
- if (!lpDateFmtEnumProc)
+ if (!proc)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- switch (dwFlags & ~LOCALE_USE_CP_ACP)
- {
- case 0:
- case DATE_SHORTDATE:
- if (GetLocaleInfoW(Locale, LOCALE_SSHORTDATE | (dwFlags &
LOCALE_USE_CP_ACP), buf, 256))
- lpDateFmtEnumProc(buf);
- break;
-
- case DATE_LONGDATE:
- if (GetLocaleInfoW(Locale, LOCALE_SLONGDATE | (dwFlags &
LOCALE_USE_CP_ACP), buf, 256))
- lpDateFmtEnumProc(buf);
- break;
-
- case DATE_YEARMONTH:
- if (GetLocaleInfoW(Locale, LOCALE_SYEARMONTH | (dwFlags &
LOCALE_USE_CP_ACP), buf, 256))
- lpDateFmtEnumProc(buf);
- break;
-
- default:
- FIXME("Unknown date format (%d)\n", dwFlags);
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
+ switch (flags & ~LOCALE_USE_CP_ACP)
+ {
+ case 0:
+ case DATE_SHORTDATE:
+ if (GetLocaleInfoW(lcid, LOCALE_SSHORTDATE | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf);
+ break;
+
+ case DATE_LONGDATE:
+ if (GetLocaleInfoW(lcid, LOCALE_SLONGDATE | (flags & LOCALE_USE_CP_ACP), buf,
256))
+ proc(buf);
+ break;
+
+ case DATE_YEARMONTH:
+ if (GetLocaleInfoW(lcid, LOCALE_SYEARMONTH | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf);
+ break;
+
+ default:
+ FIXME("Unknown date format (%d)\n", flags);
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
}
return TRUE;
}
/**************************************************************************
* EnumTimeFormatsA (KERNEL32.@)
- */
-BOOL WINAPI EnumTimeFormatsA( TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD
dwFlags )
-{
- LCID Loc = GetUserDefaultLCID();
- if(!lpTimeFmtEnumProc)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
- if(dwFlags)
- {
- FIXME("Unknown time format (%ld)\n", dwFlags);
- }
-
- switch( Loc )
- {
- case 0x00000407: /* (Loc,"de_DE") */
- {
- if(!(*lpTimeFmtEnumProc)("HH.mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("HH:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("H:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("H.mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("H.mm'Uhr'")) return TRUE;
+ *
+ * FIXME: MSDN mentions only LOCALE_USE_CP_ACP, should we handle
+ * LOCALE_NOUSEROVERRIDE here as well?
+ */
+BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA proc, LCID lcid, DWORD flags)
+{
+ char buf[256];
+
+ if (!proc)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ switch (flags & ~LOCALE_USE_CP_ACP)
+ {
+ case 0:
+ if (GetLocaleInfoA(lcid, LOCALE_STIMEFORMAT | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf);
+ break;
+
+ default:
+ FIXME("Unknown time format (%d)\n", flags);
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
return TRUE;
- }
-
- case 0x0000040c: /* (Loc,"fr_FR") */
- case 0x00000c0c: /* (Loc,"fr_CA") */
- {
- if(!(*lpTimeFmtEnumProc)("H:mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("HH:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("H:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("HH.mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("HH'h'mm")) return TRUE;
- return TRUE;
- }
-
- case 0x00000809: /* (Loc,"en_UK") */
- case 0x00000c09: /* (Loc,"en_AU") */
- case 0x00001409: /* (Loc,"en_NZ") */
- case 0x00001809: /* (Loc,"en_IE") */
- {
- if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("HH:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("H:mm:ss")) return TRUE;
- return TRUE;
- }
-
- case 0x00001c09: /* (Loc,"en_ZA") */
- case 0x00002809: /* (Loc,"en_BZ") */
- case 0x00002c09: /* (Loc,"en_TT") */
- {
- if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("hh:mm:ss tt")) return TRUE;
- return TRUE;
- }
-
- default: /* default to US style "en_US" */
- {
- if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("hh:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("H:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)("HH:mm:ss")) return TRUE;
- return TRUE;
- }
- }
}
/**************************************************************************
* EnumTimeFormatsW (KERNEL32.@)
*/
-BOOL WINAPI EnumTimeFormatsW( TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, LCID Locale, DWORD
dwFlags )
-{
- LCID Loc = GetUserDefaultLCID();
- if(!lpTimeFmtEnumProc)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
- if(dwFlags)
- {
- FIXME("Unknown time format (%ld)\n", dwFlags);
- }
-
- switch( Loc )
- {
- case 0x00000407: /* (Loc,"de_DE") */
- {
- if(!(*lpTimeFmtEnumProc)(L"HH.mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"HH:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"H:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"H.mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"H.mm'Uhr'")) return TRUE;
+BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW proc, LCID lcid, DWORD flags)
+{
+ WCHAR buf[256];
+
+ if (!proc)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ switch (flags & ~LOCALE_USE_CP_ACP)
+ {
+ case 0:
+ if (GetLocaleInfoW(lcid, LOCALE_STIMEFORMAT | (flags & LOCALE_USE_CP_ACP),
buf, 256))
+ proc(buf);
+ break;
+
+ default:
+ FIXME("Unknown time format (%d)\n", flags);
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
return TRUE;
- }
-
- case 0x0000040c: /* (Loc,"fr_FR") */
- case 0x00000c0c: /* (Loc,"fr_CA") */
- {
- if(!(*lpTimeFmtEnumProc)(L"H:mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"HH:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"H:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"HH.mm")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"HH'h'mm")) return TRUE;
- return TRUE;
- }
-
- case 0x00000809: /* (Loc,"en_UK") */
- case 0x00000c09: /* (Loc,"en_AU") */
- case 0x00001409: /* (Loc,"en_NZ") */
- case 0x00001809: /* (Loc,"en_IE") */
- {
- if(!(*lpTimeFmtEnumProc)(L"h:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"HH:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"H:mm:ss")) return TRUE;
- return TRUE;
- }
-
- case 0x00001c09: /* (Loc,"en_ZA") */
- case 0x00002809: /* (Loc,"en_BZ") */
- case 0x00002c09: /* (Loc,"en_TT") */
- {
- if(!(*lpTimeFmtEnumProc)(L"h:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"hh:mm:ss tt")) return TRUE;
- return TRUE;
- }
-
- default: /* default to US style "en_US" */
- {
- if(!(*lpTimeFmtEnumProc)(L"h:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"hh:mm:ss tt")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"H:mm:ss")) return TRUE;
- if(!(*lpTimeFmtEnumProc)(L"HH:mm:ss")) return TRUE;
- return TRUE;
- }
- }
}
/******************************************************************************
@@ -1940,7 +1957,7 @@
if (opt == NULL)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- goto NLS_EnumCalendarInfoAW_Cleanup;
+ goto cleanup;
}
if (GetLocaleInfoW(locale, LOCALE_IOPTIONALCALENDAR, opt, optSz))
iter = opt;
@@ -1967,14 +1984,14 @@
if (bufSz >= newSz)
{
ERR("Buffer resizing disorder: was %d, requested %d.\n", bufSz,
newSz);
- goto NLS_EnumCalendarInfoAW_Cleanup;
+ goto cleanup;
}
bufSz = newSz;
WARN("Buffer too small; resizing to %d bytes.\n", bufSz);
buf = HeapReAlloc(GetProcessHeap(), 0, buf, bufSz);
if (buf == NULL)
- goto NLS_EnumCalendarInfoAW_Cleanup;
- } else goto NLS_EnumCalendarInfoAW_Cleanup;
+ goto cleanup;
+ } else goto cleanup;
}
} while (!ret);
@@ -2008,7 +2025,7 @@
}
}
-NLS_EnumCalendarInfoAW_Cleanup:
+cleanup:
HeapFree(GetProcessHeap(), 0, opt);
HeapFree(GetProcessHeap(), 0, buf);
return ret;
@@ -2016,12 +2033,14 @@
/******************************************************************************
* EnumCalendarInfoA [KERNEL32.@]
+ *
+ * See EnumCalendarInfoAW.
*/
BOOL WINAPI EnumCalendarInfoA( CALINFO_ENUMPROCA calinfoproc,LCID locale,
CALID calendar,CALTYPE caltype )
{
-
FIXME("(%p,0x%04lx,0x%08lx,0x%08lx),stub!\n",calinfoproc,locale,calendar,caltype);
- return NLS_EnumCalendarInfoAW(calinfoproc, locale, calendar, caltype, FALSE, FALSE);
+ TRACE("(%p,0x%08x,0x%08x,0x%08x)\n", calinfoproc, locale, calendar,
caltype);
+ return NLS_EnumCalendarInfoAW(calinfoproc, locale, calendar, caltype, FALSE, FALSE);
}
/******************************************************************************
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/profile.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/profile.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/profile.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -83,25 +83,6 @@
static const char hex[16] = "0123456789ABCDEF";
-
-static __inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
-{
- const WCHAR *end;
- for (end = ptr + n; ptr < end; ptr++)
- if (*ptr == ch)
- return (WCHAR *)(ULONG_PTR)ptr;
- return NULL;
-}
-
-static __inline WCHAR *memrchrW( const WCHAR *ptr, WCHAR ch, size_t n )
-{
- const WCHAR *end;
- WCHAR *ret = NULL;
- for (end = ptr + n; ptr < end; ptr++)
- if (*ptr == ch)
- ret = (WCHAR *)(ULONG_PTR)ptr;
- return ret;
-}
/***********************************************************************
* PROFILE_CopyEntry
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/stubs.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/stubs.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -958,6 +958,350 @@
return FALSE;
}
+BOOL
+WINAPI
+SetProcessWorkingSetSizeEx(IN HANDLE hProcess,
+ IN SIZE_T dwMinimumWorkingSetSize,
+ IN SIZE_T dwMaximumWorkingSetSize,
+ IN DWORD Flags)
+{
+ STUB;
+ return FALSE;
+}
+
+
+BOOL
+WINAPI
+GetProcessWorkingSetSizeEx(IN HANDLE hProcess,
+ OUT PSIZE_T lpMinimumWorkingSetSize,
+ OUT PSIZE_T lpMaximumWorkingSetSize,
+ OUT PDWORD Flags)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+GetNumaAvailableMemoryNode(IN UCHAR Node,
+ OUT PULONGLONG AvailableBytes)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+GetNumaAvailableMemory(PVOID lpInfo,
+ ULONG Length,
+ PULONG ReturnLength)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+GetNumaProcessorMap(PVOID lpInfo,
+ ULONG Length,
+ PULONG ReturnLength)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+NlsResetProcessLocale(VOID)
+{
+ STUB;
+ return TRUE;
+}
+
+DWORD
+WINAPI
+AddLocalAlternateComputerNameA(LPSTR lpName, PNTSTATUS Status)
+{
+ STUB;
+ return 0;
+}
+
+DWORD
+WINAPI
+AddLocalAlternateComputerNameW(LPWSTR lpName, PNTSTATUS Status)
+{
+ STUB;
+ return 0;
+}
+
+NTSTATUS
+WINAPI
+BaseCleanupAppcompatCache(VOID)
+{
+ STUB;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+WINAPI
+BaseCleanupAppcompatCacheSupport(PVOID pUnknown)
+{
+ STUB;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+BOOL
+WINAPI
+BaseInitAppcompatCache(VOID)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+BaseInitAppcompatCacheSupport(VOID)
+{
+ STUB;
+ return FALSE;
+}
+
+VOID
+WINAPI
+CreateProcessInternalWSecure(VOID)
+{
+ STUB;
+}
+
+DWORD
+WINAPI
+EnumerateLocalComputerNamesA(PVOID pUnknown, DWORD Size, LPSTR lpBuffer, LPDWORD
lpnSize)
+{
+ STUB;
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+DWORD
+WINAPI
+EnumerateLocalComputerNamesW(PVOID pUnknown, DWORD Size, LPWSTR lpBuffer, LPDWORD
lpnSize)
+{
+ STUB;
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+PVOID
+WINAPI
+GetComPlusPackageInstallStatus(VOID)
+{
+ STUB;
+ return NULL;
+}
+
+BOOL
+WINAPI
+GetConsoleCharType(HANDLE hConsole, COORD Coord, PDWORD Type)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+GetConsoleCursorMode(HANDLE hConsole, PBOOL pUnknown1, PBOOL pUnknown2)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+GetConsoleNlsMode(HANDLE hConsole, LPDWORD lpMode)
+{
+ STUB;
+ return FALSE;
+}
+
+VOID
+WINAPI
+GetDefaultSortkeySize(LPVOID lpUnknown)
+{
+ STUB;
+ lpUnknown = NULL;
+}
+
+VOID
+WINAPI
+GetLinguistLangSize(LPVOID lpUnknown)
+{
+ STUB;
+ lpUnknown = NULL;
+}
+
+BOOL
+WINAPI
+OpenDataFile(HANDLE hFile, DWORD dwUnused)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+PrivMoveFileIdentityW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+ReadConsoleInputExA(HANDLE hConsole, LPVOID lpBuffer, DWORD dwLen, LPDWORD Unknown1,
DWORD Unknown2)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+ReadConsoleInputExW(HANDLE hConsole, LPVOID lpBuffer, DWORD dwLen, LPDWORD Unknown1,
DWORD Unknown2)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+RegisterConsoleIME(HWND hWnd, LPDWORD ThreadId)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+RegisterConsoleOS2(BOOL bUnknown)
+{
+ STUB;
+ return FALSE;
+}
+
+DWORD
+WINAPI
+RemoveLocalAlternateComputerNameA(LPSTR lpName, DWORD Unknown)
+{
+ STUB;
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+DWORD
+WINAPI
+RemoveLocalAlternateComputerNameW(LPWSTR lpName, DWORD Unknown)
+{
+ STUB;
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+BOOL
+WINAPI
+SetComPlusPackageInstallStatus(LPVOID lpInfo)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleCursorMode(HANDLE hConsole, BOOL Unknown1, BOOL Unknown2)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleLocalEUDC(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleNlsMode(HANDLE hConsole, DWORD dwMode)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleOS2OemFormat(BOOL bUnknown)
+{
+ STUB;
+ return FALSE;
+}
+
+BOOL
+WINAPI
+UnregisterConsoleIME(VOID)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+BaseCheckRunApp(IN DWORD Unknown1,
+ IN DWORD Unknown2,
+ IN DWORD Unknown3,
+ IN DWORD Unknown4,
+ IN DWORD Unknown5,
+ IN DWORD Unknown6,
+ IN DWORD Unknown7,
+ IN DWORD Unknown8,
+ IN DWORD Unknown9,
+ IN DWORD Unknown10)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+BasepCheckWinSaferRestrictions(IN DWORD Unknown1,
+ IN DWORD Unknown2,
+ IN DWORD Unknown3,
+ IN DWORD Unknown4,
+ IN DWORD Unknown5,
+ IN DWORD Unknown6)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+NumaVirtualQueryNode(IN DWORD Unknown1,
+ IN DWORD Unknown2,
+ IN DWORD Unknown3,
+ IN DWORD Unknown4)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
HANDLE
WINAPI
ReOpenFile(IN HANDLE hOriginalFile,
@@ -965,297 +1309,73 @@
IN DWORD dwShareMode,
IN DWORD dwFlags)
{
- STUB;
- return INVALID_HANDLE_VALUE;
-}
-
-BOOL
-WINAPI
-SetProcessWorkingSetSizeEx(IN HANDLE hProcess,
- IN SIZE_T dwMinimumWorkingSetSize,
- IN SIZE_T dwMaximumWorkingSetSize,
- IN DWORD Flags)
-{
- STUB;
- return FALSE;
-}
-
-
-BOOL
-WINAPI
-GetProcessWorkingSetSizeEx(IN HANDLE hProcess,
- OUT PSIZE_T lpMinimumWorkingSetSize,
- OUT PSIZE_T lpMaximumWorkingSetSize,
- OUT PDWORD Flags)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-GetNumaAvailableMemoryNode(IN UCHAR Node,
- OUT PULONGLONG AvailableBytes)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-GetNumaAvailableMemory(PVOID lpInfo,
- ULONG Length,
- PULONG ReturnLength)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-GetNumaProcessorMap(PVOID lpInfo,
- ULONG Length,
- PULONG ReturnLength)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-NlsResetProcessLocale(VOID)
-{
- STUB;
- return TRUE;
-}
-
-DWORD
-WINAPI
-AddLocalAlternateComputerNameA(LPSTR lpName, PNTSTATUS Status)
-{
- STUB;
- return 0;
-}
-
-DWORD
-WINAPI
-AddLocalAlternateComputerNameW(LPWSTR lpName, PNTSTATUS Status)
-{
- STUB;
- return 0;
-}
-
-NTSTATUS
-WINAPI
-BaseCleanupAppcompatCache(VOID)
-{
- STUB;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-NTSTATUS
-WINAPI
-BaseCleanupAppcompatCacheSupport(PVOID pUnknown)
-{
- STUB;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-BOOL
-WINAPI
-BaseInitAppcompatCache(VOID)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-BaseInitAppcompatCacheSupport(VOID)
-{
- STUB;
- return FALSE;
-}
-
+ STUB;
+ return INVALID_HANDLE_VALUE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetLastConsoleEventActive(VOID)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetConsoleCommandHistoryMode(IN DWORD dwMode)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetLocalPrimaryComputerNameA(IN DWORD Unknown1,
+ IN DWORD Unknown2)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetLocalPrimaryComputerNameW(IN DWORD Unknown1,
+ IN DWORD Unknown2)
+{
+ STUB;
+ return FALSE;
+}
+
+/*
+ * @unimplemented
+ */
VOID
WINAPI
-CreateProcessInternalWSecure(VOID)
-{
- STUB;
-}
-
-DWORD
-WINAPI
-EnumerateLocalComputerNamesA(PVOID pUnknown, DWORD Size, LPSTR lpBuffer, LPDWORD
lpnSize)
-{
- STUB;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-DWORD
-WINAPI
-EnumerateLocalComputerNamesW(PVOID pUnknown, DWORD Size, LPWSTR lpBuffer, LPDWORD
lpnSize)
-{
- STUB;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-PVOID
-WINAPI
-GetComPlusPackageInstallStatus(VOID)
-{
- STUB;
- return NULL;
-}
-
-BOOL
-WINAPI
-GetConsoleCharType(HANDLE hConsole, COORD Coord, PDWORD Type)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-GetConsoleCursorMode(HANDLE hConsole, PBOOL pUnknown1, PBOOL pUnknown2)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-GetConsoleNlsMode(HANDLE hConsole, LPDWORD lpMode)
-{
- STUB;
- return FALSE;
-}
-
-VOID
-WINAPI
-GetDefaultSortkeySize(LPVOID lpUnknown)
-{
- STUB;
- lpUnknown = NULL;
-}
-
-VOID
-WINAPI
-GetLinguistLangSize(LPVOID lpUnknown)
-{
- STUB;
- lpUnknown = NULL;
-}
-
-BOOL
-WINAPI
-OpenDataFile(HANDLE hFile, DWORD dwUnused)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-PrivMoveFileIdentityW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-ReadConsoleInputExA(HANDLE hConsole, LPVOID lpBuffer, DWORD dwLen, LPDWORD Unknown1,
DWORD Unknown2)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-ReadConsoleInputExW(HANDLE hConsole, LPVOID lpBuffer, DWORD dwLen, LPDWORD Unknown1,
DWORD Unknown2)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-RegisterConsoleIME(HWND hWnd, LPDWORD ThreadId)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-RegisterConsoleOS2(BOOL bUnknown)
-{
- STUB;
- return FALSE;
-}
-
-DWORD
-WINAPI
-RemoveLocalAlternateComputerNameA(LPSTR lpName, DWORD Unknown)
-{
- STUB;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-DWORD
-WINAPI
-RemoveLocalAlternateComputerNameW(LPWSTR lpName, DWORD Unknown)
-{
- STUB;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-BOOL
-WINAPI
-SetComPlusPackageInstallStatus(LPVOID lpInfo)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-SetConsoleCursorMode(HANDLE hConsole, BOOL Unknown1, BOOL Unknown2)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-SetConsoleLocalEUDC(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-SetConsoleNlsMode(HANDLE hConsole, DWORD dwMode)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-SetConsoleOS2OemFormat(BOOL bUnknown)
-{
- STUB;
- return FALSE;
-}
-
-BOOL
-WINAPI
-UnregisterConsoleIME(VOID)
-{
- STUB;
- return FALSE;
-}
+SetTermsrvAppInstallMode(IN BOOL bInstallMode)
+{
+ STUB;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+TermsrvAppInstallMode(VOID)
+{
+ STUB;
+ return FALSE;
+}
Modified: branches/cmake-bringup/dll/win32/kernel32/misc/version.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/misc/version.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/misc/version.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -9,10 +9,9 @@
#include <k32.h>
#include <reactos/buildno.h>
-
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32Ver);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32ver;
#define UNICODIZE1(x) L##x
#define UNICODIZE(x) UNICODIZE1(x)
Modified: branches/cmake-bringup/dll/win32/kernel32/nls/cym.nls
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/nls/cym.nls [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/nls/cym.nls [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -130,28 +130,28 @@
LOCALE_SNEGATIVESIGN "-"
LOCALE_SPOSITIVESIGN ""
LOCALE_SSCRIPTS "Latn;"
- LOCALE_SSHORTDATE "dd/MM/yy"
+ LOCALE_SSHORTDATE "dd/MM/yyyy"
LOCALE_SSORTNAME "Default"
LOCALE_STHOUSAND ","
LOCALE_STIME ":"
LOCALE_STIMEFORMAT "HH:mm:ss"
LOCALE_SYEARMONTH "MMMM yyyy"
- LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States"
- LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe"
- LGRPID_BALTIC+LGRPID_RES_BASE "Baltic"
- LGRPID_GREEK+LGRPID_RES_BASE "Greek"
+ LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Unol Gorllewin Ewrop a Unedig"
+ LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Canolog Ewrop"
+ LGRPID_BALTIC+LGRPID_RES_BASE "Baltig"
+ LGRPID_GREEK+LGRPID_RES_BASE "Groeg"
LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic"
LGRPID_TURKISH+LGRPID_RES_BASE "Turkic"
- LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese"
- LGRPID_KOREAN+LGRPID_RES_BASE "Korean"
- LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese"
- LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese"
+ LGRPID_JAPANESE+LGRPID_RES_BASE "Siapaneaidd"
+ LGRPID_KOREAN+LGRPID_RES_BASE "Corea"
+ LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Tseiniaidd Traddodiadol"
+ LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Tseiniaidd Symleiddiedig"
LGRPID_THAI+LGRPID_RES_BASE "Thai"
- LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew"
- LGRPID_ARABIC+LGRPID_RES_BASE "Arabic"
- LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese"
+ LGRPID_HEBREW+LGRPID_RES_BASE "Hebraeg"
+ LGRPID_ARABIC+LGRPID_RES_BASE "Arabeg"
+ LGRPID_VIETNAMESE+LGRPID_RES_BASE "Fietnameg"
LGRPID_INDIC+LGRPID_RES_BASE "Indic"
LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian"
- LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian"
+ LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenia"
}
Modified: branches/cmake-bringup/dll/win32/kernel32/nls/lth.nls
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/nls/lth.nls [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/nls/lth.nls [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -20,7 +20,7 @@
#pragma code_page(65001)
-STRINGTABLE LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT
+STRINGTABLE LANGUAGE LANG_LITHUANIAN, SUBLANG_LITHUANIAN
{
LOCALE_FONTSIGNATURE
L"\x0007\x8000\x3848\x1000\x0000\x0000\x0000\x0000\x0080\x0000\x0000\x0800\x0092\x0000\x0000\xcdd4"
LOCALE_ICALENDARTYPE "1"
Modified: branches/cmake-bringup/dll/win32/kernel32/nls/ukr.nls
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/nls/ukr.nls [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/nls/ukr.nls [iso-8859-1] Fri Aug 13 14:47:01
2010
@@ -136,21 +136,21 @@
LOCALE_STIMEFORMAT "H:mm:ss"
LOCALE_SYEARMONTH "MMMM yyyy' ð.'"
- LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States"
- LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe"
- LGRPID_BALTIC+LGRPID_RES_BASE "Baltic"
- LGRPID_GREEK+LGRPID_RES_BASE "Greek"
- LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic"
- LGRPID_TURKISH+LGRPID_RES_BASE "Turkic"
- LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese"
- LGRPID_KOREAN+LGRPID_RES_BASE "Korean"
- LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese"
- LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese"
- LGRPID_THAI+LGRPID_RES_BASE "Thai"
- LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew"
- LGRPID_ARABIC+LGRPID_RES_BASE "Arabic"
- LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese"
- LGRPID_INDIC+LGRPID_RES_BASE "Indic"
- LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian"
- LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian"
+ LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Çàõ³äíà ªâðîïà ³ Ñïîëó÷åí³ Øòàòè"
+ LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Öåíòðàëüíà ªâðîïà"
+ LGRPID_BALTIC+LGRPID_RES_BASE "Áàëò³éñüêà"
+ LGRPID_GREEK+LGRPID_RES_BASE "Ãðåöüêà"
+ LGRPID_CYRILLIC+LGRPID_RES_BASE "Êèðèëèöÿ"
+ LGRPID_TURKISH+LGRPID_RES_BASE "Òþðêñüêà"
+ LGRPID_JAPANESE+LGRPID_RES_BASE "ßïîíñüêà"
+ LGRPID_KOREAN+LGRPID_RES_BASE "Êîðåéñüêà"
+ LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Êèòàéñüêà òðàäèö³éíà"
+ LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Êèòàéñüêà ñïðîùåíà"
+ LGRPID_THAI+LGRPID_RES_BASE "Òàéñüêà"
+ LGRPID_HEBREW+LGRPID_RES_BASE "²âðèò"
+ LGRPID_ARABIC+LGRPID_RES_BASE "Àðàáñüêà"
+ LGRPID_VIETNAMESE+LGRPID_RES_BASE "Â'ºòíàìñüêà"
+ LGRPID_INDIC+LGRPID_RES_BASE "²íä³éñüêà"
+ LGRPID_GEORGIAN+LGRPID_RES_BASE "Ãðóçèíñüêà"
+ LGRPID_ARMENIAN+LGRPID_RES_BASE "³ðìåíñüêà"
}
Modified: branches/cmake-bringup/dll/win32/kernel32/process/session.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/process/session.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/process/session.c [iso-8859-1] Fri Aug 13
14:47:01 2010
@@ -9,9 +9,9 @@
* 2001-12-07 created
*/
#include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32session);
+#define NDEBUG
+#include <debug.h>
+//static ULONG gDebugChannel = kernel32session; not actually used
DWORD ActiveConsoleSessionId = 0;