Commit ecd921e5 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Separate OLE2NLS out of KERNEL.

parent aceeaa94
......@@ -77,6 +77,7 @@ EXTRADLLNAMES = \
msvideo \
ole2 \
ole2disp \
ole2nls \
olecli \
olesvr \
rasapi16 \
......@@ -227,7 +228,7 @@ libmsvfw32.@LIBEXT@ libmsvideo.@LIBEXT@: msvideo/libmsvfw32.@LIBEXT@
libodbc32.@LIBEXT@: odbc32/libodbc32.@LIBEXT@
$(RM) $@ && $(LN_S) odbc32/libodbc32.@LIBEXT@ $@
libole32.@LIBEXT@ libole2.@LIBEXT@ libstorage.@LIBEXT@ libcompobj.@LIBEXT@: ole32/libole32.@LIBEXT@
libole32.@LIBEXT@ libole2.@LIBEXT@ libole2nls.@LIBEXT@ libstorage.@LIBEXT@ libcompobj.@LIBEXT@: ole32/libole32.@LIBEXT@
$(RM) $@ && $(LN_S) ole32/libole32.@LIBEXT@ $@
liboleaut32.@LIBEXT@ libole2disp.@LIBEXT@ libtypelib.@LIBEXT@: oleaut32/liboleaut32.@LIBEXT@
......
......@@ -4,9 +4,9 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ole32
SOVERSION = 1.0
ALTNAMES = ole2 storage compobj
ALTNAMES = ole2 ole2nls storage compobj
SPEC_SRCS = ole32.spec ole2.spec storage.spec compobj.spec
SPEC_SRCS = ole32.spec ole2.spec ole2nls.spec storage.spec compobj.spec
C_SRCS = \
antimoniker.c \
......@@ -26,6 +26,7 @@ C_SRCS = \
ole2.c \
ole2stubs.c \
ole2impl.c \
ole2nls.c \
oleobj.c \
stg_bigblockfile.c \
stg_stream.c \
......
/*
* OLE2NLS library
*
* Copyright 1995 Martin von Loewis
* Copyright 1998 David Lee Lambert
* Copyright 2000 Julio Csar Gzquez
*/
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <locale.h>
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "heap.h"
#include "options.h"
#include "winver.h"
#include "winnls.h"
#include "winreg.h"
#include "winerror.h"
#include "debugtools.h"
#include "crtdll.h"
#include "main.h"
DEFAULT_DEBUG_CHANNEL(ole);
static LPVOID lpNLSInfo = NULL;
/******************************************************************************
* GetLocaleInfo16 [OLE2NLS.5]
* Is the last parameter really WORD for Win16?
*/
INT16 WINAPI GetLocaleInfo16(LCID lcid,LCTYPE LCType,LPSTR buf,INT16 len)
{
return GetLocaleInfoA(lcid,LCType,buf,len);
}
/******************************************************************************
* GetStringType16 [OLE2NLS.7]
*/
BOOL16 WINAPI GetStringType16(LCID locale,DWORD dwInfoType,LPCSTR src,
INT16 cchSrc,LPWORD chartype)
{
return GetStringTypeExA(locale,dwInfoType,src,cchSrc,chartype);
}
/***********************************************************************
* CompareString16 (OLE2NLS.8)
*/
UINT16 WINAPI CompareString16(DWORD lcid,DWORD fdwStyle,
LPCSTR s1,DWORD l1,LPCSTR s2,DWORD l2)
{
return (UINT16)CompareStringA(lcid,fdwStyle,s1,l1,s2,l2);
}
/******************************************************************************
* RegisterNLSInfoChanged [OLE2NLS.10]
*/
BOOL16 WINAPI RegisterNLSInfoChanged16(LPVOID/*FIXME*/ lpNewNLSInfo)
{
FIXME("Fully implemented, but doesn't effect anything.\n");
if (!lpNewNLSInfo) {
lpNLSInfo = NULL;
return TRUE;
}
else {
if (!lpNLSInfo) {
lpNLSInfo = lpNewNLSInfo;
return TRUE;
}
}
return FALSE; /* ptr not set */
}
name ole2nls
type win16
1 pascal GetUserDefaultLCID() GetUserDefaultLCID
2 pascal GetSystemDefaultLCID() GetSystemDefaultLCID
3 pascal GetUserDefaultLangID() GetUserDefaultLangID
4 pascal GetSystemDefaultLangID() GetSystemDefaultLangID
5 pascal GetLocaleInfoA(long long ptr word) GetLocaleInfo16
6 stub LCMAPSTRINGA
7 pascal16 GetStringTypeA(long long str word ptr) GetStringType16
8 pascal16 CompareStringA(long long str word str word) CompareString16
9 pascal16 RegisterNLSInfoChanged(ptr) RegisterNLSInfoChanged16
#10 stub WEP
11 stub LIBMAIN
12 stub NOTIFYWINDOWPROC
......@@ -11,7 +11,6 @@ SPEC_SRCS = \
dispdib.spec \
kernel.spec \
ole2conv.spec \
ole2nls.spec \
ole2prox.spec \
ole2thk.spec \
system.spec \
......
......@@ -36,8 +36,6 @@ struct NLS_langlocale {
} locvars[120];
};
static LPVOID lpNLSInfo = NULL;
#define LANG_BEGIN(l,s) { MAKELANGID(l,s), {
#define LOCVAL(type,value) {type,value},
......@@ -620,7 +618,7 @@ const struct map_lcid2str {
static char *GetLocaleSubkeyName( DWORD lctype );
/***********************************************************************
* GetUserDefaultLCID (OLE2NLS.1)
* GetUserDefaultLCID [KERNEL32.425] [OLE2NLS.1]
*/
LCID WINAPI GetUserDefaultLCID()
{
......@@ -628,7 +626,7 @@ LCID WINAPI GetUserDefaultLCID()
}
/***********************************************************************
* GetSystemDefaultLCID (OLE2NLS.2)
* GetSystemDefaultLCID [KERNEL32.400] [OLE2NLS.2]
*/
LCID WINAPI GetSystemDefaultLCID()
{
......@@ -636,7 +634,7 @@ LCID WINAPI GetSystemDefaultLCID()
}
/***********************************************************************
* GetUserDefaultLangID (OLE2NLS.3)
* GetUserDefaultLangID [KERNEL32.426] [OLE2NLS.3]
*/
LANGID WINAPI GetUserDefaultLangID()
{
......@@ -683,7 +681,7 @@ LANGID WINAPI GetUserDefaultLangID()
}
/***********************************************************************
* GetSystemDefaultLangID (OLE2NLS.4)
* GetSystemDefaultLangID [KERNEL32.401] [OLE2NLS.4]
*/
LANGID WINAPI GetSystemDefaultLangID()
{
......@@ -691,14 +689,6 @@ LANGID WINAPI GetSystemDefaultLangID()
}
/******************************************************************************
* GetLocaleInfo16 [OLE2NLS.5]
* Is the last parameter really WORD for Win16?
*/
INT16 WINAPI GetLocaleInfo16(LCID lcid,LCTYPE LCType,LPSTR buf,INT16 len)
{
return GetLocaleInfoA(lcid,LCType,buf,len);
}
/******************************************************************************
* ConvertDefaultLocale32 [KERNEL32.147]
*/
LCID WINAPI ConvertDefaultLocale32 (LCID lcid)
......@@ -1632,14 +1622,6 @@ const WORD OLE2NLS_CT_CType3_LUT[] = {
};
/******************************************************************************
* GetStringType16 [OLE2NLS.7]
*/
BOOL16 WINAPI GetStringType16(LCID locale,DWORD dwInfoType,LPCSTR src,
INT16 cchSrc,LPWORD chartype)
{
return GetStringTypeExA(locale,dwInfoType,src,cchSrc,chartype);
}
/******************************************************************************
* GetStringTypeA [KERNEL32.396]
*/
BOOL WINAPI GetStringTypeA(LCID locale,DWORD dwInfoType,LPCSTR src,
......@@ -2830,14 +2812,6 @@ INT WINAPI LCMapStringW(
}
}
/***********************************************************************
* CompareString16 (OLE2NLS.8)
*/
UINT16 WINAPI CompareString16(DWORD lcid,DWORD fdwStyle,
LPCSTR s1,DWORD l1,LPCSTR s2,DWORD l2)
{
return (UINT16)CompareStringA(lcid,fdwStyle,s1,l1,s2,l2);
}
/***********************************************************************
* OLE2NLS_EstimateMappingLength
......@@ -2972,30 +2946,6 @@ UINT WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle,
}
/******************************************************************************
* RegisterNLSInfoChanged [OLE2NLS.10]
*/
BOOL16 WINAPI RegisterNLSInfoChanged16(LPVOID/*FIXME*/ lpNewNLSInfo)
{
FIXME("Fully implemented, but doesn't effect anything.\n");
if (!lpNewNLSInfo)
{
lpNLSInfo = NULL;
return TRUE;
}
else
{
if (!lpNLSInfo)
{
lpNLSInfo = lpNewNLSInfo;
return TRUE;
}
}
return FALSE; /* ptr not set */
}
/******************************************************************************
* OLE_GetFormatA [Internal]
*
* FIXME
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment