mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
d471965c9e
Mon Dec 11 19:08:55 1995 Alexandre Julliard <julliard@sunsite.unc.edu> * [misc/lstr.c] Replaced wine_strncpy() by a 32-bit version of lstrcpyn(), since they do the same job. * [tools/build.c] Fixed __attribute__((stdcall)) to make it compile with gcc versions under 2.7. Doesn't mean it will run OK though... Sat Dec 09 13:22:58 1995 Cameron Heide <heide@ee.ualberta.ca> * [include/kernel32.h] [include/winerror.h] Added file attribute definitions and more error codes. * [win32/error.c] Added some rudimentary errno-to-Win32 error conversion code. * [win32/file.c] Added to GetFileInformationByHandle, filled in some known error codes, and switched to dprintf_win32. * [win32/time.c] Added GetLocalTime. Fri Dec 8 14:37:39 1995 Jim Peterson <jspeter@birch.ee.vt.edu> * [controls/combo.c] Converted functions of the type LONG _(HWND,WORD,LONG) to the type LRESULT _(HWND,WPARAM,LPARAM) where needed. * [include/libres.h] Restructured libres prototypes to closer match the windows API. * [include/windows.h] Changed several API prototypes' parameter types from 'short' to INT, which is #defined as short in the emulator, but is a normal int in WINELIB32. Also changed SEGPTR from DWORD to void* when WINELIB32. (This creates a lot of warnings at library-compile time, but less warnings at app-compile time. I'll remove the warnings soon.) * [loader/resource.c] Fixed parameter mismatch in call to LIBRES_FindResource(). Changed various implementations of the LIBRES_* API functions. * [loader/signal.c] Deleted local 'i' from win_fault(), since it was unused. * [objects/bitblt.c] Mirrored changes to include/windows.h mentioned above. * [toolkit/hello3.c] Changed LoadMenuIndirect() call to LoadMenu() to test the new resource registration technique. * [toolkit/libres.c] Removed definition of 'struct resource' and fixed bugs in the resource implementation. Implemented LIBRES_FindResource. * [windows/graphics.c] Mirrored changes to include/windows.h mentioned above. Thu Dec 7 23:15:56 1995 Martin von Loewis <loewis@informatik.hu-berlin.de> * [controls/edit.c] LOCAL_HeapExists: Changed parameter to HANDLE. For WineLib, return true * [controls/listbox.c] CreateListBoxStruct: Initialize HeapSel to 0 for WineLib * [include/listbox.h] change HeapSel from WORD to HANDLE * [include/resource.h][rc/winerc.c] struct ResourceTable: removed struct resource: moved to header file autoregister resources if supported by compiler * [memory/local.h] LOCAL_GetHeap: expect HANDLE rather than WORD * [toolkit/Makefile.in] Add ALLCFLAGS to make hello3 * [toolkit/heap.c] LocalFree, HEAP_Free: handle 0 parameter gracefully Wed Dec 06 15:34:23 1995 Greg Cooper <cooper@ima-inc.com> * [misc/winsocket.c] Fixed the msgsnd and msgrcv errors that winsock programs get. Wed Dec 06 12:47:23 MET 1995 Sven Verdoolaege <skimo@dns.ufsia.ac.be> * [if1632/kernel.spec] Fixed _hread and _hwrite return type * [if1632/relay32.c] [loader/pe_image.c] Hacked loading of PE-dll's in * [win32/advapi.c] Added stubs for RegCreateKeyEx, RegSetValueEx, RegQueryValueEx * [win32/file.c] Added stubs for OpenFileMapping, CreateFileMapping, MapViewOfFileEx * [win32/process.c] Added stubs for CreateMutexA, ReleaseMutex, CreateEventA, WaitForSingleObject, DuplicateHandle, GetCurrentProcess Mon Dec 04 13:06:37 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [include/wine.h] [misc/lstr.c] Define wine_strncpy(). This function does not pad the buffer with zeroes like GNU strncpy(), which might break some Windows programs that pass bogus size arguments. * [loader/module.c]: GetModuleFileName(), [misc/commdlg.c]: GetFileTitle(), [misc/keyboard.c], [misc/lstr.c]: lstrcpyn(), [misc/ole2nls.c], [misc/profile.c], [multimedia/mcistring.c], [multimedia/mmsystem.c], [objects/font.c]: Use wine_strncpy() where strings are returned to Windows programs. * [objects/metafile.c] PlayMetafile(): Clear the handle table before using it. * [misc/shell.c] [misc/main.c] Rename SHELL_RegCheckForRoot() to SHELL_Init() and call it from main(). * [misc/profile.c] load(): Need to handle comments. * [toolkit/libres.c] Make it compile. * [windows/nonclient.c] Use MAKE_SEGPTR macro in two places where a user heap block used to be allocated instead. Sat Dec 02 16:43:43 1995 Ramon Garcia <ramon@ie3.clubs.etsit.upm.es> * [windows/winpos.c] In function SetWindowPos: do not redraw the parent of a window if the specified window is placed on the top. This avoids that ShowWindow(hwnd,1) hides hwnd instead of showing it. Sat Dec 02 11:00:00 1995 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [windows/scroll.c] Now it can scroll children along with the client region of parent window. Tried to optimize update region calculation. * [windows/mdi.c] ScrollChildren function, more other features added. Basically a rewrite. * [windows/winpos.c] [windows/focus.c] Reimplemented window activation and focus handling. * [windows/nonclient.c] Added new flag WIN_NCACTIVATED. * [windows/message.c] [loader/task.c] Small changes (to maintain linked list of message queues). Wed Nov 29 15:51:48 1995 Daniel Schepler <daniel@shep13.wustl.edu> * [include/options.h] [misc/main.c] [windows/defwnd.c] [windows/event.c] [windows/nonclient.c] [windows/win.c] [Wine.man] Implemented a -managed option to replace the standard Windows frame of top-level windows with the window manager's decorations. If a top-level window makes its own frame, this will still show up, inside the window manager decorations (I believe ctl3dv2.dll would do this, although I can't test this).
469 lines
14 KiB
C
469 lines
14 KiB
C
/*
|
||
* OLE2NLS library
|
||
*
|
||
* Copyright 1995 Martin von Loewis
|
||
*/
|
||
|
||
/* At the moment, these are only empty stubs.
|
||
*/
|
||
|
||
#include <string.h>
|
||
#include "windows.h"
|
||
#include "ole.h"
|
||
#include "winnls.h"
|
||
#include "stddebug.h"
|
||
#include "debug.h"
|
||
|
||
/***********************************************************************
|
||
* GetUserDefaultLCID (OLE2NLS.1)
|
||
*/
|
||
DWORD WINAPI GetUserDefaultLCID()
|
||
{
|
||
/* Default sorting, neutral sublanguage */
|
||
#if #LANG(En)
|
||
return 9;
|
||
#elif #LANG(De)
|
||
return 7;
|
||
#elif #LANG(Es)
|
||
return 7; /* Just a Guess :-) */
|
||
#elif #LANG(Fr)
|
||
return 7; /* ditto :-) */
|
||
#elif #LANG(No)
|
||
return 0x14;
|
||
#else
|
||
/* Neutral language */
|
||
return 0;
|
||
#endif
|
||
}
|
||
|
||
/***********************************************************************
|
||
* GetSystemDefaultLCID (OLE2NLS.2)
|
||
*/
|
||
DWORD WINAPI GetSystemDefaultLCID()
|
||
{
|
||
return GetUserDefaultLCID();
|
||
}
|
||
|
||
/***********************************************************************
|
||
* GetUserDefaultLangID (OLE2NLS.3)
|
||
*/
|
||
WORD WINAPI GetUserDefaultLangID()
|
||
{
|
||
return (WORD)GetUserDefaultLCID();
|
||
}
|
||
|
||
/***********************************************************************
|
||
* GetSystemDefaultLangID (OLE2NLS.4)
|
||
*/
|
||
WORD WINAPI GetSystemDefaultLangID()
|
||
{
|
||
return GetUserDefaultLangID();
|
||
}
|
||
|
||
/***********************************************************************
|
||
* GetLocaleInfoA (OLE2NLS.5)
|
||
* Is the last parameter really WORD for Win16?
|
||
*/
|
||
int WINAPI GetLocaleInfoA(DWORD lcid,DWORD LCType,LPSTR buf,WORD len)
|
||
{
|
||
char *retString;
|
||
int retLen;
|
||
dprintf_ole(stddeb,"GetLocaleInfoA(%8lX,%8lX,%p,%4X)\n",
|
||
lcid,LCType,buf,len);
|
||
/* Wine is supporting only the default locale */
|
||
if(lcid!=GetUserDefaultLCID())
|
||
{
|
||
dprintf_ole(stdnimp,"GetLocaleInfoA: Unknown locale\n");
|
||
return 0;
|
||
}
|
||
/* As an option, we could obtain the value from win.ini.
|
||
This would not match the Wine compile-time option.
|
||
Also, not all identifiers are available from win.ini */
|
||
retString=0;
|
||
retLen=0;
|
||
/* If we are through all of this, retLen should not be zero anymore.
|
||
If it is, the value is not supported */
|
||
#define LOCVAL(type,value) if(type==LCType) \
|
||
{retLen=strlen(value)+1;\
|
||
retString=value; \
|
||
}
|
||
#define UNSUPPORTED(type) if(type==lcid)retString=#type;
|
||
|
||
/* I really wish I would know a better way to do this */
|
||
UNSUPPORTED(LOCALE_ILANGUAGE)
|
||
UNSUPPORTED(LOCALE_SLANGUAGE)
|
||
UNSUPPORTED(LOCALE_SENGLANGUAGE)
|
||
UNSUPPORTED(LOCALE_SABBREVLANGNAME)
|
||
UNSUPPORTED(LOCALE_SNATIVELANGNAME)
|
||
UNSUPPORTED(LOCALE_ICOUNTRY)
|
||
UNSUPPORTED(LOCALE_SCOUNTRY)
|
||
UNSUPPORTED(LOCALE_SENGCOUNTRY)
|
||
UNSUPPORTED(LOCALE_SABBREVCTRYNAME)
|
||
UNSUPPORTED(LOCALE_SNATIVECTRYNAME)
|
||
UNSUPPORTED(LOCALE_IDEFAULTLANGUAGE)
|
||
UNSUPPORTED(LOCALE_IDEFAULTCOUNTRY)
|
||
UNSUPPORTED(LOCALE_IDEFAULTCODEPAGE)
|
||
UNSUPPORTED(LOCALE_IDEFAULTANSICODEPAGE)
|
||
UNSUPPORTED(LOCALE_SLIST)
|
||
UNSUPPORTED(LOCALE_IMEASURE)
|
||
UNSUPPORTED(LOCALE_SDECIMAL)
|
||
UNSUPPORTED(LOCALE_STHOUSAND)
|
||
UNSUPPORTED(LOCALE_SGROUPING)
|
||
UNSUPPORTED(LOCALE_IDIGITS)
|
||
UNSUPPORTED(LOCALE_ILZERO)
|
||
UNSUPPORTED(LOCALE_INEGNUMBER)
|
||
UNSUPPORTED(LOCALE_SNATIVEDIGITS)
|
||
UNSUPPORTED(LOCALE_SCURRENCY)
|
||
UNSUPPORTED(LOCALE_SINTLSYMBOL)
|
||
UNSUPPORTED(LOCALE_SMONDECIMALSEP)
|
||
UNSUPPORTED(LOCALE_SMONTHOUSANDSEP)
|
||
UNSUPPORTED(LOCALE_SMONGROUPING)
|
||
UNSUPPORTED(LOCALE_ICURRDIGITS)
|
||
UNSUPPORTED(LOCALE_IINTLCURRDIGITS)
|
||
UNSUPPORTED(LOCALE_ICURRENCY)
|
||
UNSUPPORTED(LOCALE_INEGCURR)
|
||
UNSUPPORTED(LOCALE_SDATE)
|
||
UNSUPPORTED(LOCALE_STIME)
|
||
UNSUPPORTED(LOCALE_SSHORTDATE)
|
||
UNSUPPORTED(LOCALE_SLONGDATE)
|
||
UNSUPPORTED(LOCALE_STIMEFORMAT)
|
||
UNSUPPORTED(LOCALE_IDATE)
|
||
UNSUPPORTED(LOCALE_ILDATE)
|
||
UNSUPPORTED(LOCALE_ITIME)
|
||
UNSUPPORTED(LOCALE_ITIMEMARKPOSN)
|
||
UNSUPPORTED(LOCALE_ICENTURY)
|
||
UNSUPPORTED(LOCALE_ITLZERO)
|
||
UNSUPPORTED(LOCALE_IDAYLZERO)
|
||
UNSUPPORTED(LOCALE_IMONLZERO)
|
||
UNSUPPORTED(LOCALE_S1159)
|
||
UNSUPPORTED(LOCALE_S2359)
|
||
UNSUPPORTED(LOCALE_ICALENDARTYPE)
|
||
UNSUPPORTED(LOCALE_IOPTIONALCALENDAR)
|
||
UNSUPPORTED(LOCALE_IFIRSTDAYOFWEEK)
|
||
UNSUPPORTED(LOCALE_IFIRSTWEEKOFYEAR)
|
||
UNSUPPORTED(LOCALE_SDAYNAME1)
|
||
UNSUPPORTED(LOCALE_SDAYNAME2)
|
||
UNSUPPORTED(LOCALE_SDAYNAME3)
|
||
UNSUPPORTED(LOCALE_SDAYNAME4)
|
||
UNSUPPORTED(LOCALE_SDAYNAME5)
|
||
UNSUPPORTED(LOCALE_SDAYNAME6)
|
||
UNSUPPORTED(LOCALE_SDAYNAME7)
|
||
UNSUPPORTED(LOCALE_SABBREVDAYNAME1)
|
||
UNSUPPORTED(LOCALE_SABBREVDAYNAME2)
|
||
UNSUPPORTED(LOCALE_SABBREVDAYNAME3)
|
||
UNSUPPORTED(LOCALE_SABBREVDAYNAME4)
|
||
UNSUPPORTED(LOCALE_SABBREVDAYNAME5)
|
||
UNSUPPORTED(LOCALE_SABBREVDAYNAME6)
|
||
UNSUPPORTED(LOCALE_SABBREVDAYNAME7)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME1)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME2)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME3)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME4)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME5)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME6)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME7)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME8)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME9)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME10)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME11)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME12)
|
||
UNSUPPORTED(LOCALE_SMONTHNAME13)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME1)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME2)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME3)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME4)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME5)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME6)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME7)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME8)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME9)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME10)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME11)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME12)
|
||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME13)
|
||
UNSUPPORTED(LOCALE_SPOSITIVESIGN)
|
||
UNSUPPORTED(LOCALE_SNEGATIVESIGN)
|
||
UNSUPPORTED(LOCALE_IPOSSIGNPOSN)
|
||
UNSUPPORTED(LOCALE_INEGSIGNPOSN)
|
||
UNSUPPORTED(LOCALE_IPOSSYMPRECEDES)
|
||
UNSUPPORTED(LOCALE_IPOSSEPBYSPACE)
|
||
UNSUPPORTED(LOCALE_INEGSYMPRECEDES)
|
||
UNSUPPORTED(LOCALE_INEGSEPBYSPACE)
|
||
|
||
/* Now, the language specific definitions. They don't have to be
|
||
complete */
|
||
#if #LANG(De)
|
||
/* This definitions apply to Germany only. Users in Austria
|
||
or Switzerland might want to modify them */
|
||
LOCVAL(LOCALE_ILANGUAGE,"9")
|
||
LOCVAL(LOCALE_SLANGUAGE,"Deutsch")
|
||
LOCVAL(LOCALE_SENGLANGUAGE,"German")
|
||
LOCVAL(LOCALE_SABBREVLANGNAME,"deu")
|
||
LOCVAL(LOCALE_SNATIVELANGNAME,"Deutsch")
|
||
LOCVAL(LOCALE_ICOUNTRY,"49")
|
||
LOCVAL(LOCALE_SCOUNTRY,"Deutschland")
|
||
LOCVAL(LOCALE_SENGCOUNTRY,"Deutschland")
|
||
LOCVAL(LOCALE_SABBREVCTRYNAME,"De")
|
||
LOCVAL(LOCALE_SNATIVECTRYNAME,"Deutschland")
|
||
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9")
|
||
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"49")
|
||
/* Dunno
|
||
LOCVAL(LOCALE_IDEFAULTCODEPAGE)
|
||
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE)
|
||
*/
|
||
LOCVAL(LOCALE_SLIST,";")
|
||
LOCVAL(LOCALE_IMEASURE,"0")
|
||
LOCVAL(LOCALE_SDECIMAL,",")
|
||
LOCVAL(LOCALE_STHOUSAND,".")
|
||
/*
|
||
LOCVAL(LOCALE_SGROUPING)
|
||
*/
|
||
LOCVAL(LOCALE_IDIGITS,"2")
|
||
LOCVAL(LOCALE_ILZERO,"1")
|
||
/*
|
||
LOCVAL(LOCALE_INEGNUMBER)
|
||
Is this "0123456789" ??
|
||
LOCVAL(LOCALE_SNATIVEDIGITS)
|
||
*/
|
||
LOCVAL(LOCALE_SCURRENCY,"DM")
|
||
/*
|
||
LOCVAL(LOCALE_SINTLSYMBOL)
|
||
LOCVAL(LOCALE_SMONDECIMALSEP)
|
||
LOCVAL(LOCALE_SMONTHOUSANDSEP)
|
||
LOCVAL(LOCALE_SMONGROUPING)
|
||
*/
|
||
LOCVAL(LOCALE_ICURRDIGITS,"2")
|
||
/*
|
||
LOCVAL(LOCALE_IINTLCURRDIGITS)
|
||
*/
|
||
LOCVAL(LOCALE_ICURRENCY,"3")
|
||
LOCVAL(LOCALE_INEGCURR,"8")
|
||
LOCVAL(LOCALE_SDATE,".")
|
||
LOCVAL(LOCALE_STIME,":")
|
||
LOCVAL(LOCALE_SSHORTDATE,"dd.MM.yyyy")
|
||
LOCVAL(LOCALE_SLONGDATE,"ddd, d. MMMM yyyy")
|
||
/*
|
||
LOCVAL(LOCALE_STIMEFORMAT)
|
||
*/
|
||
LOCVAL(LOCALE_IDATE,"1")
|
||
/*
|
||
LOCVAL(LOCALE_ILDATE)
|
||
*/
|
||
LOCVAL(LOCALE_ITIME,"1")
|
||
/*
|
||
LOCVAL(LOCALE_ITIMEMARKPOSN)
|
||
LOCVAL(LOCALE_ICENTURY)
|
||
*/
|
||
LOCVAL(LOCALE_ITLZERO,"1")
|
||
/*
|
||
LOCVAL(LOCALE_IDAYLZERO)
|
||
LOCVAL(LOCALE_IMONLZERO)
|
||
LOCVAL(LOCALE_S1159)
|
||
LOCVAL(LOCALE_S2359)
|
||
LOCVAL(LOCALE_ICALENDARTYPE)
|
||
LOCVAL(LOCALE_IOPTIONALCALENDAR)
|
||
LOCVAL(LOCALE_IFIRSTDAYOFWEEK)
|
||
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR)
|
||
*/
|
||
LOCVAL(LOCALE_SDAYNAME1,"Montag")
|
||
LOCVAL(LOCALE_SDAYNAME2,"Dienstag")
|
||
LOCVAL(LOCALE_SDAYNAME3,"Mittwoch")
|
||
LOCVAL(LOCALE_SDAYNAME4,"Donnerstag")
|
||
LOCVAL(LOCALE_SDAYNAME5,"Freitag")
|
||
LOCVAL(LOCALE_SDAYNAME6,"Sonnabend")
|
||
LOCVAL(LOCALE_SDAYNAME7,"Sonntag")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME1,"Mo")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME2,"Di")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME3,"Mi")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME4,"Do")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME6,"Sa")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME7,"So")
|
||
LOCVAL(LOCALE_SMONTHNAME1,"Januar")
|
||
LOCVAL(LOCALE_SMONTHNAME2,"Februar")
|
||
LOCVAL(LOCALE_SMONTHNAME3,"M<EFBFBD>rz")
|
||
LOCVAL(LOCALE_SMONTHNAME4,"April")
|
||
LOCVAL(LOCALE_SMONTHNAME5,"Mai")
|
||
LOCVAL(LOCALE_SMONTHNAME6,"Juni")
|
||
LOCVAL(LOCALE_SMONTHNAME7,"Juli")
|
||
LOCVAL(LOCALE_SMONTHNAME8,"August")
|
||
LOCVAL(LOCALE_SMONTHNAME9,"September")
|
||
LOCVAL(LOCALE_SMONTHNAME10,"Oktober")
|
||
LOCVAL(LOCALE_SMONTHNAME11,"November")
|
||
LOCVAL(LOCALE_SMONTHNAME12,"Dezember")
|
||
LOCVAL(LOCALE_SMONTHNAME13,"")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jan")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME3,"M<EFBFBD>r")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME5,"Mai")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME6,"Jun")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME7,"Jul")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME8,"Aug")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME9,"Sep")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME10,"Okt")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME11,"Nov")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME12,"Dez")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
|
||
/*
|
||
LOCVAL(LOCALE_SPOSITIVESIGN)
|
||
LOCVAL(LOCALE_SNEGATIVESIGN)
|
||
LOCVAL(LOCALE_IPOSSIGNPOSN)
|
||
LOCVAL(LOCALE_INEGSIGNPOSN)
|
||
LOCVAL(LOCALE_IPOSSYMPRECEDES)
|
||
LOCVAL(LOCALE_IPOSSEPBYSPACE)
|
||
LOCVAL(LOCALE_INEGSYMPRECEDES)
|
||
LOCVAL(LOCALE_INEGSEPBYSPACE)
|
||
*/
|
||
#endif /* LANG(De) */
|
||
|
||
#if #LANG(Da)
|
||
/* LOCVAL(LOCALE_ILANGUAGE,"9") */
|
||
LOCVAL(LOCALE_SLANGUAGE,"Dansk")
|
||
LOCVAL(LOCALE_SENGLANGUAGE,"Danish")
|
||
LOCVAL(LOCALE_SABBREVLANGNAME,"dan")
|
||
LOCVAL(LOCALE_SNATIVELANGNAME,"Dansk")
|
||
LOCVAL(LOCALE_ICOUNTRY,"45")
|
||
LOCVAL(LOCALE_SCOUNTRY,"Danmark")
|
||
LOCVAL(LOCALE_SENGCOUNTRY,"Denmark")
|
||
LOCVAL(LOCALE_SABBREVCTRYNAME,"Da")
|
||
LOCVAL(LOCALE_SNATIVECTRYNAME,"Danmark")
|
||
/* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") */
|
||
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"45")
|
||
/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */
|
||
/* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */
|
||
LOCVAL(LOCALE_SLIST,";")
|
||
LOCVAL(LOCALE_IMEASURE,"0")
|
||
LOCVAL(LOCALE_SDECIMAL,",")
|
||
LOCVAL(LOCALE_STHOUSAND,".")
|
||
/* LOCVAL(LOCALE_SGROUPING) */
|
||
LOCVAL(LOCALE_IDIGITS,"2")
|
||
LOCVAL(LOCALE_ILZERO,"1")
|
||
/* LOCVAL(LOCALE_INEGNUMBER) */
|
||
/* LOCVAL(LOCALE_SNATIVEDIGITS) */
|
||
LOCVAL(LOCALE_SCURRENCY,"kr")
|
||
/* LOCVAL(LOCALE_SINTLSYMBOL) */
|
||
LOCVAL(LOCALE_SMONDECIMALSEP,",")
|
||
LOCVAL(LOCALE_SMONTHOUSANDSEP,".")
|
||
/* LOCVAL(LOCALE_SMONGROUPING) */
|
||
LOCVAL(LOCALE_ICURRDIGITS,"2")
|
||
/* LOCVAL(LOCALE_IINTLCURRDIGITS) */
|
||
LOCVAL(LOCALE_ICURRENCY,"3")
|
||
LOCVAL(LOCALE_INEGCURR,"8")
|
||
LOCVAL(LOCALE_SDATE,".")
|
||
LOCVAL(LOCALE_STIME,":")
|
||
LOCVAL(LOCALE_SSHORTDATE,"dd/MM-yyyy")
|
||
LOCVAL(LOCALE_SLONGDATE,"ddd, d. MMMM yyyy")
|
||
/* LOCVAL(LOCALE_STIMEFORMAT) */
|
||
LOCVAL(LOCALE_IDATE,"1")
|
||
/* LOCVAL(LOCALE_ILDATE) */
|
||
LOCVAL(LOCALE_ITIME,"1")
|
||
/* LOCVAL(LOCALE_ITIMEMARKPOSN) */
|
||
/* LOCVAL(LOCALE_ICENTURY) */
|
||
LOCVAL(LOCALE_ITLZERO,"1")
|
||
/* LOCVAL(LOCALE_IDAYLZERO) */
|
||
/* LOCVAL(LOCALE_IMONLZERO) */
|
||
/* LOCVAL(LOCALE_S1159) */
|
||
/* LOCVAL(LOCALE_S2359) */
|
||
/* LOCVAL(LOCALE_ICALENDARTYPE) */
|
||
/* LOCVAL(LOCALE_IOPTIONALCALENDAR) */
|
||
/* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
|
||
/* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */
|
||
LOCVAL(LOCALE_SDAYNAME1,"Mandag")
|
||
LOCVAL(LOCALE_SDAYNAME2,"Tirsdag")
|
||
LOCVAL(LOCALE_SDAYNAME3,"Onsdag")
|
||
LOCVAL(LOCALE_SDAYNAME4,"Torsdag")
|
||
LOCVAL(LOCALE_SDAYNAME5,"Fredag")
|
||
LOCVAL(LOCALE_SDAYNAME6,"L<EFBFBD>rdag")
|
||
LOCVAL(LOCALE_SDAYNAME7,"S<EFBFBD>ndag")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME1,"Ma")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME2,"Ti")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME3,"On")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME4,"To")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME6,"L<EFBFBD>")
|
||
LOCVAL(LOCALE_SABBREVDAYNAME7,"S<EFBFBD>")
|
||
LOCVAL(LOCALE_SMONTHNAME1,"Januar")
|
||
LOCVAL(LOCALE_SMONTHNAME2,"Februar")
|
||
LOCVAL(LOCALE_SMONTHNAME3,"Marts")
|
||
LOCVAL(LOCALE_SMONTHNAME4,"April")
|
||
LOCVAL(LOCALE_SMONTHNAME5,"Maj")
|
||
LOCVAL(LOCALE_SMONTHNAME6,"Juni")
|
||
LOCVAL(LOCALE_SMONTHNAME7,"Juli")
|
||
LOCVAL(LOCALE_SMONTHNAME8,"August")
|
||
LOCVAL(LOCALE_SMONTHNAME9,"September")
|
||
LOCVAL(LOCALE_SMONTHNAME10,"Oktober")
|
||
LOCVAL(LOCALE_SMONTHNAME11,"November")
|
||
LOCVAL(LOCALE_SMONTHNAME12,"December")
|
||
LOCVAL(LOCALE_SMONTHNAME13,"")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jan")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mar")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME5,"Maj")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME6,"Jun")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME7,"Jul")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME8,"Aug")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME9,"Sep")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME10,"Okt")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME11,"Nov")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME12,"Dec")
|
||
LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
|
||
/* LOCVAL(LOCALE_SPOSITIVESIGN) */
|
||
/* LOCVAL(LOCALE_SNEGATIVESIGN) */
|
||
/* LOCVAL(LOCALE_IPOSSIGNPOSN) */
|
||
/* LOCVAL(LOCALE_INEGSIGNPOSN) */
|
||
/* LOCVAL(LOCALE_IPOSSYMPRECEDES) */
|
||
/* LOCVAL(LOCALE_IPOSSEPBYSPACE) */
|
||
/* LOCVAL(LOCALE_INEGSYMPRECEDES) */
|
||
/* LOCVAL(LOCALE_INEGSEPBYSPACE) */
|
||
#endif /* LANG(Da) */
|
||
|
||
/*Insert other languages here*/
|
||
|
||
|
||
|
||
if(!retLen)
|
||
{
|
||
if(!retString)fprintf(stderr,"Unkown LC type %lX\n",LCType);
|
||
else fprintf(stderr,"'%s' not supported for your language.\n",
|
||
retString);
|
||
return 0;
|
||
}
|
||
|
||
if(retLen>len)retLen=len;
|
||
lstrcpyn(buf,retString,len);
|
||
return retLen;
|
||
}
|
||
|
||
|
||
/***********************************************************************
|
||
* CompareStringA (OLE2NLS.8)
|
||
* This implementation ignores the locale, and trusts in libc
|
||
*/
|
||
int CompareStringA(DWORD lcid, DWORD fdwStyle,
|
||
char *s1, int l1, char *s2,int l2)
|
||
{
|
||
int len,ret;
|
||
if(fdwStyle & NORM_IGNORENONSPACE)
|
||
{
|
||
fprintf(stdnimp, "CompareStringA: IGNORENONSPACE not supprted\n");
|
||
}
|
||
if(fdwStyle & NORM_IGNORESYMBOLS)
|
||
fprintf(stdnimp, "CompareStringA: IGNORESYMBOLS not supported\n");
|
||
/* Is strcmp defaulting to string sort or to word sort?? */
|
||
/* FIXME: Handle NORM_STRINGSORT */
|
||
l1 = (l1==-1)?strlen(s1):l1;
|
||
l2 = (l2==-1)?strlen(s2):l2;
|
||
len = l1<l2 ? l1:l2;
|
||
ret = (fdwStyle & NORM_IGNORECASE) ?
|
||
strncasecmp(s1,s2,len) :
|
||
strncmp(s1,s2,len);
|
||
/* not equal, return 1 or 3 */
|
||
if(ret!=0)return ret+2;
|
||
/* same len, return 2 */
|
||
if(l1==l2)return 2;
|
||
/* the longer one is lexically greater */
|
||
return (l1<l2)? 1 : 3;
|
||
}
|
||
|