2000-05-07 18:30:44 +00:00
|
|
|
/*
|
|
|
|
* OLE2NLS library
|
|
|
|
*
|
|
|
|
* Copyright 1995 Martin von Loewis
|
|
|
|
* Copyright 1998 David Lee Lambert
|
2008-10-18 17:20:29 +00:00
|
|
|
* Copyright 2000 Julio César Gázquez
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2000-05-07 18:30:44 +00:00
|
|
|
*/
|
2001-07-20 18:00:00 +00:00
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2000-05-07 18:30:44 +00:00
|
|
|
#include <string.h>
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
2000-05-07 18:30:44 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <locale.h>
|
2000-12-19 04:53:20 +00:00
|
|
|
|
2000-05-07 18:30:44 +00:00
|
|
|
#include "windef.h"
|
2000-12-19 04:53:20 +00:00
|
|
|
#include "winbase.h"
|
2000-05-07 18:30:44 +00:00
|
|
|
#include "winnls.h"
|
2001-07-20 18:00:00 +00:00
|
|
|
#include "winuser.h"
|
|
|
|
|
|
|
|
#include "wine/winbase16.h"
|
|
|
|
|
2002-03-09 23:29:33 +00:00
|
|
|
#include "wine/debug.h"
|
2000-05-07 18:30:44 +00:00
|
|
|
|
2002-03-09 23:29:33 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
2000-05-07 18:30:44 +00:00
|
|
|
|
|
|
|
static LPVOID lpNLSInfo = NULL;
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* GetLocaleInfoA [OLE2NLS.5]
|
2000-05-07 18:30:44 +00:00
|
|
|
* 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);
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* GetStringTypeA [OLE2NLS.7]
|
2000-05-07 18:30:44 +00:00
|
|
|
*/
|
|
|
|
BOOL16 WINAPI GetStringType16(LCID locale,DWORD dwInfoType,LPCSTR src,
|
|
|
|
INT16 cchSrc,LPWORD chartype)
|
|
|
|
{
|
|
|
|
return GetStringTypeExA(locale,dwInfoType,src,cchSrc,chartype);
|
|
|
|
}
|
|
|
|
|
2001-06-28 17:59:22 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* GetUserDefaultLCID [OLE2NLS.1]
|
|
|
|
*/
|
|
|
|
LCID WINAPI GetUserDefaultLCID16(void)
|
|
|
|
{
|
|
|
|
return GetUserDefaultLCID();
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* GetSystemDefaultLCID [OLE2NLS.2]
|
|
|
|
*/
|
|
|
|
LCID WINAPI GetSystemDefaultLCID16(void)
|
|
|
|
{
|
|
|
|
return GetSystemDefaultLCID();
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* GetUserDefaultLangID [OLE2NLS.3]
|
|
|
|
*/
|
|
|
|
LANGID WINAPI GetUserDefaultLangID16(void)
|
|
|
|
{
|
|
|
|
return GetUserDefaultLangID();
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* GetSystemDefaultLangID [OLE2NLS.4]
|
|
|
|
*/
|
|
|
|
LANGID WINAPI GetSystemDefaultLangID16(void)
|
|
|
|
{
|
|
|
|
return GetSystemDefaultLangID();
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* LCMapStringA [OLE2NLS.6]
|
|
|
|
*/
|
2005-09-27 09:32:41 +00:00
|
|
|
INT16 WINAPI LCMapString16(LCID lcid, DWORD mapflags, LPCSTR srcstr, INT16 srclen,
|
|
|
|
LPSTR dststr, INT16 dstlen)
|
2001-06-28 17:59:22 +00:00
|
|
|
{
|
|
|
|
return LCMapStringA(lcid, mapflags, srcstr, srclen, dststr, dstlen);
|
|
|
|
}
|
|
|
|
|
2000-05-07 18:30:44 +00:00
|
|
|
/***********************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* CompareStringA (OLE2NLS.8)
|
2000-05-07 18:30:44 +00:00
|
|
|
*/
|
2015-12-21 09:15:59 +00:00
|
|
|
INT16 WINAPI CompareString16(LCID lcid, DWORD flags, LPCSTR str1, INT16 len1, LPCSTR str2, INT16 len2)
|
2000-05-07 18:30:44 +00:00
|
|
|
{
|
2015-12-21 09:15:59 +00:00
|
|
|
return CompareStringA(lcid, flags, str1, len1, str2, len2);
|
2000-05-07 18:30:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-06-19 18:20:47 +00:00
|
|
|
* RegisterNLSInfoChanged [OLE2NLS.9]
|
2000-05-07 18:30:44 +00:00
|
|
|
*/
|
2000-12-01 23:58:28 +00:00
|
|
|
BOOL16 WINAPI RegisterNLSInfoChanged16(LPVOID lpNewNLSInfo) /* [???] FIXME */
|
2000-05-07 18:30:44 +00:00
|
|
|
{
|
|
|
|
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 */
|
2002-05-31 23:06:46 +00:00
|
|
|
}
|