wine/misc/ole2nls.c
Alexandre Julliard 0c126c7c61 Release 960218
Sun Feb 18 16:35:54 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [controls/desktop.c]
	Look for the wallpaper file in the Windows directory.

	* [controls/menu.c]
	Fixed swapped parameters in SetMenuItemBitmaps().
	Create a separator in MENU_SetItemData() when the string is NULL.

	* [file/dosfs.c]
	DOSFS_FindNext: don't return '.' and '..' in a drive root dir.

	* [files/file.c]
	Added a DOS_FILE structure to store per-file information (not
	really used yet).
	Fixed _lread and _hread to check the size of the buffer before
	calling Unix read() to avoid EFAULT error.

	* [misc/exec.c]
	Return TRUE in WinHelp() for HELP_QUIT to quiet Notepad on exit.

	* [miscemu/instr.c]
	Call DOSMEM_Alarm() in INSTR_ReplaceSelector(). This should fix
 	programs that poll the BIOS counter, provided they reload the
 	selector on every read.

	* [miscemu/int21.c]
	Re-implemented FindFirst/FindNext for FCB calls.

	* [windows/message.c] [windows/winpos.c]
	Merged MSG_GetWindowForEvent() and WINPOS_WindowFromPoint().

	* [windows/nonclient.c] [windows/win.c] [include/windows.h]
	Added a per-window WIN_MANAGED flag; only windows that have a
	dialog frame or a sizing border are managed.

Sat Feb 17 18:25:00 1996  Thomas Sandford <tdgsandf@prds-grn.demon.co.uk>

	* [if1632/Makefile.in]
	Added -g flag to compilation of .c files generated from *32.spec.

	* [if1632/gdi32.spec]
	Numerous additional functions implemented.

	* if1632/user32.spec]
	wsprintfA maps to vsprintf not wsprintf
	Numerous additional functions implemented.

	* [include/gdi.h] [objects/gdiobj.c]
	New #define MAGIC_DONTCARE added. This is used in
	GDI_GetObjPtr to enable getting a pointer to a GDI object of
	unknow type.

	* [win32/gdi32.c]
	New file.

	* [win32/param32.c]
	WIN32_MoveToEx() - handle NULL pointer argument.

	* [win32/user32.c]
	USER32_InvalidateRect - handle passing of a NULL pointer.
	USER32_SetTimer - New function.

	* [files/directory.c]
	Fixed DIR_Init() (off by one in allocation of space for
	environment variables).

	* [files/drive.c]
	Added <sys/types.h> to #includes (prerequisite for <sys/stat.h>
	on FreeBSD).

Fri Feb 16 10:26:56 1996  Andreas Kirschbaum <ank@rbg.informatik.th-darmstadt.de>

	* [controls/menu.c]
	Memory leak plugged.

	* [controls/edit.c]
	Erase space with function ExtTextOut(). This eliminates the use of
 	xmalloc().  Memory leak in EDIT_WriteText plugged.

	* [debugger/db_disasm.c]
	Operand for scas now is di.

	* [files/profile.c]
	PROFILE_GetSection was copying too much data.
	PROFILE_GetSection now returns the correct value. It was returning
 	the number of unused instead of used bytes.

	* [objects/dc.c]
	Corrected two typos in comments.

	* [objects/font.c]
	FONT_MatchFont didn't return if it couldn't find any font.

	* [objects/oembitmap.c]
	Free object only if it has been allocated.

	* [windows/scroll.c]
	Memory leak in ScrollDC plugged.

Tue Feb 13 11:17:00 1996 William Magro  <wmagro@tc.cornell.edu>

	* [controls/edit.c]
	Implemented ES_NOHIDESEL style, shift+click selection,
 	shift+{arrow,home,end,pgup,pgdn} selection.  Optimized
	(de)selection drawing.  Changed selection drawing to use correct
 	system colors instead of inverting.  Fixed deleting or backspacing
 	across a '\r\n' end of line pair.  Selection now anchors
 	correctly. Fixed text leaking and extra garbage problem bug
 	uncovered by change in class style in wine960131.

	* [controls/widgets.c]
	Class flags now match those of Windows.

Mon Feb 12 21:28:19 1996  Martin von Loewis <loewis@informatik.hu-berlin.de>

	* [controls/widgets.c]
	WIDGETS_Init: RELAY32_GetEntryPoint does not take a string anymore.

	* [if1632/Makefile.in][if1632/relay32.c][include/relay32.h]
	comctl32.spec ole32.spec winspool.spec: new files.
	RELAY32_Init: call initialization of new DLLs.
	RELAY32_GetEntryPoint: expects WIN32_builtin* now.
	RELAY32_MakeFakeModule: new function.

	* [if1632/gdi32.spec][if1632/kernel32.spec][if1632/user32.spec]
	Added Win95 functions. Ordinals now differ from both NT and Win95
	HeapCreate, CreateDialogIndirectParamA, CreateDialogIndirectParamW,
	CreateDialogParamA, CreateDialogParamW, DialogBoxIndirectParamA
	DialogBoxIndirectParamW, DialogBoxParamA, DialogBoxParamW:
	new relays.

	* [if1632/shell32.spec]
	shell32.spec: renumbered all functions to take into account ordinals.
	These seem to be identical between NT and Win95.

	* [include/dialog.h][windows/dialog.c]
	xBaseUnit,yBaseUnit,DIALOG_DoDialogBox: made non-static.

	* [include/handle32.h]
	New handle types VRANGE, HEAP, HEAPITEM.

	* [include/pe_image.h][loader/pe_image.c]
	struct w_files: new field builtin.
	PE_FindExportedFunction: support ordinals.
	PE_GetProcAddress: call RELAY32_GetEntryPoint for builtins.
	fixup_imports: support ordinals.
	PE_LoadImage: prefer directories over segments.

	* [include/resource.h][win32/resource.c]
	FindResource32: changed parameter from LPCTSTR to LPCWSTR
		check LANG_NEUTRAL if LANG_ENGLISH fails.
	LoadAcceleratorsW,SizeofResource32,AccessResource32: 
		disabled because it's broken.
	Casted to and from LPWSTR at various places.

	* [include/string32.h][win32/string32.c]
	Changed prototypes to take const arguments where appropriate.

	* [include/struct32.h]
	New structures DLGTEMPLATE32, DLGITEMTEMPLATE32.

	* [tools/build.c]
	BuildSpec32Files: generate Base value into code, generate call to
	RELAY32_MakeFakeModule.
	
	* [win32/heap.c]
	This is still not finished and needs rework.
	HeapAlloc: renamed to SIMPLE_HeapAlloc, implemented HeapAlloc.
	HeapCreate: implemented on top of VirtualAlloc, which does not work yet
	HeapDestroy, HEAP_GrowHeap, HeapFree: new functions.

	* [win32/memory.c]
	Support for VRANGE_OBJECT. This is not yet called from any place,
	and needs more platform specific support
	MEMORY_FindVrange, MEMORY_IsVrangeFree, MEMORY_InsertVrange,
	MEMORY_AllocVrange, MEMORY_ReleaseVrange: new functions.

	* [win32/user32.c]
	WIN32_CreateWindowExA: don't GlobalAlloc for integer class and window
	names, as in dialogs.
	Implemented dialog functions (see user32.spec).

	* [windows/caret.c]
	CARET_Initialize: call RELAY32_GetBuiltinDLL.

Mon Feb 12 18:52:40 1996  Jim Peterson <jspeter@birch.ee.vt.edu>

	* [controls/edit.c]
	Removed commented out #ifdefs for WINELIB.

	* [tools/makehtml.pl]
	Put in error checking when trying to open a file.

	* [libtest/Makefile.in] [libtest/new.c] [libtest/hello4.c]
	Added two new targets: hello4 and new.

	* [include/windows.h]
	Added definition of DEVMODE structure, although it's not yet used.
  	Modified various API functions from CreateDC() to Escape(), in
 	order to make them more compliant with the strict API definitions.

	* [include/wintypes.h]
	Added 'typedef char TCHAR'.  It probably should be defined as
	'short', but then we would have to support such characters.  Also did
	'typedef const TCHAR* LPCTSTR' and 'typedef TCHAR* LPTSTR'.
	Also defined WNDENUMPROC, FONTENUMPROC, GOBJENUMPROC, PROPENUMPROC
	MFENUMPROC, and HGDIOBJ.

Mon Feb  5 16:42:07 1996  Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>

	* [misc/commdlg.c]
	Patched a bug that occurred in the internal COMMDLG module for the
 	FileOpen(), FileSave() and FileSaveAs() functions.  The file-type
 	combobox is now handled correctly.

Fri Feb  2 22:52:58 1996  Roman Dolejsi  <roman@sorry.vse.cz>

	* [resources/sysres_Cz.rc]
	Added support for Czech [Cz] language.

Thu Feb  1 00:35:04 1996  Philippe De Muyter  <phdm@info.ucl.ac.be>

	* [objects/font.c]
	FONT_matchfont : for fixed-spacing fonts, allow 'c' if 'm' fails;
	for variable-spacing fonts : allow '*' if 'p' fails; if asked lfHeight
	is -1, assume 0.
	CreateFontIndirect : if font parameter is NULL, issue an error message.
	CreateFont : null-terminate lfFaceName.
	ParseFontParms : debug code turned off : too verbose.
	InitFontsList : recognize *-c-* fonts as fixed-spacing fonts.

	* [objects/color.c]
	ColorToPhysical : admit 0xff...... COLORREF's as 0x00...... ones.
1996-02-18 18:44:41 +00:00

473 lines
14 KiB
C
Raw Blame History

/*
* 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 "options.h"
#include "winnls.h"
#include "stddebug.h"
#include "debug.h"
/***********************************************************************
* GetUserDefaultLCID (OLE2NLS.1)
*/
DWORD WINAPI GetUserDefaultLCID()
{
/* Default sorting, neutral sublanguage */
switch(Options.language)
{
case LANG_En: return 0x09;
case LANG_Es: return 0x07; /* Just a Guess :-) */
case LANG_De: return 0x07;
case LANG_No: return 0x14;
case LANG_Fr:
case LANG_Fi:
case LANG_Da:
case LANG_Cz:
default:
return 0; /* Neutral language */
}
}
/***********************************************************************
* 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 */
switch(Options.language)
{
case 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)
*/
break; /* LANG(De) */
case 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) */
break; /* LANG(Da) */
/*Insert other languages here*/
default:
break;
} /* switch */
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) ?
lstrncmpi(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;
}