wine/ole/ole2nls.c
Alexandre Julliard a845b88ead Release 980601
Sun May 31 13:40:13 1998  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [if1632/signal.c]
	Added display of exception name.

	* [loader/task.c]
	Yet another attempt at fixing SwitchStackTo/SwitchStackBack.

	* [memory/selector.c] [relay32/builtin32.c] [tools/build.c]
	  [win32/kernel32.c]
	Generate an assembly stub for Win32 register functions to make
	their names available at link time.

	* [programs/*/Makefile.in]
	Added hacks to support old resource compiler.

Fri May 29 16:27:14 1998  Marcus Meissner <marcus@jet.franken.de>

	* [tools/testrun]
	Merge of my testscripts at home into one single perl program
	(tested with perl5). Works only on Linux due to 'ps' and 'ipcs'
	magic.

	* [controls/menu.c]
	Added some DefaultMenuItem stubs.

	* [debugger/stabs.c]
	Fixed stabs loading, now supports (int,int) typeinfo format used
	by gcc-2.8 and egcs-1. If it still crashes, please mail me.

	* [if1632/][relay32/]
	Added msvideo.dll (stubs only)
	Replaced some ptr by str for stringcases
	Added some new stubs (VxDCall, FindCloseNotif....)

	* [misc/network.c]
	Some argument fixes.

	* [misc/registry.c][misc/cpu.c]
	Registry initialization partially rewritten and enhanced.

	* [scheduler/*.c]
	Some additions so we don't do kill(0,SIGUSR1) (kill processgroup
	instead of targeted thread)
	Added SetThreadContext.

Thu May 28 23:59:59 1998  Bertho Stultiens <bertho@akhphd.au.dk>

	* [tools/wrc/*]
	New resource compiler version 1.0.0 (28-May-1998)

	* [Make.rules.in] [Makefile.in]
	Changed and added rc rules to point to tools/wrc/wrc.

	* [configure.in] [include/config.h.in]
	Added check for function 'stricmp'.

	* [include/resource.h]
	Commented out the old resource structure to catch references.
	It also includes wrc_rsc.h.

	* [include/wrc_rsc.h]
	New file. Definitions for the resources generated with wrc.

	* [include/windows.h]
	Added #ifdef RC_INVOKED to exclude stdarg.h.
	Added SS_NOTIFY flag.

	* [include/winnls.h]
	Added SUBLANG_* definitions and corrected some defaults.

	* [loader/libres.c]
	Changed the sysres load functions to support wrc generated
	resources.

	* [resource/sysres_*.rc]
	Added #include <windows.h>

	* [resource/sysres.c]
	Changed declarations to match wrc's output

	* [resource/Makefile.in]
	Changed rules to work with wrc.

	* [tools/makedep.c]
	Changed generation of .rc file dependencies to .s target.

Thu May 28 22:28:39 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [files/file.c][include/windows.c][relay32/kernel32.spec]
	Implemented GetFileAttributesEx32A/W.

	* [misc/imagelist.h][include/commctrl.h][relay32/comctl32.spec]
	Added ImageList_Read and ImageList_Write stubs.
	Added ImageList_AddIcon function.
	Added ImageList_LoadImage. It is the same as ImageList_LoadImage32A.

	* [controls/header.c]
	Fixed bitmap drawing bug.
	Added full bitmap support.

	* [include/commctrl.h]
	Added missing header macros.

	* [controls/toolbar.c][include/toolbar.h][include/commctrl.h]
	  [controls/commctrl.c] [relay32/comctl32.spec]
	First implementation of toolbar control.
	Implemented CreateToolbar, CreateToolbarEx and CreateMappedBitmap.

	* [controls/progress.c][controls/status.c]
	Some code cleanup.

	* [controls/commctrl.c][include/commctrl.h][relay32/comctl32.spec]
	Removed CreateStatusWindow16 and DrawStatusText16.
	CreateStatusWindow is the same as CreateStatusWindow32A.
	DrawStatusText is the same as DrawStatusText32A.

Thu May 28 16:01:28 1998  Matthew J. Francis  <asbel@dial.pipex.com>

	* [objects/bitmap.c] [objects/bitmap.h] [objects/oembitmap.c]
	  [objects/dc.c] [graphics/x11drv/bitblt.c]
	Added partial implementation of CreateDIBSection, with great thanks
	to Ulrich Weigand <weigand@informatik.uni-erlangen.de> for
	contributing the bulk of the patch.

Wed May 27 19:04:31 1998  Ulrich Weigand <weigand@informatik.uni-erlangen.de>

	* [win32/kernel32.c] [if1632/thunk.c] [include/flatthunk.h]
	ThunkConnect16 and related functions moved to emulator.

	* [loader/ne/segment.c]
	Call DllEntryPoint with correct arguments.

	* [relay32/builtin32.c]
	Bugfix: Relay debugging did not work for multiple processes.

	* [controls/menu.c]
	Bugfix: dwItemData was not set for MF_OWNERDRAW menus.

	* [if1632/relay.c] [relay32/relay386.c]
	Relay messages converted to use DPRINTF.

	* [controls/desktop.c] [relay32/user32.spec]
	Implemented PaintDesktop.

	* [files/profile.c] [if1632/kernel.spec] [misc/network.c]
	  [misc/printdrv.c] [relay32/winspool.spec] 
	  [win32/ordinals.c] [relay32/kernel32.spec]
	Some stubs added.

	* [relay32/mpr.spec]
	All ordinals were off by one.

Tue May 26 13:32:57 1998  Bill Hawes <whawes@star.net>

	* [misc/lstr.c] [include/casemap.h] [tools/unimap.pl]
	Added Unicode case conversion routines towupper/towlower,
	with mapping tables casemap.h created by tools/unimap.pl.

	* [misc/ntdll.c] [include/winnls.h] [relay32/ntdll.spec]
	  [relay32/advapi.spec]
	Minimal implementation of IsTextUnicode, just enough to get
	NT4 notepad to open ascii/unicode files.

	* [Make.rules.in] [resources/sysres_En.rc]
	Added include file dlgs.h for building resource files, so that
	resources can refer to defined values (e.g. pshHelp).

	* [misc/crtdll.c] [relay32/crtdll.spec]
	Use towupper/towlower for 32W case conversions.

	* [memory/string.c]
	Use towupper for 32W case conversions.

	* [ole/ole2nls.c]
	Use towupper for 32W case conversions; fix mem leak; minor cleanup

	* [controls/edit.c]
	Added soft break flag to edit state. Print unknown action values
	for WM_VSCROLL (action 190 occurs when running NT4 notepad.)

Mon May 25 22:42:40 1998  Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

	* [files/file.c]
	Care for a pathological case in SetFilePointer.

	* [graphics/x11drv/xfont.c]
	Handle longer Font names in LFD_ComposeLFD and try to catch errors.

	* [loader/pe_image.c]
	Unload Dummymodule when PE_LoadLibraryEx32A fails with
	PE_LoadImage (makes Encarta 98 installer proceed).

	* [misc/registry.c]
	Move a check for a special case in RegCreateKeyEx32W after the
	check for existence.

Tue May 25 20:18:26 1998  Matthew Becker <mbecker@glasscity.net>

	* [misc/ntdll.c]
	Added some stubs, just guessing at the size of their param lists.

	* [misc/registry.c]
	Added stubs for RegUnLoadKey, RegSetKeySecurity, RegSaveKey,
	RegRestoreKey, and RegReplaceKey

	* [programs/regtest/regtest.c]
	Updated registry testing program.

Sun May 24 18:11:40 1998  Alex Priem <alexp@sci.kun.nl>

	* [file/profile.c]
	Added flag 'return_values' to PROFILE_GetSection.

Sun May 24 13:41:10 1998  James Juran <jrj120@psu.edu>

	* [misc/shell.c] [files/directory.c]
	Documentation/debugging info additions.

	* [*/*.c] [include/*.h]
	Moved many extern function definitions to appropriate header files.
	Cleaned up a few compile warnings.
	If #include "debug.h" is present, removed #include <stdio.h>.
	debug.h includes stdio.h, so it is not necessary to include both.

	* [graphics/*.c] [if1632/signal.c] [ipc/*.c] [scheduler/*.c]
	  [win32/*.c] [windows/*.c]
	Final patch to convert fprintf statements to new debugging interface.
	Some fprintfs are still left, especially in the debugger/ directory.
	However, IMHO, it's not worth the effort to change the rest.

Fri May 22 21:58:35 1998  Morten Welinder  <terra@diku.dk>

	* [windows/keyboard.c]
	Correct handling of keys "`-=[]\;',./".

Fri May 22 12:06:00 1998  Per Lindström <pelinstr@algonet.se>

	* [include/windows.h] [relay32/kernel32.spec] [win32/console.c]
	Added stub for ReadConsoleOutputCharacter32A.

Thu May 21 16:45:48 1998  Pascal Cuoq <pcuoq@ens-lyon.fr>

	* [ole/ole2nls.c]
	Began better implementation of LCMapString32A.
	Not very well tested yet, and still need improvements.

	* [controls/scroll.c]
	Documented functions.

Wed May 20 21:37:56 1998  Peter Hunnisett <hunnise@nortel.ca>

	* [include/windows.h][misc/main.c]
	Change SystemParameterInfo to support SPI_GETHIGHCONTRAST. Also
	include some missing SPI_ definitions.

	* [include/dsound.h][multimedia/dsound.c][relay32/dplayx.spec]
	Added stubs for DirectPlayLobbyCreate[AW]. Not sure if these
	should go into a new files dplayx.c? Anyone care?

	* [include/winnls.h]
	Added two missing flags for the CompareString32 functions.
1998-06-01 10:44:35 +00:00

3284 lines
95 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* OLE2NLS library
*
* Copyright 1995 Martin von Loewis
* Copyright 1998 David Lee Lambert
*/
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "windows.h"
#include "heap.h"
#include "ole.h"
#include "options.h"
#include "winnls.h"
#include "winreg.h"
#include "winerror.h"
#include "debug.h"
/* Locale name to id map. used by EnumSystemLocales, GetLocalInfoA
* MUST contain all #defines from winnls.h
* last entry has NULL name, 0 id.
*/
#define LOCALE_ENTRY(x) {#x,LOCALE_##x}
static struct tagLOCALE_NAME2ID {
char *name;
DWORD id;
} locale_name2id[]= {
LOCALE_ENTRY(ILANGUAGE),
LOCALE_ENTRY(SLANGUAGE),
LOCALE_ENTRY(SENGLANGUAGE),
LOCALE_ENTRY(SABBREVLANGNAME),
LOCALE_ENTRY(SNATIVELANGNAME),
LOCALE_ENTRY(ICOUNTRY),
LOCALE_ENTRY(SCOUNTRY),
LOCALE_ENTRY(SENGCOUNTRY),
LOCALE_ENTRY(SABBREVCTRYNAME),
LOCALE_ENTRY(SNATIVECTRYNAME),
LOCALE_ENTRY(IDEFAULTLANGUAGE),
LOCALE_ENTRY(IDEFAULTCOUNTRY),
LOCALE_ENTRY(IDEFAULTCODEPAGE),
LOCALE_ENTRY(IDEFAULTANSICODEPAGE),
LOCALE_ENTRY(SLIST),
LOCALE_ENTRY(IMEASURE),
LOCALE_ENTRY(SDECIMAL),
LOCALE_ENTRY(STHOUSAND),
LOCALE_ENTRY(SGROUPING),
LOCALE_ENTRY(IDIGITS),
LOCALE_ENTRY(ILZERO),
LOCALE_ENTRY(INEGNUMBER),
LOCALE_ENTRY(SNATIVEDIGITS),
LOCALE_ENTRY(SCURRENCY),
LOCALE_ENTRY(SINTLSYMBOL),
LOCALE_ENTRY(SMONDECIMALSEP),
LOCALE_ENTRY(SMONTHOUSANDSEP),
LOCALE_ENTRY(SMONGROUPING),
LOCALE_ENTRY(ICURRDIGITS),
LOCALE_ENTRY(IINTLCURRDIGITS),
LOCALE_ENTRY(ICURRENCY),
LOCALE_ENTRY(INEGCURR),
LOCALE_ENTRY(SDATE),
LOCALE_ENTRY(STIME),
LOCALE_ENTRY(SSHORTDATE),
LOCALE_ENTRY(SLONGDATE),
LOCALE_ENTRY(STIMEFORMAT),
LOCALE_ENTRY(IDATE),
LOCALE_ENTRY(ILDATE),
LOCALE_ENTRY(ITIME),
LOCALE_ENTRY(ITIMEMARKPOSN),
LOCALE_ENTRY(ICENTURY),
LOCALE_ENTRY(ITLZERO),
LOCALE_ENTRY(IDAYLZERO),
LOCALE_ENTRY(IMONLZERO),
LOCALE_ENTRY(S1159),
LOCALE_ENTRY(S2359),
LOCALE_ENTRY(ICALENDARTYPE),
LOCALE_ENTRY(IOPTIONALCALENDAR),
LOCALE_ENTRY(IFIRSTDAYOFWEEK),
LOCALE_ENTRY(IFIRSTWEEKOFYEAR),
LOCALE_ENTRY(SDAYNAME1),
LOCALE_ENTRY(SDAYNAME2),
LOCALE_ENTRY(SDAYNAME3),
LOCALE_ENTRY(SDAYNAME4),
LOCALE_ENTRY(SDAYNAME5),
LOCALE_ENTRY(SDAYNAME6),
LOCALE_ENTRY(SDAYNAME7),
LOCALE_ENTRY(SABBREVDAYNAME1),
LOCALE_ENTRY(SABBREVDAYNAME2),
LOCALE_ENTRY(SABBREVDAYNAME3),
LOCALE_ENTRY(SABBREVDAYNAME4),
LOCALE_ENTRY(SABBREVDAYNAME5),
LOCALE_ENTRY(SABBREVDAYNAME6),
LOCALE_ENTRY(SABBREVDAYNAME7),
LOCALE_ENTRY(SMONTHNAME1),
LOCALE_ENTRY(SMONTHNAME2),
LOCALE_ENTRY(SMONTHNAME3),
LOCALE_ENTRY(SMONTHNAME4),
LOCALE_ENTRY(SMONTHNAME5),
LOCALE_ENTRY(SMONTHNAME6),
LOCALE_ENTRY(SMONTHNAME7),
LOCALE_ENTRY(SMONTHNAME8),
LOCALE_ENTRY(SMONTHNAME9),
LOCALE_ENTRY(SMONTHNAME10),
LOCALE_ENTRY(SMONTHNAME11),
LOCALE_ENTRY(SMONTHNAME12),
LOCALE_ENTRY(SMONTHNAME13),
LOCALE_ENTRY(SABBREVMONTHNAME1),
LOCALE_ENTRY(SABBREVMONTHNAME2),
LOCALE_ENTRY(SABBREVMONTHNAME3),
LOCALE_ENTRY(SABBREVMONTHNAME4),
LOCALE_ENTRY(SABBREVMONTHNAME5),
LOCALE_ENTRY(SABBREVMONTHNAME6),
LOCALE_ENTRY(SABBREVMONTHNAME7),
LOCALE_ENTRY(SABBREVMONTHNAME8),
LOCALE_ENTRY(SABBREVMONTHNAME9),
LOCALE_ENTRY(SABBREVMONTHNAME10),
LOCALE_ENTRY(SABBREVMONTHNAME11),
LOCALE_ENTRY(SABBREVMONTHNAME12),
LOCALE_ENTRY(SABBREVMONTHNAME13),
LOCALE_ENTRY(SPOSITIVESIGN),
LOCALE_ENTRY(SNEGATIVESIGN),
LOCALE_ENTRY(IPOSSIGNPOSN),
LOCALE_ENTRY(INEGSIGNPOSN),
LOCALE_ENTRY(IPOSSYMPRECEDES),
LOCALE_ENTRY(IPOSSEPBYSPACE),
LOCALE_ENTRY(INEGSYMPRECEDES),
LOCALE_ENTRY(INEGSEPBYSPACE),
/* LOCALE_ENTRY(FONTSIGNATURE),*/
{NULL,0},
};
const struct map_lcid2str {
LCID langid;
const char *langname;
} languages[]={
{0x0401,"Arabisch"},
{0x0402,"Bulgarisch"},
{0x0403,"Katalanisch"},
{0x0404,"Traditionales Chinesisch"},
{0x0405,"Tschecisch"},
{0x0406,"D<EFBFBD>nisch"},
{0x0407,"Deutsch"},
{0x0408,"Griechisch"},
{0x0409,"Amerikanisches Englisch"},
{0x040A,"Kastilisches Spanisch"},
{0x040B,"Finnisch"},
{0x040C,"Franzvsisch"},
{0x040D,"Hebrdisch"},
{0x040E,"Ungarisch"},
{0x040F,"Isldndisch"},
{0x0410,"Italienisch"},
{0x0411,"Japanisch"},
{0x0412,"Koreanisch"},
{0x0413,"Niederldndisch"},
{0x0414,"Norwegisch-Bokmal"},
{0x0415,"Polnisch"},
{0x0416,"Brasilianisches Portugiesisch"},
{0x0417,"Rdtoromanisch"},
{0x0418,"Rumdnisch"},
{0x0419,"Russisch"},
{0x041A,"Kroatoserbisch (lateinisch)"},
{0x041B,"Slowenisch"},
{0x041C,"Albanisch"},
{0x041D,"Schwedisch"},
{0x041E,"Thai"},
{0x041F,"T|rkisch"},
{0x0420,"Urdu"},
{0x0421,"Bahasa"},
{0x0804,"Vereinfachtes Chinesisch"},
{0x0807,"Schweizerdeutsch"},
{0x0809,"Britisches Englisch"},
{0x080A,"Mexikanisches Spanisch"},
{0x080C,"Belgisches Franzvsisch"},
{0x0810,"Schweizerisches Italienisch"},
{0x0813,"Belgisches Niederldndisch"},
{0x0814,"Norgwegisch-Nynorsk"},
{0x0816,"Portugiesisch"},
{0x081A,"Serbokratisch (kyrillisch)"},
{0x0C1C,"Kanadisches Franzvsisch"},
{0x100C,"Schweizerisches Franzvsisch"},
{0x0000,"Unbekannt"},
};
/***********************************************************************
* GetUserDefaultLCID (OLE2NLS.1)
*/
LCID WINAPI GetUserDefaultLCID()
{
/* Default sorting, neutral sublanguage */
switch(Options.language)
{
/* case LANG_Bu: return 0x02; */ /* Bulgarian */
/* case LANG_Ch: return 0x04; */ /* Chinese */
case LANG_Cz: return 0x05; /* Czech */
case LANG_Da: return 0x06; /* Danish */
case LANG_De: return 0x07; /* German */
/* case LANG_Gr: return 0x08; */ /* Greek */
case LANG_En: return 0x09; /* English */
case LANG_Es: return 0x0a; /* Spanish */
case LANG_Fi: return 0x0b; /* Finnish */
case LANG_Fr: return 0x0c; /* French */
case LANG_Hu: return 0x0e; /* Hungarian */
/* case LANG_Ic: return 0x0f; */ /* Icelandic */
case LANG_It: return 0x10; /* Italian */
/* case LANG_Jp: return 0x11; */ /* Japanese */
case LANG_Ko: return 0x12; /* Korean */
/* case LANG_Du: return 0x13; */ /* Dutch */
case LANG_No: return 0x14; /* Norwegian */
case LANG_Pl: return 0x15; /* Polish */
case LANG_Po: return 0x16; /* Portuguese */
/* case LANG_Ro: return 0x18; */ /* Romanian */
/* case LANG_Ru: return 0x19; */ /* Russian */
/* case LANG_Cr: return 0x1a; */ /* Croatian */
/* case LANG_Sl: return 0x1b; */ /* Slovak */
case LANG_Sw: return 0x1d; /* Swedish */
/* case LANG_Tu: return 0x1f; */ /* Turkish */
/* case LANG_Sv: return 0x24; */ /* Slovenian */
case LANG_Eo: return 0x25; /* Esperanto (not official) */
case LANG_Ca: return 0x26; /* Catalan */
default:
return 0x00; /* Neutral language */
}
}
/***********************************************************************
* GetSystemDefaultLCID (OLE2NLS.2)
*/
LCID WINAPI GetSystemDefaultLCID()
{
return GetUserDefaultLCID();
}
/***********************************************************************
* GetUserDefaultLangID (OLE2NLS.3)
*/
LANGID WINAPI GetUserDefaultLangID()
{
return (WORD)GetUserDefaultLCID();
}
/***********************************************************************
* GetSystemDefaultLangID (OLE2NLS.4)
*/
LANGID WINAPI GetSystemDefaultLangID()
{
return GetUserDefaultLangID();
}
/***********************************************************************
* GetLocaleInfoA (OLE2NLS.5)
* Is the last parameter really WORD for Win16?
*/
INT16 WINAPI GetLocaleInfo16(LCID lcid,LCTYPE LCType,LPSTR buf,INT16 len)
{
return GetLocaleInfo32A(lcid,LCType,buf,len);
}
INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
{
char *retString;
int found,i;
TRACE(ole,"(%8lX,%8lX,%p,%4X)\n",
lcid,LCType,buf,len);
LCType &= ~(LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP);
/* 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;
/* If we are through all of this, retLen should not be zero anymore.
If it is, the value is not supported */
i=0;
while (locale_name2id[i].name!=NULL) {
if (LCType == locale_name2id[i].id) {
retString = locale_name2id[i].name;
break;
}
i++;
}
if (!retString) {
WARN(ole,"Unkown LC type %lX\n",LCType);
return 0;
}
#define LOCVAL(type,value) case type:retString=value;break;
/* Now, the language specific definitions. They don't have to be
complete */
found=1;
switch(Options.language)
{
case LANG_De:
switch (LCType) {
/* 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")
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"851")
/* Dunno
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)
*/
default: found=0;break;
}
break; /* LANG(De) */
case LANG_Da:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE,"6")
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,"DK")
LOCVAL(LOCALE_SNATIVECTRYNAME,"Danmark")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"6")
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, "3")
LOCVAL(LOCALE_INEGSIGNPOSN, "3")
LOCVAL(LOCALE_IPOSSYMPRECEDES, "1")
LOCVAL(LOCALE_IPOSSEPBYSPACE, "0")
LOCVAL(LOCALE_INEGSYMPRECEDES, "1")
LOCVAL(LOCALE_INEGSEPBYSPACE, "0")
default: found=0;break;
}
break; /* LANG(Da) */
case LANG_En:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE, "0409")
LOCVAL(LOCALE_SLANGUAGE, "English (United States)")
LOCVAL(LOCALE_SENGLANGUAGE, "English")
LOCVAL(LOCALE_SABBREVLANGNAME, "ENU")
LOCVAL(LOCALE_SNATIVELANGNAME, "English")
LOCVAL(LOCALE_ICOUNTRY, "1")
LOCVAL(LOCALE_SCOUNTRY, "United States")
LOCVAL(LOCALE_SENGCOUNTRY, "United States")
LOCVAL(LOCALE_SABBREVCTRYNAME, "USA")
LOCVAL(LOCALE_SNATIVECTRYNAME, "United States")
LOCVAL(LOCALE_IDEFAULTLANGUAGE, "0409")
LOCVAL(LOCALE_IDEFAULTCOUNTRY, "1")
LOCVAL(LOCALE_IDEFAULTCODEPAGE, "437")
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE, "1252")
LOCVAL(LOCALE_SLIST, ",")
LOCVAL(LOCALE_IMEASURE, "1")
LOCVAL(LOCALE_SDECIMAL, ".")
LOCVAL(LOCALE_STHOUSAND, ",")
LOCVAL(LOCALE_SGROUPING, "3;0")
LOCVAL(LOCALE_IDIGITS, "2")
LOCVAL(LOCALE_ILZERO, "1")
LOCVAL(LOCALE_INEGNUMBER, "1")
LOCVAL(LOCALE_SNATIVEDIGITS, "0123456789")
LOCVAL(LOCALE_SCURRENCY, "$")
LOCVAL(LOCALE_SINTLSYMBOL, "USD")
LOCVAL(LOCALE_SMONDECIMALSEP, ".")
LOCVAL(LOCALE_SMONTHOUSANDSEP, ",")
LOCVAL(LOCALE_SMONGROUPING, "3;0")
LOCVAL(LOCALE_ICURRDIGITS, "2")
LOCVAL(LOCALE_IINTLCURRDIGITS, "2")
LOCVAL(LOCALE_ICURRENCY, "0")
LOCVAL(LOCALE_INEGCURR, "0")
LOCVAL(LOCALE_SDATE, "/")
LOCVAL(LOCALE_STIME, ":")
LOCVAL(LOCALE_SSHORTDATE, "M/d/yy")
LOCVAL(LOCALE_SLONGDATE, "dddd, MMMM dd, yyyy")
LOCVAL(LOCALE_STIMEFORMAT, "h:mm:ss tt")
LOCVAL(LOCALE_IDATE, "0")
LOCVAL(LOCALE_ILDATE, "0")
LOCVAL(LOCALE_ITIME, "0")
LOCVAL(LOCALE_ITIMEMARKPOSN, "0")
LOCVAL(LOCALE_ICENTURY, "0")
LOCVAL(LOCALE_ITLZERO, "0")
LOCVAL(LOCALE_IDAYLZERO, "0")
LOCVAL(LOCALE_IMONLZERO, "0")
LOCVAL(LOCALE_S1159, "AM")
LOCVAL(LOCALE_S2359, "PM")
LOCVAL(LOCALE_ICALENDARTYPE, "1")
LOCVAL(LOCALE_IOPTIONALCALENDAR, "0")
LOCVAL(LOCALE_IFIRSTDAYOFWEEK, "6")
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR, "0")
LOCVAL(LOCALE_SDAYNAME1, "Monday")
LOCVAL(LOCALE_SDAYNAME2, "Tuesday")
LOCVAL(LOCALE_SDAYNAME3, "Wednesday")
LOCVAL(LOCALE_SDAYNAME4, "Thursday")
LOCVAL(LOCALE_SDAYNAME5, "Friday")
LOCVAL(LOCALE_SDAYNAME6, "Saturday")
LOCVAL(LOCALE_SDAYNAME7, "Sunday")
LOCVAL(LOCALE_SABBREVDAYNAME1, "Mon")
LOCVAL(LOCALE_SABBREVDAYNAME2, "Tue")
LOCVAL(LOCALE_SABBREVDAYNAME3, "Wed")
LOCVAL(LOCALE_SABBREVDAYNAME4, "Thu")
LOCVAL(LOCALE_SABBREVDAYNAME5, "Fri")
LOCVAL(LOCALE_SABBREVDAYNAME6, "Sat")
LOCVAL(LOCALE_SABBREVDAYNAME7, "Sun")
LOCVAL(LOCALE_SMONTHNAME1, "January")
LOCVAL(LOCALE_SMONTHNAME2, "February")
LOCVAL(LOCALE_SMONTHNAME3, "March")
LOCVAL(LOCALE_SMONTHNAME4, "April")
LOCVAL(LOCALE_SMONTHNAME5, "May")
LOCVAL(LOCALE_SMONTHNAME6, "June")
LOCVAL(LOCALE_SMONTHNAME7, "July")
LOCVAL(LOCALE_SMONTHNAME8, "August")
LOCVAL(LOCALE_SMONTHNAME9, "September")
LOCVAL(LOCALE_SMONTHNAME10, "October")
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, "May")
LOCVAL(LOCALE_SABBREVMONTHNAME6, "Jun")
LOCVAL(LOCALE_SABBREVMONTHNAME7, "Jul")
LOCVAL(LOCALE_SABBREVMONTHNAME8, "Aug")
LOCVAL(LOCALE_SABBREVMONTHNAME9, "Sep")
LOCVAL(LOCALE_SABBREVMONTHNAME10, "Oct")
LOCVAL(LOCALE_SABBREVMONTHNAME11, "Nov")
LOCVAL(LOCALE_SABBREVMONTHNAME12, "Dec")
LOCVAL(LOCALE_SABBREVMONTHNAME13, "")
LOCVAL(LOCALE_SPOSITIVESIGN, "")
LOCVAL(LOCALE_SNEGATIVESIGN, "-")
LOCVAL(LOCALE_IPOSSIGNPOSN, "3")
LOCVAL(LOCALE_INEGSIGNPOSN, "0")
LOCVAL(LOCALE_IPOSSYMPRECEDES, "1")
LOCVAL(LOCALE_IPOSSEPBYSPACE, "0")
LOCVAL(LOCALE_INEGSYMPRECEDES, "1")
LOCVAL(LOCALE_INEGSEPBYSPACE, "0")
default: found=0;break;
}
break; /* LANG(En) */
case LANG_Eo:
switch (LCType) {
/* LOCVAL(LOCALE_ILANGUAGE,"9") ISO numerical ID for language TODO */
LOCVAL(LOCALE_SLANGUAGE,"Esperanto")
LOCVAL(LOCALE_SENGLANGUAGE,"Esperanto")
/* LOCVAL(LOCALE_SABBREVLANGNAME,"deu") */
LOCVAL(LOCALE_SNATIVELANGNAME,"Esperanto")
/* LOCVAL(LOCALE_ICOUNTRY,"49") not official in any one country */
/* LOCVAL(LOCALE_SCOUNTRY,"Deutschland") */
/* LOCVAL(LOCALE_SENGCOUNTRY,"Germany") */
/* LOCVAL(LOCALE_SABBREVCTRYNAME,"De") */
/* LOCVAL(LOCALE_SNATIVECTRYNAME,"Deutschland") */
/* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") ISO ID of lang TODO */
/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"49") */
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"3") /* is this right? TODO */
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,"3") /* is this right? TODO */
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,"NLG") /* accounting currency of UEA */
/* 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,"yyyy.mm.dd")
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,"lundo")
LOCVAL(LOCALE_SDAYNAME2,"mardo")
LOCVAL(LOCALE_SDAYNAME3,"merkredo")
LOCVAL(LOCALE_SDAYNAME4,"<EFBFBD>a<EFBFBD>do")
LOCVAL(LOCALE_SDAYNAME5,"vendredo")
LOCVAL(LOCALE_SDAYNAME6,"sabato")
LOCVAL(LOCALE_SDAYNAME7,"diman<EFBFBD>o")
LOCVAL(LOCALE_SABBREVDAYNAME1,"lu")
LOCVAL(LOCALE_SABBREVDAYNAME2,"ma")
LOCVAL(LOCALE_SABBREVDAYNAME3,"me")
LOCVAL(LOCALE_SABBREVDAYNAME4,"<EFBFBD>a")
LOCVAL(LOCALE_SABBREVDAYNAME5,"ve")
LOCVAL(LOCALE_SABBREVDAYNAME6,"sa")
LOCVAL(LOCALE_SABBREVDAYNAME7,"di")
LOCVAL(LOCALE_SMONTHNAME1,"januaro")
LOCVAL(LOCALE_SMONTHNAME2,"februaro")
LOCVAL(LOCALE_SMONTHNAME3,"marto")
LOCVAL(LOCALE_SMONTHNAME4,"aprilo")
LOCVAL(LOCALE_SMONTHNAME5,"majo")
LOCVAL(LOCALE_SMONTHNAME6,"junio")
LOCVAL(LOCALE_SMONTHNAME7,"julio")
LOCVAL(LOCALE_SMONTHNAME8,"a<EFBFBD>gusto")
LOCVAL(LOCALE_SMONTHNAME9,"septembro")
LOCVAL(LOCALE_SMONTHNAME10,"oktobro")
LOCVAL(LOCALE_SMONTHNAME11,"novembro")
LOCVAL(LOCALE_SMONTHNAME12,"decembro")
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,"a<EFBFBD>g")
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) */
default: found=0;break;
}
break; /* LANG(Eo) */
case LANG_Fi:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE,"11")
LOCVAL(LOCALE_SLANGUAGE,"Suomi")
LOCVAL(LOCALE_SENGLANGUAGE,"Finnish")
LOCVAL(LOCALE_SABBREVLANGNAME,"fin")
LOCVAL(LOCALE_SNATIVELANGNAME,"suomi")
LOCVAL(LOCALE_ICOUNTRY,"49")
LOCVAL(LOCALE_SCOUNTRY,"Suomi")
LOCVAL(LOCALE_SENGCOUNTRY,"Finland")
LOCVAL(LOCALE_SABBREVCTRYNAME,"Fin")
LOCVAL(LOCALE_SNATIVECTRYNAME,"Suomi")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"11")
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"358")
/*
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,"mk")
/*
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, "AM")
LOCVAL(LOCALE_S2359, "PM")
/*
LOCVAL(LOCALE_ICALENDARTYPE)
LOCVAL(LOCALE_IOPTIONALCALENDAR)
LOCVAL(LOCALE_IFIRSTDAYOFWEEK)
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR)
*/
LOCVAL(LOCALE_SDAYNAME1,"maanantai")
LOCVAL(LOCALE_SDAYNAME2,"tiistai")
LOCVAL(LOCALE_SDAYNAME3,"keskiviikko")
LOCVAL(LOCALE_SDAYNAME4,"torstai")
LOCVAL(LOCALE_SDAYNAME5,"perjantai")
LOCVAL(LOCALE_SDAYNAME6,"lauantai")
LOCVAL(LOCALE_SDAYNAME7,"sunnuntai")
LOCVAL(LOCALE_SABBREVDAYNAME1,"Ma")
LOCVAL(LOCALE_SABBREVDAYNAME2,"Ti")
LOCVAL(LOCALE_SABBREVDAYNAME3,"Ke")
LOCVAL(LOCALE_SABBREVDAYNAME4,"To")
LOCVAL(LOCALE_SABBREVDAYNAME5,"Pe")
LOCVAL(LOCALE_SABBREVDAYNAME6,"La")
LOCVAL(LOCALE_SABBREVDAYNAME7,"Su")
LOCVAL(LOCALE_SMONTHNAME1,"tammikuu")
LOCVAL(LOCALE_SMONTHNAME2,"helmikuu")
LOCVAL(LOCALE_SMONTHNAME3,"maaliskuu")
LOCVAL(LOCALE_SMONTHNAME4,"huhtikuu")
LOCVAL(LOCALE_SMONTHNAME5,"toukokuu")
LOCVAL(LOCALE_SMONTHNAME6,"kes<EFBFBD>kuu")
LOCVAL(LOCALE_SMONTHNAME7,"hein<EFBFBD>kuu")
LOCVAL(LOCALE_SMONTHNAME8,"elokuu")
LOCVAL(LOCALE_SMONTHNAME9,"syyskuu")
LOCVAL(LOCALE_SMONTHNAME10,"lokakuu")
LOCVAL(LOCALE_SMONTHNAME11,"marraskuu")
LOCVAL(LOCALE_SMONTHNAME12,"joulukuu")
LOCVAL(LOCALE_SMONTHNAME13,"")
LOCVAL(LOCALE_SABBREVMONTHNAME1,"tammi")
LOCVAL(LOCALE_SABBREVMONTHNAME2,"helmi")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"maalis")
LOCVAL(LOCALE_SABBREVMONTHNAME4,"huhti")
LOCVAL(LOCALE_SABBREVMONTHNAME5,"touko")
LOCVAL(LOCALE_SABBREVMONTHNAME6,"kes<EFBFBD>")
LOCVAL(LOCALE_SABBREVMONTHNAME7,"hein<EFBFBD>")
LOCVAL(LOCALE_SABBREVMONTHNAME8,"elo")
LOCVAL(LOCALE_SABBREVMONTHNAME9,"syys")
LOCVAL(LOCALE_SABBREVMONTHNAME10,"loka")
LOCVAL(LOCALE_SABBREVMONTHNAME11,"marras")
LOCVAL(LOCALE_SABBREVMONTHNAME12,"joulu")
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)
*/
default: found=0;break;
}
break; /* LANG(Fi) */
case LANG_It:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE,"9")
LOCVAL(LOCALE_SLANGUAGE,"Italiano")
LOCVAL(LOCALE_SENGLANGUAGE,"Italian")
LOCVAL(LOCALE_SABBREVLANGNAME,"ita")
LOCVAL(LOCALE_SNATIVELANGNAME,"Italiano")
LOCVAL(LOCALE_ICOUNTRY,"39")
LOCVAL(LOCALE_SCOUNTRY,"Italia")
LOCVAL(LOCALE_SENGCOUNTRY,"Italy")
LOCVAL(LOCALE_SABBREVCTRYNAME,"It")
LOCVAL(LOCALE_SNATIVECTRYNAME,"Italia")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9")
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"39")
/* 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,"Lit.")
/*
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,"Lunedi'")
LOCVAL(LOCALE_SDAYNAME2,"Martedi'")
LOCVAL(LOCALE_SDAYNAME3,"Mercoledi'")
LOCVAL(LOCALE_SDAYNAME4,"Giovedi'")
LOCVAL(LOCALE_SDAYNAME5,"Venerdi'")
LOCVAL(LOCALE_SDAYNAME6,"Sabato")
LOCVAL(LOCALE_SDAYNAME7,"Domenica")
LOCVAL(LOCALE_SABBREVDAYNAME1,"Lu")
LOCVAL(LOCALE_SABBREVDAYNAME2,"Ma")
LOCVAL(LOCALE_SABBREVDAYNAME3,"Me")
LOCVAL(LOCALE_SABBREVDAYNAME4,"Gi")
LOCVAL(LOCALE_SABBREVDAYNAME5,"Ve")
LOCVAL(LOCALE_SABBREVDAYNAME6,"Sa")
LOCVAL(LOCALE_SABBREVDAYNAME7,"Do")
LOCVAL(LOCALE_SMONTHNAME1,"Gennaio")
LOCVAL(LOCALE_SMONTHNAME2,"Febbraio")
LOCVAL(LOCALE_SMONTHNAME3,"Marzo")
LOCVAL(LOCALE_SMONTHNAME4,"Aprile")
LOCVAL(LOCALE_SMONTHNAME5,"Maggio")
LOCVAL(LOCALE_SMONTHNAME6,"Giugno")
LOCVAL(LOCALE_SMONTHNAME7,"Luglio")
LOCVAL(LOCALE_SMONTHNAME8,"Agosto")
LOCVAL(LOCALE_SMONTHNAME9,"Settembre")
LOCVAL(LOCALE_SMONTHNAME10,"Ottobre")
LOCVAL(LOCALE_SMONTHNAME11,"Novembre")
LOCVAL(LOCALE_SMONTHNAME12,"Dicembre")
LOCVAL(LOCALE_SMONTHNAME13,"")
LOCVAL(LOCALE_SABBREVMONTHNAME1,"Gen")
LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mar")
LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr")
LOCVAL(LOCALE_SABBREVMONTHNAME5,"Mag")
LOCVAL(LOCALE_SABBREVMONTHNAME6,"Giu")
LOCVAL(LOCALE_SABBREVMONTHNAME7,"Lug")
LOCVAL(LOCALE_SABBREVMONTHNAME8,"Ago")
LOCVAL(LOCALE_SABBREVMONTHNAME9,"Set")
LOCVAL(LOCALE_SABBREVMONTHNAME10,"Ott")
LOCVAL(LOCALE_SABBREVMONTHNAME11,"Nov")
LOCVAL(LOCALE_SABBREVMONTHNAME12,"Dic")
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)
*/
default: found=0;break;
}
break; /* LANG(It) */
case 0x0809:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE, "0809")
LOCVAL(LOCALE_SLANGUAGE, "English (United Kingdom)")
LOCVAL(LOCALE_SENGLANGUAGE, "English")
LOCVAL(LOCALE_SABBREVLANGNAME, "ENG")
LOCVAL(LOCALE_SNATIVELANGNAME, "English")
LOCVAL(LOCALE_ICOUNTRY, "44")
LOCVAL(LOCALE_SCOUNTRY, "United Kingdom")
LOCVAL(LOCALE_SENGCOUNTRY, "United Kingdom")
LOCVAL(LOCALE_SABBREVCTRYNAME, "GBR")
LOCVAL(LOCALE_SNATIVECTRYNAME, "United Kingdom")
LOCVAL(LOCALE_IDEFAULTLANGUAGE, "0809")
LOCVAL(LOCALE_IDEFAULTCOUNTRY, "44")
LOCVAL(LOCALE_IDEFAULTCODEPAGE, "850")
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE, "1252")
LOCVAL(LOCALE_SLIST, ",")
LOCVAL(LOCALE_IMEASURE, "0")
LOCVAL(LOCALE_SDECIMAL, ".")
LOCVAL(LOCALE_STHOUSAND, ",")
LOCVAL(LOCALE_SGROUPING, "3;0")
LOCVAL(LOCALE_IDIGITS, "2")
LOCVAL(LOCALE_ILZERO, "1")
LOCVAL(LOCALE_INEGNUMBER, "1")
LOCVAL(LOCALE_SNATIVEDIGITS, "0123456789")
LOCVAL(LOCALE_SCURRENCY, "<EFBFBD>")
LOCVAL(LOCALE_SINTLSYMBOL, "GBP")
LOCVAL(LOCALE_SMONDECIMALSEP, ".")
LOCVAL(LOCALE_SMONTHOUSANDSEP, ",")
LOCVAL(LOCALE_SMONGROUPING, "3;0")
LOCVAL(LOCALE_ICURRDIGITS, "2")
LOCVAL(LOCALE_IINTLCURRDIGITS, "2")
LOCVAL(LOCALE_ICURRENCY, "0")
LOCVAL(LOCALE_INEGCURR, "1")
LOCVAL(LOCALE_SDATE, "/")
LOCVAL(LOCALE_STIME, ":")
LOCVAL(LOCALE_SSHORTDATE, "dd/MM/yy")
LOCVAL(LOCALE_SLONGDATE, "dd MMMM yyyy")
LOCVAL(LOCALE_STIMEFORMAT, "HH:mm:ss")
LOCVAL(LOCALE_IDATE, "1")
LOCVAL(LOCALE_ILDATE, "1")
LOCVAL(LOCALE_ITIME, "1")
LOCVAL(LOCALE_ITIMEMARKPOSN, "0")
LOCVAL(LOCALE_ICENTURY, "0")
LOCVAL(LOCALE_ITLZERO, "1")
LOCVAL(LOCALE_IDAYLZERO, "1")
LOCVAL(LOCALE_IMONLZERO, "1")
LOCVAL(LOCALE_S1159, "AM")
LOCVAL(LOCALE_S2359, "PM")
LOCVAL(LOCALE_ICALENDARTYPE, "1")
LOCVAL(LOCALE_IOPTIONALCALENDAR, "0")
LOCVAL(LOCALE_IFIRSTDAYOFWEEK, "0")
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR, "0")
LOCVAL(LOCALE_SDAYNAME1, "Monday")
LOCVAL(LOCALE_SDAYNAME2, "Tuesday")
LOCVAL(LOCALE_SDAYNAME3, "Wednesday")
LOCVAL(LOCALE_SDAYNAME4, "Thursday")
LOCVAL(LOCALE_SDAYNAME5, "Friday")
LOCVAL(LOCALE_SDAYNAME6, "Saturday")
LOCVAL(LOCALE_SDAYNAME7, "Sunday")
LOCVAL(LOCALE_SABBREVDAYNAME1, "Mon")
LOCVAL(LOCALE_SABBREVDAYNAME2, "Tue")
LOCVAL(LOCALE_SABBREVDAYNAME3, "Wed")
LOCVAL(LOCALE_SABBREVDAYNAME4, "Thu")
LOCVAL(LOCALE_SABBREVDAYNAME5, "Fri")
LOCVAL(LOCALE_SABBREVDAYNAME6, "Sat")
LOCVAL(LOCALE_SABBREVDAYNAME7, "Sun")
LOCVAL(LOCALE_SMONTHNAME1, "January")
LOCVAL(LOCALE_SMONTHNAME2, "February")
LOCVAL(LOCALE_SMONTHNAME3, "March")
LOCVAL(LOCALE_SMONTHNAME4, "April")
LOCVAL(LOCALE_SMONTHNAME5, "May")
LOCVAL(LOCALE_SMONTHNAME6, "June")
LOCVAL(LOCALE_SMONTHNAME7, "July")
LOCVAL(LOCALE_SMONTHNAME8, "August")
LOCVAL(LOCALE_SMONTHNAME9, "September")
LOCVAL(LOCALE_SMONTHNAME10, "October")
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, "May")
LOCVAL(LOCALE_SABBREVMONTHNAME6, "Jun")
LOCVAL(LOCALE_SABBREVMONTHNAME7, "Jul")
LOCVAL(LOCALE_SABBREVMONTHNAME8, "Aug")
LOCVAL(LOCALE_SABBREVMONTHNAME9, "Sep")
LOCVAL(LOCALE_SABBREVMONTHNAME10, "Oct")
LOCVAL(LOCALE_SABBREVMONTHNAME11, "Nov")
LOCVAL(LOCALE_SABBREVMONTHNAME12, "Dec")
LOCVAL(LOCALE_SABBREVMONTHNAME13, "")
LOCVAL(LOCALE_SPOSITIVESIGN, "")
LOCVAL(LOCALE_SNEGATIVESIGN, "-")
LOCVAL(LOCALE_IPOSSIGNPOSN, "3")
LOCVAL(LOCALE_INEGSIGNPOSN, "3")
LOCVAL(LOCALE_IPOSSYMPRECEDES, "1")
LOCVAL(LOCALE_IPOSSEPBYSPACE, "0")
LOCVAL(LOCALE_INEGSYMPRECEDES, "1")
LOCVAL(LOCALE_INEGSEPBYSPACE, "0")
default: found=0;break;
}
break; /* LANG(0x0809) (U.K. English) */
case LANG_Ko: /* string using codepage 949 */
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE,"18")
LOCVAL(LOCALE_SLANGUAGE,"\307\321\261\271\276\356")
LOCVAL(LOCALE_SENGLANGUAGE,"Korean")
LOCVAL(LOCALE_SABBREVLANGNAME,"KOR")
LOCVAL(LOCALE_SNATIVELANGNAME,"\307\321\261\271\276\356")
LOCVAL(LOCALE_ICOUNTRY,"82")
LOCVAL(LOCALE_SCOUNTRY,"\264\353\307\321\271\316\261\271")
LOCVAL(LOCALE_SENGCOUNTRY,"Korea (South)")
LOCVAL(LOCALE_SABBREVCTRYNAME,"KOR")
LOCVAL(LOCALE_SNATIVECTRYNAME,"\264\353\307\321\271\316\261\271")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"18")
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"82")
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"949")
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,"949")
LOCVAL(LOCALE_SLIST,",")
LOCVAL(LOCALE_IMEASURE,"0")
LOCVAL(LOCALE_SDECIMAL,".")
LOCVAL(LOCALE_STHOUSAND,",")
LOCVAL(LOCALE_SGROUPING,"3;0")
LOCVAL(LOCALE_IDIGITS,"2")
LOCVAL(LOCALE_ILZERO,"0")
LOCVAL(LOCALE_INEGNUMBER,"1")
LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789")
LOCVAL(LOCALE_SCURRENCY,"\\")
LOCVAL(LOCALE_SINTLSYMBOL,"Won")
LOCVAL(LOCALE_SMONDECIMALSEP,".")
LOCVAL(LOCALE_SMONTHOUSANDSEP,",")
LOCVAL(LOCALE_SMONGROUPING,"3;0")
LOCVAL(LOCALE_ICURRDIGITS,"2")
LOCVAL(LOCALE_IINTLCURRDIGITS,"2")
LOCVAL(LOCALE_ICURRENCY,"3")
LOCVAL(LOCALE_INEGCURR,"8")
LOCVAL(LOCALE_SDATE,"/")
LOCVAL(LOCALE_STIME,":")
LOCVAL(LOCALE_SSHORTDATE,"yyyy/MM/dd")
LOCVAL(LOCALE_SLONGDATE,"yyyy/MM/dd")
LOCVAL(LOCALE_STIMEFORMAT,"h:mm:ss tt")
LOCVAL(LOCALE_IDATE,"1")
LOCVAL(LOCALE_ILDATE,"1")
LOCVAL(LOCALE_ITIME,"1")
LOCVAL(LOCALE_ITIMEMARKPOSN,"0")
LOCVAL(LOCALE_ICENTURY,"0")
LOCVAL(LOCALE_ITLZERO,"0")
LOCVAL(LOCALE_IDAYLZERO,"0")
LOCVAL(LOCALE_IMONLZERO,"0")
LOCVAL(LOCALE_S1159,"\277\300\300\374")
LOCVAL(LOCALE_S2359,"\277\300\310\304")
LOCVAL(LOCALE_ICALENDARTYPE,"1")
/* Korean Tangun Era calendar */
LOCVAL(LOCALE_IOPTIONALCALENDAR,"5")
LOCVAL(LOCALE_IFIRSTDAYOFWEEK,"6")
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR,"0")
LOCVAL(LOCALE_SDAYNAME1,"\277\371\277\344\300\317")
LOCVAL(LOCALE_SDAYNAME2,"\310\255\277\344\300\317")
LOCVAL(LOCALE_SDAYNAME3,"\274\366\277\344\300\317")
LOCVAL(LOCALE_SDAYNAME4,"\270\361\277\344\300\317")
LOCVAL(LOCALE_SDAYNAME5,"\261\335\277\344\300\317")
LOCVAL(LOCALE_SDAYNAME6,"\305\344\277\344\300\317")
LOCVAL(LOCALE_SDAYNAME7,"\300\317\277\344\300\317")
LOCVAL(LOCALE_SABBREVDAYNAME1,"\277\371")
LOCVAL(LOCALE_SABBREVDAYNAME2,"\310\255")
LOCVAL(LOCALE_SABBREVDAYNAME3,"\274\366")
LOCVAL(LOCALE_SABBREVDAYNAME4,"\270\361")
LOCVAL(LOCALE_SABBREVDAYNAME5,"\261\335")
LOCVAL(LOCALE_SABBREVDAYNAME6,"\305\344")
LOCVAL(LOCALE_SABBREVDAYNAME7,"\300\317")
LOCVAL(LOCALE_SMONTHNAME1,"1\277\371")
LOCVAL(LOCALE_SMONTHNAME2,"2\277\371")
LOCVAL(LOCALE_SMONTHNAME3,"3\277\371")
LOCVAL(LOCALE_SMONTHNAME4,"4\277\371")
LOCVAL(LOCALE_SMONTHNAME5,"5\277\371")
LOCVAL(LOCALE_SMONTHNAME6,"6\277\371")
LOCVAL(LOCALE_SMONTHNAME7,"7\277\371")
LOCVAL(LOCALE_SMONTHNAME8,"8\277\371")
LOCVAL(LOCALE_SMONTHNAME9,"9\277\371")
LOCVAL(LOCALE_SMONTHNAME10,"10\277\371")
LOCVAL(LOCALE_SMONTHNAME11,"11\277\371")
LOCVAL(LOCALE_SMONTHNAME12,"12\277\371")
LOCVAL(LOCALE_SMONTHNAME13,"")
LOCVAL(LOCALE_SABBREVMONTHNAME1,"1\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME2,"2\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"3\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME4,"4\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME5,"5\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME6,"6\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME7,"7\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME8,"8\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME9,"9\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME10,"10\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME11,"11\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME12,"12\277\371")
LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
LOCVAL(LOCALE_SPOSITIVESIGN,"")
LOCVAL(LOCALE_SNEGATIVESIGN,"-")
LOCVAL(LOCALE_IPOSSIGNPOSN,"3")
LOCVAL(LOCALE_INEGSIGNPOSN,"0")
LOCVAL(LOCALE_IPOSSYMPRECEDES,"3")
LOCVAL(LOCALE_IPOSSEPBYSPACE,"0")
LOCVAL(LOCALE_INEGSYMPRECEDES,"3")
LOCVAL(LOCALE_INEGSEPBYSPACE,"0")
default: found=0;break;
}
break; /* LANG(Ko) */
case LANG_Hu:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE,"9")
LOCVAL(LOCALE_SLANGUAGE,"Magyar")
LOCVAL(LOCALE_SENGLANGUAGE,"Hungarian")
LOCVAL(LOCALE_SABBREVLANGNAME,"hun")
LOCVAL(LOCALE_SNATIVELANGNAME,"Magyar")
LOCVAL(LOCALE_ICOUNTRY,"36")
LOCVAL(LOCALE_SCOUNTRY,"Magyarorsz<EFBFBD>g")
LOCVAL(LOCALE_SENGCOUNTRY,"Hungary")
LOCVAL(LOCALE_SABBREVCTRYNAME,"Hu")
LOCVAL(LOCALE_SNATIVECTRYNAME,"Magyarorsz<EFBFBD>g")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9")
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"36")
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"852")
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,"852")
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,"Ft")
/*
LOCVAL(LOCALE_SINTLSYMBOL)
LOCVAL(LOCALE_SMONDECIMALSEP)
LOCVAL(LOCALE_SMONTHOUSANDSEP)
LOCVAL(LOCALE_SMONGROUPING)
*/
LOCVAL(LOCALE_ICURRDIGITS,"0")
/*
LOCVAL(LOCALE_IINTLCURRDIGITS)
*/
LOCVAL(LOCALE_ICURRENCY,"3")
LOCVAL(LOCALE_INEGCURR,"8")
LOCVAL(LOCALE_SDATE,"/")
LOCVAL(LOCALE_STIME,":")
LOCVAL(LOCALE_SSHORTDATE,"yyyy.MM.dd")
LOCVAL(LOCALE_SLONGDATE,"ddd, yyyy. MMMM d")
/*
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,"H<EFBFBD>tf<EFBFBD>")
LOCVAL(LOCALE_SDAYNAME2,"Kedd")
LOCVAL(LOCALE_SDAYNAME3,"Szerda")
LOCVAL(LOCALE_SDAYNAME4,"Cs<EFBFBD>t<EFBFBD>rt<EFBFBD>k")
LOCVAL(LOCALE_SDAYNAME5,"P<EFBFBD>ntek")
LOCVAL(LOCALE_SDAYNAME6,"Szombat")
LOCVAL(LOCALE_SDAYNAME7,"Vas<EFBFBD>rnap")
LOCVAL(LOCALE_SABBREVDAYNAME1,"H<EFBFBD>")
LOCVAL(LOCALE_SABBREVDAYNAME2,"Ke")
LOCVAL(LOCALE_SABBREVDAYNAME3,"Se")
LOCVAL(LOCALE_SABBREVDAYNAME4,"Cs")
LOCVAL(LOCALE_SABBREVDAYNAME5,"P<EFBFBD>")
LOCVAL(LOCALE_SABBREVDAYNAME6,"So")
LOCVAL(LOCALE_SABBREVDAYNAME7,"Va")
LOCVAL(LOCALE_SMONTHNAME1,"Janu<EFBFBD>r")
LOCVAL(LOCALE_SMONTHNAME2,"Febru<EFBFBD>r")
LOCVAL(LOCALE_SMONTHNAME3,"M<EFBFBD>rcius")
LOCVAL(LOCALE_SMONTHNAME4,"<EFBFBD>prilis")
LOCVAL(LOCALE_SMONTHNAME5,"M<EFBFBD>jus")
LOCVAL(LOCALE_SMONTHNAME6,"J<EFBFBD>nius")
LOCVAL(LOCALE_SMONTHNAME7,"J<EFBFBD>lius")
LOCVAL(LOCALE_SMONTHNAME8,"Augusztus")
LOCVAL(LOCALE_SMONTHNAME9,"Szeptember")
LOCVAL(LOCALE_SMONTHNAME10,"Okt<EFBFBD>ber")
LOCVAL(LOCALE_SMONTHNAME11,"November")
LOCVAL(LOCALE_SMONTHNAME12,"December")
LOCVAL(LOCALE_SMONTHNAME13,"")
LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jan")
LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"M<EFBFBD>r")
LOCVAL(LOCALE_SABBREVMONTHNAME4,"<EFBFBD>pr")
LOCVAL(LOCALE_SABBREVMONTHNAME5,"M<EFBFBD>j")
LOCVAL(LOCALE_SABBREVMONTHNAME6,"J<EFBFBD>n")
LOCVAL(LOCALE_SABBREVMONTHNAME7,"J<EFBFBD>l")
LOCVAL(LOCALE_SABBREVMONTHNAME8,"Aug")
LOCVAL(LOCALE_SABBREVMONTHNAME9,"Sze")
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)
*/
default: found=0;break;
}
break; /* LANG(En) */
case LANG_Pl:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE,"9")
LOCVAL(LOCALE_SLANGUAGE,"Polski")
LOCVAL(LOCALE_SENGLANGUAGE,"Polish")
LOCVAL(LOCALE_SABBREVLANGNAME, "pol")
LOCVAL(LOCALE_SNATIVELANGNAME,"Polski")
LOCVAL(LOCALE_ICOUNTRY,"49")
LOCVAL(LOCALE_SCOUNTRY,"Polska")
LOCVAL(LOCALE_SENGCOUNTRY,"Poland")
LOCVAL(LOCALE_SABBREVCTRYNAME,"Pl")
LOCVAL(LOCALE_SNATIVECTRYNAME,"Polska")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9")
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"49")
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"1252")
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,"1252")
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,"z\xB3")
/*
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,"Poniedzia\263ek")
LOCVAL(LOCALE_SDAYNAME2,"Wtorek")
LOCVAL(LOCALE_SDAYNAME3,"Sroda")
LOCVAL(LOCALE_SDAYNAME4,"Czwartek")
LOCVAL(LOCALE_SDAYNAME5,"Pi\xB9tek")
LOCVAL(LOCALE_SDAYNAME6,"Sobota")
LOCVAL(LOCALE_SDAYNAME7,"Niedziela")
LOCVAL(LOCALE_SABBREVDAYNAME1,"Po")
LOCVAL(LOCALE_SABBREVDAYNAME2,"Wt")
LOCVAL(LOCALE_SABBREVDAYNAME3,"Sr")
LOCVAL(LOCALE_SABBREVDAYNAME4,"Cz")
LOCVAL(LOCALE_SABBREVDAYNAME5,"Pt")
LOCVAL(LOCALE_SABBREVDAYNAME6,"So")
LOCVAL(LOCALE_SABBREVDAYNAME7,"Ni")
LOCVAL(LOCALE_SMONTHNAME1,"Stycze\xF1")
LOCVAL(LOCALE_SMONTHNAME2,"Luty")
LOCVAL(LOCALE_SMONTHNAME3,"Marzec")
LOCVAL(LOCALE_SMONTHNAME4,"Kwiecie\xF1")
LOCVAL(LOCALE_SMONTHNAME5,"Maj")
LOCVAL(LOCALE_SMONTHNAME6,"Czerwiec")
LOCVAL(LOCALE_SMONTHNAME7,"Lipiec")
LOCVAL(LOCALE_SMONTHNAME8,"Sierpie\xF1")
LOCVAL(LOCALE_SMONTHNAME9,"Wrzesie\xF1")
LOCVAL(LOCALE_SMONTHNAME10,"Pa\237dziernik")
LOCVAL(LOCALE_SMONTHNAME11,"Listapad")
LOCVAL(LOCALE_SMONTHNAME12,"Grudzie\xF1")
LOCVAL(LOCALE_SMONTHNAME13,"")
LOCVAL(LOCALE_SABBREVMONTHNAME1,"Sty")
LOCVAL(LOCALE_SABBREVMONTHNAME2,"Lut")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mar")
LOCVAL(LOCALE_SABBREVMONTHNAME4,"Kwi")
LOCVAL(LOCALE_SABBREVMONTHNAME5,"Maj")
LOCVAL(LOCALE_SABBREVMONTHNAME6,"Cze")
LOCVAL(LOCALE_SABBREVMONTHNAME7,"Lip")
LOCVAL(LOCALE_SABBREVMONTHNAME8,"Sie")
LOCVAL(LOCALE_SABBREVMONTHNAME9,"Wrz")
LOCVAL(LOCALE_SABBREVMONTHNAME10,"Pa\x9F")
LOCVAL(LOCALE_SABBREVMONTHNAME11,"Lis")
LOCVAL(LOCALE_SABBREVMONTHNAME12,"Gru")
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)
*/
default: found=0;break;
}
break; /* LANG(Pl) */
case LANG_Po:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE, "0416")
LOCVAL(LOCALE_SLANGUAGE, "Portugu\352s (Brasil)")
LOCVAL(LOCALE_SENGLANGUAGE, "Protuguese")
LOCVAL(LOCALE_SABBREVLANGNAME, "POR")
LOCVAL(LOCALE_SNATIVELANGNAME, "Portugu\352s")
LOCVAL(LOCALE_ICOUNTRY, "1")
LOCVAL(LOCALE_SCOUNTRY, "Brasil")
LOCVAL(LOCALE_SENGCOUNTRY, "Brazil")
LOCVAL(LOCALE_SABBREVCTRYNAME, "BRA")
LOCVAL(LOCALE_SNATIVECTRYNAME, "Brasil")
LOCVAL(LOCALE_IDEFAULTLANGUAGE, "0409")
LOCVAL(LOCALE_IDEFAULTCOUNTRY, "1")
LOCVAL(LOCALE_IDEFAULTCODEPAGE, "437")
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE, "1252")
LOCVAL(LOCALE_SLIST, ";")
LOCVAL(LOCALE_IMEASURE, "1")
LOCVAL(LOCALE_SDECIMAL, ",")
LOCVAL(LOCALE_STHOUSAND, ".")
LOCVAL(LOCALE_SGROUPING, "3;0")
LOCVAL(LOCALE_IDIGITS, "2")
LOCVAL(LOCALE_ILZERO, "1")
LOCVAL(LOCALE_INEGNUMBER, "1")
LOCVAL(LOCALE_SNATIVEDIGITS, "0123456789")
LOCVAL(LOCALE_SCURRENCY, "$")
LOCVAL(LOCALE_SINTLSYMBOL, "USD")
LOCVAL(LOCALE_SMONDECIMALSEP, ",")
LOCVAL(LOCALE_SMONTHOUSANDSEP, ".")
LOCVAL(LOCALE_SMONGROUPING, "3;0")
LOCVAL(LOCALE_ICURRDIGITS, "2")
LOCVAL(LOCALE_IINTLCURRDIGITS, "2")
LOCVAL(LOCALE_ICURRENCY, "0")
LOCVAL(LOCALE_INEGCURR, "0")
LOCVAL(LOCALE_SDATE, "/")
LOCVAL(LOCALE_STIME, ":")
LOCVAL(LOCALE_SSHORTDATE, "dd/MM/yy")
LOCVAL(LOCALE_SLONGDATE, "dddd, MMMM dd, yyyy")
LOCVAL(LOCALE_STIMEFORMAT, "h:mm:ss tt")
LOCVAL(LOCALE_IDATE, "0")
LOCVAL(LOCALE_ILDATE, "0")
LOCVAL(LOCALE_ITIME, "0")
LOCVAL(LOCALE_ITIMEMARKPOSN, "0")
LOCVAL(LOCALE_ICENTURY, "0")
LOCVAL(LOCALE_ITLZERO, "0")
LOCVAL(LOCALE_IDAYLZERO, "0")
LOCVAL(LOCALE_IMONLZERO, "0")
LOCVAL(LOCALE_S1159, "AM")
LOCVAL(LOCALE_S2359, "PM")
LOCVAL(LOCALE_ICALENDARTYPE, "1")
LOCVAL(LOCALE_IOPTIONALCALENDAR, "0")
LOCVAL(LOCALE_IFIRSTDAYOFWEEK, "6")
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR, "0")
LOCVAL(LOCALE_SDAYNAME1, "Segunda")
LOCVAL(LOCALE_SDAYNAME2, "Ter\347a")
LOCVAL(LOCALE_SDAYNAME3, "Quarta")
LOCVAL(LOCALE_SDAYNAME4, "Quinta")
LOCVAL(LOCALE_SDAYNAME5, "Sexta")
LOCVAL(LOCALE_SDAYNAME6, "S\341bado")
LOCVAL(LOCALE_SDAYNAME7, "Domingo")
LOCVAL(LOCALE_SABBREVDAYNAME1, "Seg")
LOCVAL(LOCALE_SABBREVDAYNAME2, "Ter")
LOCVAL(LOCALE_SABBREVDAYNAME3, "Qua")
LOCVAL(LOCALE_SABBREVDAYNAME4, "Qui")
LOCVAL(LOCALE_SABBREVDAYNAME5, "Sex")
LOCVAL(LOCALE_SABBREVDAYNAME6, "S\341b")
LOCVAL(LOCALE_SABBREVDAYNAME7, "Dom")
LOCVAL(LOCALE_SMONTHNAME1, "Janeiro")
LOCVAL(LOCALE_SMONTHNAME2, "Fevereiro")
LOCVAL(LOCALE_SMONTHNAME3, "Mar\347o")
LOCVAL(LOCALE_SMONTHNAME4, "Abril")
LOCVAL(LOCALE_SMONTHNAME5, "Maio")
LOCVAL(LOCALE_SMONTHNAME6, "Junho")
LOCVAL(LOCALE_SMONTHNAME7, "Julho")
LOCVAL(LOCALE_SMONTHNAME8, "Agosto")
LOCVAL(LOCALE_SMONTHNAME9, "Setembro")
LOCVAL(LOCALE_SMONTHNAME10, "Outubro")
LOCVAL(LOCALE_SMONTHNAME11, "Novembro")
LOCVAL(LOCALE_SMONTHNAME12, "Dezembro")
LOCVAL(LOCALE_SMONTHNAME13, "")
LOCVAL(LOCALE_SABBREVMONTHNAME1, "Jan")
LOCVAL(LOCALE_SABBREVMONTHNAME2, "Fev")
LOCVAL(LOCALE_SABBREVMONTHNAME3, "Mar")
LOCVAL(LOCALE_SABBREVMONTHNAME4, "Abr")
LOCVAL(LOCALE_SABBREVMONTHNAME5, "Mai")
LOCVAL(LOCALE_SABBREVMONTHNAME6, "Jun")
LOCVAL(LOCALE_SABBREVMONTHNAME7, "Jul")
LOCVAL(LOCALE_SABBREVMONTHNAME8, "Ago")
LOCVAL(LOCALE_SABBREVMONTHNAME9, "Set")
LOCVAL(LOCALE_SABBREVMONTHNAME10, "Out")
LOCVAL(LOCALE_SABBREVMONTHNAME11, "Nov")
LOCVAL(LOCALE_SABBREVMONTHNAME12, "Dez")
LOCVAL(LOCALE_SABBREVMONTHNAME13, "")
LOCVAL(LOCALE_SPOSITIVESIGN, "")
LOCVAL(LOCALE_SNEGATIVESIGN, "-")
LOCVAL(LOCALE_IPOSSIGNPOSN, "3")
LOCVAL(LOCALE_INEGSIGNPOSN, "0")
LOCVAL(LOCALE_IPOSSYMPRECEDES, "1")
LOCVAL(LOCALE_IPOSSEPBYSPACE, "0")
LOCVAL(LOCALE_INEGSYMPRECEDES, "1")
LOCVAL(LOCALE_INEGSEPBYSPACE, "0")
default: found=0;break;
}
break; /* LANG(Po) */
case LANG_Sw:
switch (LCType) {
LOCVAL(LOCALE_ILANGUAGE,"1d")
LOCVAL(LOCALE_SLANGUAGE,"Svenska")
LOCVAL(LOCALE_SENGLANGUAGE,"Swedish")
LOCVAL(LOCALE_SABBREVLANGNAME,"SV")
LOCVAL(LOCALE_SNATIVELANGNAME,"Svenska")
LOCVAL(LOCALE_ICOUNTRY,"45")
LOCVAL(LOCALE_SCOUNTRY,"SWE")
LOCVAL(LOCALE_SENGCOUNTRY,"Sweden")
LOCVAL(LOCALE_SABBREVCTRYNAME,"SVE")
LOCVAL(LOCALE_SNATIVECTRYNAME,"Sverige")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"1d")
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,"M<EFBFBD>ndag")
LOCVAL(LOCALE_SDAYNAME2,"Tisdag")
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,"M<EFBFBD>")
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,"Januari")
LOCVAL(LOCALE_SMONTHNAME2,"Februari")
LOCVAL(LOCALE_SMONTHNAME3,"Mars")
LOCVAL(LOCALE_SMONTHNAME4,"April")
LOCVAL(LOCALE_SMONTHNAME5,"Maj")
LOCVAL(LOCALE_SMONTHNAME6,"Juni")
LOCVAL(LOCALE_SMONTHNAME7,"Juli")
LOCVAL(LOCALE_SMONTHNAME8,"Augusti")
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, "3")
LOCVAL(LOCALE_INEGSIGNPOSN, "3")
LOCVAL(LOCALE_IPOSSYMPRECEDES, "1")
LOCVAL(LOCALE_IPOSSEPBYSPACE, "0")
LOCVAL(LOCALE_INEGSYMPRECEDES, "1")
LOCVAL(LOCALE_INEGSEPBYSPACE, "0")
default: found=0;break;
}
break; /* LANG(Sw) */
/*Insert other languages here*/
default:
found=0;
break;
} /* switch */
if(!found) {
ERR(ole,"'%s' not supported for your language.\n",
retString);
retString = "<WINE-NLS-unknown>";
/*return 0;*/
}
if (buf)
lstrcpyn32A(buf,retString,len);
return strlen(retString)+1;
}
/***********************************************************************
* GetLocaleInfo32W (KERNEL32.230)
* Is the last parameter really WORD for Win16?
*/
INT32 WINAPI GetLocaleInfo32W(LCID lcid,LCTYPE LCType,LPWSTR wbuf,INT32 len)
{
LPSTR abuf = (LPSTR)HeapAlloc(GetProcessHeap(),0,len);
INT32 n = GetLocaleInfo32A(lcid, LCType, abuf, len);
if (wbuf)
lstrcpynAtoW(wbuf,abuf,len);
HeapFree(GetProcessHeap(),0,abuf);
return n;
}
/***********************************************************************
* CompareString16 (OLE2NLS.8)
*/
UINT16 WINAPI CompareString16(DWORD lcid,DWORD fdwStyle,
LPCSTR s1,DWORD l1,LPCSTR s2,DWORD l2)
{
return (UINT16)CompareString32A(lcid,fdwStyle,s1,l1,s2,l2);
}
/***********************************************************************
* CompareString32A (KERNEL32.29)
* This implementation ignores the locale
* FIXME
*/
UINT32 WINAPI CompareString32A(DWORD lcid, DWORD fdwStyle,
LPCSTR s1, DWORD l1, LPCSTR s2,DWORD l2)
{
int len,ret;
if(fdwStyle & NORM_IGNORENONSPACE)
FIXME(ole, "IGNORENONSPACE not supported\n");
if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME(ole, "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) ?
lstrncmpi32A(s1,s2,len) : lstrncmp32A(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;
}
/***********************************************************************
* CompareString32W (KERNEL32.30)
* This implementation ignores the locale
* FIXME
*/
UINT32 WINAPI CompareString32W(DWORD lcid, DWORD fdwStyle,
LPCWSTR s1, DWORD l1, LPCWSTR s2,DWORD l2)
{
int len,ret;
if(fdwStyle & NORM_IGNORENONSPACE)
FIXME(ole,"IGNORENONSPACE not supprted\n");
if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME(ole,"IGNORESYMBOLS not supported\n");
/* Is strcmp defaulting to string sort or to word sort?? */
/* FIXME: Handle NORM_STRINGSORT */
l1 = (l1==-1)?lstrlen32W(s1):l1;
l2 = (l2==-1)?lstrlen32W(s2):l2;
len = l1<l2 ? l1:l2;
ret = (fdwStyle & NORM_IGNORECASE) ?
lstrncmpi32W(s1,s2,len) : lstrncmp32W(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;
}
/***********************************************************************
* SetLocaleInfoA [KERNEL32.499]
*/
BOOL16 WINAPI SetLocaleInfoA(DWORD lcid, DWORD lctype, LPCSTR data)
{
FIXME(ole,"(%ld,%ld,%s): stub\n",lcid,lctype,data);
return TRUE;
}
/***********************************************************************
* IsValidLocale [KERNEL32.361]
*/
BOOL32 WINAPI IsValidLocale(LCID lcid,DWORD flags)
{
/* we support ANY language. Well, at least say that...*/
return TRUE;
}
/***********************************************************************
* EnumSystemLocales32W [KERNEL32.93]
*/
BOOL32 WINAPI EnumSystemLocales32W( LOCALE_ENUMPROC32W lpfnLocaleEnum,
DWORD flags )
{
int i;
BOOL32 ret;
WCHAR buffer[200];
HKEY xhkey;
TRACE(win32,"(%p,%08lx)\n",lpfnLocaleEnum,flags );
/* see if we can reuse the Win95 registry entries.... */
if (ERROR_SUCCESS==RegOpenKey32A(HKEY_LOCAL_MACHINE,"\\System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) {
i=0;
while (1) {
if (ERROR_SUCCESS!=RegEnumKey32W(xhkey,i,buffer,sizeof(buffer)))
break;
if (!lpfnLocaleEnum(buffer))
break;
i++;
}
RegCloseKey(xhkey);
return TRUE;
}
i=0;
while (languages[i].langname!=NULL)
{
LPWSTR cp;
char xbuffer[10];
sprintf(xbuffer,"%08lx",(DWORD)languages[i].langid);
cp = HEAP_strdupAtoW( GetProcessHeap(), 0, xbuffer );
ret = lpfnLocaleEnum(cp);
HeapFree( GetProcessHeap(), 0, cp );
if (!ret) break;
i++;
}
return TRUE;
}
/***********************************************************************
* EnumSystemLocales32A [KERNEL32.92]
*/
BOOL32 WINAPI EnumSystemLocales32A(LOCALE_ENUMPROC32A lpfnLocaleEnum,
DWORD flags)
{
int i;
CHAR buffer[200];
HKEY xhkey;
TRACE(win32,"(%p,%08lx)\n",
lpfnLocaleEnum,flags
);
if (ERROR_SUCCESS==RegOpenKey32A(HKEY_LOCAL_MACHINE,"\\System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) {
i=0;
while (1) {
if (ERROR_SUCCESS!=RegEnumKey32A(xhkey,i,buffer,sizeof(buffer)))
break;
if (!lpfnLocaleEnum(buffer))
break;
i++;
}
RegCloseKey(xhkey);
return TRUE;
}
i=0;
while (languages[i].langname!=NULL) {
sprintf(buffer,"%08lx",(DWORD)languages[i].langid);
if (!lpfnLocaleEnum(buffer))
break;
i++;
}
return TRUE;
}
/***********************************************************************
* GetStringTypeA [OLE2NLS.7]
*/
BOOL16 WINAPI GetStringType16(LCID locale,DWORD dwInfoType,LPCSTR src,
INT16 cchSrc,LPWORD chartype)
{
return GetStringTypeEx32A(locale,dwInfoType,src,cchSrc,chartype);
}
/***********************************************************************
* GetStringTypeA [KERNEL32.277]
*/
BOOL32 WINAPI GetStringType32A(LCID locale,DWORD dwInfoType,LPCSTR src,
INT32 cchSrc,LPWORD chartype)
{
return GetStringTypeEx32A(locale,dwInfoType,src,cchSrc,chartype);
}
/***********************************************************************
* GetStringTypeExA [KERNEL32.276]
*/
BOOL32 WINAPI GetStringTypeEx32A(LCID locale,DWORD dwInfoType,LPCSTR src,
INT32 cchSrc,LPWORD chartype)
{
int i;
switch (dwInfoType) {
case CT_CTYPE2:
FIXME(ole,"CT_CTYPE2 not supported.\n");
return FALSE;
case CT_CTYPE3:
FIXME(ole,"CT_CTYPE3 not supported.\n");
return FALSE;
default:break;
}
if (cchSrc==-1)
cchSrc=lstrlen32A(src);
for (i=0;i<cchSrc;i++) {
chartype[i] = 0;
if (isdigit(src[i])) chartype[i]|=C1_DIGIT;
if (isalpha(src[i])) chartype[i]|=C1_ALPHA;
if (islower(src[i])) chartype[i]|=C1_LOWER;
if (isupper(src[i])) chartype[i]|=C1_UPPER;
if (isspace(src[i])) chartype[i]|=C1_SPACE;
if (ispunct(src[i])) chartype[i]|=C1_PUNCT;
if (iscntrl(src[i])) chartype[i]|=C1_CNTRL;
/* FIXME: isblank() is a GNU extension */
/* if (isblank(src[i])) chartype[i]|=C1_BLANK; */
if ((src[i] == ' ') || (src[i] == '\t')) chartype[i]|=C1_BLANK;
/* C1_XDIGIT */
}
return TRUE;
}
/*********************************************************************
* GetStringTypeW [KERNEL32.279]
*
* NOTES
* Yes, this is missing LCID locale. MS fault.
*/
BOOL32 WINAPI GetStringType32W(DWORD dwInfoType,LPCWSTR src,INT32 cchSrc,
LPWORD chartype)
{
return GetStringTypeEx32W(0/*defaultlocale*/,dwInfoType,src,cchSrc,chartype);
}
/*********************************************************************
* GetStringTypeW [KERNEL32.278]
* FIXME: unicode chars are assumed chars
*/
BOOL32 WINAPI GetStringTypeEx32W(LCID locale,DWORD dwInfoType,LPCWSTR src,
INT32 cchSrc,LPWORD chartype)
{
int i;
switch (dwInfoType) {
case CT_CTYPE2:
FIXME(ole,"CT_CTYPE2 not supported.\n");
return FALSE;
case CT_CTYPE3:
FIXME(ole,"CT_CTYPE3 not supported.\n");
return FALSE;
default:break;
}
if (cchSrc==-1)
cchSrc=lstrlen32W(src);
for (i=0;i<cchSrc;i++) {
chartype[i] = 0;
if (isdigit(src[i])) chartype[i]|=C1_DIGIT;
if (isalpha(src[i])) chartype[i]|=C1_ALPHA;
if (islower(src[i])) chartype[i]|=C1_LOWER;
if (isupper(src[i])) chartype[i]|=C1_UPPER;
if (isspace(src[i])) chartype[i]|=C1_SPACE;
if (ispunct(src[i])) chartype[i]|=C1_PUNCT;
if (iscntrl(src[i])) chartype[i]|=C1_CNTRL;
/* FIXME: isblank() is a GNU extension */
/* if (isblank(src[i])) chartype[i]|=C1_BLANK; */
if ((src[i] == ' ') || (src[i] == '\t')) chartype[i]|=C1_BLANK;
/* C1_XDIGIT */
}
return TRUE;
}
/*****************************************************************
* VerLanguageName16 [VER.10]
*/
DWORD WINAPI VerLanguageName16(UINT16 langid,LPSTR langname,UINT16 langnamelen)
{
int i;
DWORD result;
char buffer[80];
TRACE(ver,"(%d,%p,%d)\n",langid,langname,langnamelen);
/* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf(buffer,
"\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",
langid);
result = RegQueryValue16(HKEY_LOCAL_MACHINE, buffer, langname,
(LPDWORD)&langnamelen);
if (result == ERROR_SUCCESS) {
langname[langnamelen-1]='\0';
return langnamelen;
}
/* if that fails, use the internal table */
for (i=0;languages[i].langid!=0;i++)
if (langid==languages[i].langid)
break;
strncpy(langname,languages[i].langname,langnamelen);
langname[langnamelen-1]='\0';
return strlen(languages[i].langname);
}
/*****************************************************************
* VerLanguageName32A [VERSION.9]
*/
DWORD WINAPI VerLanguageName32A(UINT32 langid,LPSTR langname,
UINT32 langnamelen)
{
return VerLanguageName16(langid,langname,langnamelen);
}
/*****************************************************************
* VerLanguageName32W [VERSION.10]
*/
DWORD WINAPI VerLanguageName32W(UINT32 langid,LPWSTR langname,
UINT32 langnamelen)
{
int i;
LPWSTR keyname;
DWORD result;
char buffer[80];
/* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf(buffer,
"\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",
langid);
keyname = HEAP_strdupAtoW( GetProcessHeap(), 0, buffer );
result = RegQueryValue32W(HKEY_LOCAL_MACHINE, keyname, langname,
(LPDWORD)&langnamelen);
HeapFree( GetProcessHeap(), 0, keyname );
if (result != ERROR_SUCCESS) {
/* if that fails, use the internal table */
for (i=0;languages[i].langid!=0;i++)
if (langid==languages[i].langid)
break;
lstrcpyAtoW( langname, languages[i].langname );
langnamelen = strlen(languages[i].langname);
/* same as strlenW(langname); */
}
return langnamelen;
}
static int is_punctuation(unsigned char c)
{
/* punctuation characters are :
39, 45, 127-129, 141-144, 150-151, 157-158, 173 */
if (c>=141)
{
if (c<=151)
return (c<=144) || (c>=150);
if (c<=158)
return (c>=157);
return (c==173);
}
if (c>=127)
return (c<=129);
return (c==39) || (c==45);
}
static int identity(int c)
{
return c;
}
static const unsigned char LCM_Unicode_LUT[] = {
7 , 2, /* - 32 */
7 , 28, /* ! - 33 */
7 , 29, /* " - 34 */ /* " */
7 , 31, /* # - 35 */
7 , 33, /* $ - 36 */
7 , 35, /* % - 37 */
7 , 37, /* & - 38 */
6 , 128, /* ' - 39 */
7 , 39, /* ( - 40 */
7 , 42, /* ) - 41 */
7 , 45, /* * - 42 */
8 , 3, /* + - 43 */
7 , 47, /* , - 44 */
6 , 130, /* - - 45 */
7 , 51, /* . - 46 */
7 , 53, /* / - 47 */
12 , 3, /* 0 - 48 */
12 , 33, /* 1 - 49 */
12 , 51, /* 2 - 50 */
12 , 70, /* 3 - 51 */
12 , 88, /* 4 - 52 */
12 , 106, /* 5 - 53 */
12 , 125, /* 6 - 54 */
12 , 144, /* 7 - 55 */
12 , 162, /* 8 - 56 */
12 , 180, /* 9 - 57 */
7 , 55, /* : - 58 */
7 , 58, /* ; - 59 */
8 , 14, /* < - 60 */
8 , 18, /* = - 61 */
8 , 20, /* > - 62 */
7 , 60, /* ? - 63 */
7 , 62, /* @ - 64 */
14 , 2, /* A - 65 */
14 , 9, /* B - 66 */
14 , 10, /* C - 67 */
14 , 26, /* D - 68 */
14 , 33, /* E - 69 */
14 , 35, /* F - 70 */
14 , 37, /* G - 71 */
14 , 44, /* H - 72 */
14 , 50, /* I - 73 */
14 , 53, /* J - 74 */
14 , 54, /* K - 75 */
14 , 72, /* L - 76 */
14 , 81, /* M - 77 */
14 , 112, /* N - 78 */
14 , 124, /* O - 79 */
14 , 126, /* P - 80 */
14 , 137, /* Q - 81 */
14 , 138, /* R - 82 */
14 , 145, /* S - 83 */
14 , 153, /* T - 84 */
14 , 159, /* U - 85 */
14 , 162, /* V - 86 */
14 , 164, /* W - 87 */
14 , 166, /* X - 88 */
14 , 167, /* Y - 89 */
14 , 169, /* Z - 90 */
7 , 63, /* [ - 91 */
7 , 65, /* \ - 92 */
7 , 66, /* ] - 93 */
7 , 67, /* ^ - 94 */
7 , 68, /* _ - 95 */
7 , 72, /* ` - 96 */
14 , 2, /* a - 97 */
14 , 9, /* b - 98 */
14 , 10, /* c - 99 */
14 , 26, /* d - 100 */
14 , 33, /* e - 101 */
14 , 35, /* f - 102 */
14 , 37, /* g - 103 */
14 , 44, /* h - 104 */
14 , 50, /* i - 105 */
14 , 53, /* j - 106 */
14 , 54, /* k - 107 */
14 , 72, /* l - 108 */
14 , 81, /* m - 109 */
14 , 112, /* n - 110 */
14 , 124, /* o - 111 */
14 , 126, /* p - 112 */
14 , 137, /* q - 113 */
14 , 138, /* r - 114 */
14 , 145, /* s - 115 */
14 , 153, /* t - 116 */
14 , 159, /* u - 117 */
14 , 162, /* v - 118 */
14 , 164, /* w - 119 */
14 , 166, /* x - 120 */
14 , 167, /* y - 121 */
14 , 169, /* z - 122 */
7 , 74, /* { - 123 */
7 , 76, /* | - 124 */
7 , 78, /* } - 125 */
7 , 80, /* ~ - 126 */
6 , 29, /*  - 127 */
6 , 30, /* <20> - 128 */
6 , 31, /* <20> - 129 */
7 , 123, /* <20> - 130 */
14 , 35, /* <20> - 131 */
7 , 127, /* <20> - 132 */
10 , 21, /* <20> - 133 */
10 , 15, /* <20> - 134 */
10 , 16, /* <20> - 135 */
7 , 67, /* <20> - 136 */
10 , 22, /* <20> - 137 */
14 , 145, /* <20> - 138 */
7 , 136, /* <20> - 139 */
14 + 16 , 124, /* <20> - 140 */
6 , 43, /* <20> - 141 */
6 , 44, /* <20> - 142 */
6 , 45, /* <20> - 143 */
6 , 46, /* <20> - 144 */
7 , 121, /* <20> - 145 */
7 , 122, /* <20> - 146 */
7 , 125, /* <20> - 147 */
7 , 126, /* <20> - 148 */
10 , 17, /* <20> - 149 */
6 , 137, /* <20> - 150 */
6 , 139, /* <20> - 151 */
7 , 93, /* <20> - 152 */
14 , 156, /* <20> - 153 */
14 , 145, /* <20> - 154 */
7 , 137, /* <20> - 155 */
14 + 16 , 124, /* <20> - 156 */
6 , 59, /* <20> - 157 */
6 , 60, /* <20> - 158 */
14 , 167, /* <20> - 159 */
7 , 4, /* <20> - 160 */
7 , 81, /* <20> - 161 */
10 , 2, /* <20> - 162 */
10 , 3, /* <20> - 163 */
10 , 4, /* <20> - 164 */
10 , 5, /* <20> - 165 */
7 , 82, /* <20> - 166 */
10 , 6, /* <20> - 167 */
7 , 83, /* <20> - 168 */
10 , 7, /* <20> - 169 */
14 , 2, /* <20> - 170 */
8 , 24, /* <20> - 171 */
10 , 8, /* <20> - 172 */
6 , 131, /* <20> - 173 */
10 , 9, /* <20> - 174 */
7 , 84, /* <20> - 175 */
10 , 10, /* <20> - 176 */
8 , 23, /* <20> - 177 */
12 , 51, /* <20> - 178 */
12 , 70, /* <20> - 179 */
7 , 85, /* <20> - 180 */
10 , 11, /* <20> - 181 */
10 , 12, /* <20> - 182 */
10 , 13, /* <20> - 183 */
7 , 86, /* <20> - 184 */
12 , 33, /* <20> - 185 */
14 , 124, /* <20> - 186 */
8 , 26, /* <20> - 187 */
12 , 21, /* <20> - 188 */
12 , 25, /* <20> - 189 */
12 , 29, /* <20> - 190 */
7 , 87, /* <20> - 191 */
14 , 2, /* <20> - 192 */
14 , 2, /* <20> - 193 */
14 , 2, /* <20> - 194 */
14 , 2, /* <20> - 195 */
14 , 2, /* <20> - 196 */
14 , 2, /* <20> - 197 */
14 + 16 , 2, /* <20> - 198 */
14 , 10, /* <20> - 199 */
14 , 33, /* <20> - 200 */
14 , 33, /* <20> - 201 */
14 , 33, /* <20> - 202 */
14 , 33, /* <20> - 203 */
14 , 50, /* <20> - 204 */
14 , 50, /* <20> - 205 */
14 , 50, /* <20> - 206 */
14 , 50, /* <20> - 207 */
14 , 26, /* <20> - 208 */
14 , 112, /* <20> - 209 */
14 , 124, /* <20> - 210 */
14 , 124, /* <20> - 211 */
14 , 124, /* <20> - 212 */
14 , 124, /* <20> - 213 */
14 , 124, /* <20> - 214 */
8 , 28, /* <20> - 215 */
14 , 124, /* <20> - 216 */
14 , 159, /* <20> - 217 */
14 , 159, /* <20> - 218 */
14 , 159, /* <20> - 219 */
14 , 159, /* <20> - 220 */
14 , 167, /* <20> - 221 */
14 + 32 , 153, /* <20> - 222 */
14 + 48 , 145, /* <20> - 223 */
14 , 2, /* <20> - 224 */
14 , 2, /* <20> - 225 */
14 , 2, /* <20> - 226 */
14 , 2, /* <20> - 227 */
14 , 2, /* <20> - 228 */
14 , 2, /* <20> - 229 */
14 + 16 , 2, /* <20> - 230 */
14 , 10, /* <20> - 231 */
14 , 33, /* <20> - 232 */
14 , 33, /* <20> - 233 */
14 , 33, /* <20> - 234 */
14 , 33, /* <20> - 235 */
14 , 50, /* <20> - 236 */
14 , 50, /* <20> - 237 */
14 , 50, /* <20> - 238 */
14 , 50, /* <20> - 239 */
14 , 26, /* <20> - 240 */
14 , 112, /* <20> - 241 */
14 , 124, /* <20> - 242 */
14 , 124, /* <20> - 243 */
14 , 124, /* <20> - 244 */
14 , 124, /* <20> - 245 */
14 , 124, /* <20> - 246 */
8 , 29, /* <20> - 247 */
14 , 124, /* <20> - 248 */
14 , 159, /* <20> - 249 */
14 , 159, /* <20> - 250 */
14 , 159, /* <20> - 251 */
14 , 159, /* <20> - 252 */
14 , 167, /* <20> - 253 */
14 + 32 , 153, /* <20> - 254 */
14 , 167 /* <20> - 255 */ };
static const unsigned char LCM_Unicode_LUT_2[] = { 33, 44, 145 };
#define LCM_Diacritic_Start 131
static const unsigned char LCM_Diacritic_LUT[] = {
123, /* <20> - 131 */
2, /* <20> - 132 */
2, /* <20> - 133 */
2, /* <20> - 134 */
2, /* <20> - 135 */
3, /* <20> - 136 */
2, /* <20> - 137 */
20, /* <20> - 138 */
2, /* <20> - 139 */
2, /* <20> - 140 */
2, /* <20> - 141 */
2, /* <20> - 142 */
2, /* <20> - 143 */
2, /* <20> - 144 */
2, /* <20> - 145 */
2, /* <20> - 146 */
2, /* <20> - 147 */
2, /* <20> - 148 */
2, /* <20> - 149 */
2, /* <20> - 150 */
2, /* <20> - 151 */
2, /* <20> - 152 */
2, /* <20> - 153 */
20, /* <20> - 154 */
2, /* <20> - 155 */
2, /* <20> - 156 */
2, /* <20> - 157 */
2, /* <20> - 158 */
19, /* <20> - 159 */
2, /* <20> - 160 */
2, /* <20> - 161 */
2, /* <20> - 162 */
2, /* <20> - 163 */
2, /* <20> - 164 */
2, /* <20> - 165 */
2, /* <20> - 166 */
2, /* <20> - 167 */
2, /* <20> - 168 */
2, /* <20> - 169 */
3, /* <20> - 170 */
2, /* <20> - 171 */
2, /* <20> - 172 */
2, /* <20> - 173 */
2, /* <20> - 174 */
2, /* <20> - 175 */
2, /* <20> - 176 */
2, /* <20> - 177 */
2, /* <20> - 178 */
2, /* <20> - 179 */
2, /* <20> - 180 */
2, /* <20> - 181 */
2, /* <20> - 182 */
2, /* <20> - 183 */
2, /* <20> - 184 */
2, /* <20> - 185 */
3, /* <20> - 186 */
2, /* <20> - 187 */
2, /* <20> - 188 */
2, /* <20> - 189 */
2, /* <20> - 190 */
2, /* <20> - 191 */
15, /* <20> - 192 */
14, /* <20> - 193 */
18, /* <20> - 194 */
25, /* <20> - 195 */
19, /* <20> - 196 */
26, /* <20> - 197 */
2, /* <20> - 198 */
28, /* <20> - 199 */
15, /* <20> - 200 */
14, /* <20> - 201 */
18, /* <20> - 202 */
19, /* <20> - 203 */
15, /* <20> - 204 */
14, /* <20> - 205 */
18, /* <20> - 206 */
19, /* <20> - 207 */
104, /* <20> - 208 */
25, /* <20> - 209 */
15, /* <20> - 210 */
14, /* <20> - 211 */
18, /* <20> - 212 */
25, /* <20> - 213 */
19, /* <20> - 214 */
2, /* <20> - 215 */
33, /* <20> - 216 */
15, /* <20> - 217 */
14, /* <20> - 218 */
18, /* <20> - 219 */
19, /* <20> - 220 */
14, /* <20> - 221 */
2, /* <20> - 222 */
2, /* <20> - 223 */
15, /* <20> - 224 */
14, /* <20> - 225 */
18, /* <20> - 226 */
25, /* <20> - 227 */
19, /* <20> - 228 */
26, /* <20> - 229 */
2, /* <20> - 230 */
28, /* <20> - 231 */
15, /* <20> - 232 */
14, /* <20> - 233 */
18, /* <20> - 234 */
19, /* <20> - 235 */
15, /* <20> - 236 */
14, /* <20> - 237 */
18, /* <20> - 238 */
19, /* <20> - 239 */
104, /* <20> - 240 */
25, /* <20> - 241 */
15, /* <20> - 242 */
14, /* <20> - 243 */
18, /* <20> - 244 */
25, /* <20> - 245 */
19, /* <20> - 246 */
2, /* <20> - 247 */
33, /* <20> - 248 */
15, /* <20> - 249 */
14, /* <20> - 250 */
18, /* <20> - 251 */
19, /* <20> - 252 */
14, /* <20> - 253 */
2, /* <20> - 254 */
19, /* <20> - 255 */
} ;
/*************************************************************************
* Convert a string, or generate a sort key from it.
*
* If (mapflags & LCMAP_SORTKEY), the function will generate
* a sort key for the source string. Else, it will convert it
* accordingly to the flags LCMAP_UPPERCASE, LCMAP_LOWERCASE,...
*
* RETURNS
* Error : (destination buffer too small) 0.
* Success : length of the result string.
*
* REMARKS
* If called with scrlen = -1, the function will compute the length
* of the 0-terminated string strsrc by itself.
*/
INT32 WINAPI LCMapString32A(
LCID lcid /* locale identifier created with MAKELCID;
LOCALE_SYSTEM_DEFAULT and LOCALE_USER_DEFAULT are predefined
values. */,
DWORD mapflags /* flags */,
LPCSTR srcstr /* source buffer */,
INT32 srclen /* source length */,
LPSTR dststr /* destination buffer */,
INT32 dstlen /* destination buffer length */)
{
int i;
TRACE(string,"(0x%04lx,0x%08lx,%s,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen);
if ((dststr==NULL) || (srcstr==NULL))
return 0;
if (srclen==-1)
srclen = lstrlen32A(srcstr);
if (mapflags & ~ ( LCMAP_UPPERCASE | LCMAP_LOWERCASE | LCMAP_SORTKEY |
SORT_STRINGSORT) )
{
FIXME(string,"(0x%04lx,0x%08lx,%p,%d,%p,%d): "
"unimplemented flags: 0x%08lx\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen,mapflags);
}
if ( !(mapflags & LCMAP_SORTKEY) )
{
int (*f)(int)=identity;
if (dstlen==0)
return srclen; /* dstlen=0 means "do nothing but return required length" */
if (dstlen<srclen)
return 0; /* it's an error */
if (mapflags & LCMAP_UPPERCASE)
f = toupper;
else if (mapflags & LCMAP_LOWERCASE)
f = tolower;
for (i=0; i < srclen; i++)
dststr[i] = (CHAR) f(srcstr[i]);
return srclen;
}
/* else ... (mapflags & LCMAP_SORTKEY) */
{
int unicode_len=0;
int case_len=0;
int diacritic_len=0;
char *case_component;
char *diacritic_component;
int room,count;
int flag_stringsort = mapflags & SORT_STRINGSORT;
/* compute how much room we will need */
for (i=0;i<srclen;i++)
{
int ofs;
if ((srcstr[i]!='\0') && (flag_stringsort || !is_punctuation(srcstr[i])))
{
unicode_len++;
if(((unsigned char)srcstr[i])<=31)
{
FIXME(string," control characters in argument string\n");
return 0;
}
if ( LCM_Unicode_LUT[2*((unsigned char)srcstr[i]-32)] & ~15 )
unicode_len++; /* double letter */
}
if (isupper(srcstr[i]))
case_len=unicode_len;
ofs = (unsigned char)srcstr[i] - LCM_Diacritic_Start;
if ((ofs>=0) && (LCM_Diacritic_LUT[ofs]!=2))
diacritic_len=unicode_len;
}
room = 2 * unicode_len /* "unicode" component */
+ diacritic_len /* "diacritic" component */
+ case_len /* "case" component */
+ 4 /* four '\1' separators */
+ 1 ; /* terminal '\0' */
if (dstlen==0)
return room;
else if (dstlen<room)
return 0;
/* locate each component, write separators */
diacritic_component = dststr + 2*unicode_len ;
*diacritic_component++ = '\1';
case_component = diacritic_component + diacritic_len ;
*case_component++ = '\1';
/* read source string char by char, write
corresponding weight in each component. */
for (i=0,count=0;count<unicode_len;i++)
{
unsigned char c=srcstr[i];
if ( (c!='\0') && (flag_stringsort || !is_punctuation(c)) )
{
int type,longcode;
int LUT_offset = 2*(c-32);
type = LCM_Unicode_LUT[LUT_offset];
longcode = type >> 4;
type &= 15;
dststr[2*count] = type;
dststr[2*count+1] = LCM_Unicode_LUT[LUT_offset+1];
if (longcode)
{
if (count<case_len)
case_component[count] = ( isupper(srcstr[i]) ? 18 : 2 ) ;
if (count<diacritic_len)
diacritic_component[count] = 2; /* assumption: a double letter
is never accented */
count++;
dststr[2*count] = type;
dststr[2*count+1] = *(LCM_Unicode_LUT_2 - 1 + longcode);
/* 16 in the first column of LCM_Unicode_LUT --> longcode = 1
32 in the first column of LCM_Unicode_LUT --> longcode = 2
48 in the first column of LCM_Unicode_LUT --> longcode = 3 */
}
if (count<case_len)
case_component[count] = ( isupper(srcstr[i]) ? 18 : 2 ) ;
if (count<diacritic_len)
{
int ofs = (unsigned char)srcstr[i] - LCM_Diacritic_Start;
diacritic_component[count] = (ofs>=0 ? LCM_Diacritic_LUT[ofs] : 2);
}
count++;
}
}
dststr[room-3] = dststr[room-2] = '\1';
dststr[room-1] = '\0';
return room;
}
}
INT32 WINAPI LCMapString32W(
LCID lcid,DWORD mapflags,LPCWSTR srcstr,INT32 srclen,LPWSTR dststr,
INT32 dstlen)
{
int i;
TRACE(string,"(0x%04lx,0x%08lx,%p,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen);
if ((dststr==NULL) || (srcstr==NULL))
return 0;
if (srclen==-1)
srclen = lstrlen32W(srcstr);
if (mapflags & LCMAP_SORTKEY)
{
FIXME(string,"(0x%04lx,0x%08lx,%p,%d,%p,%d): "
"unimplemented flags: 0x%08lx\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen,mapflags);
return 0;
}
else
{
int (*f)(int)=identity;
if (dstlen==0)
return srclen;
if (dstlen<srclen)
return 0;
if (mapflags & LCMAP_UPPERCASE)
f = toupper;
else if (mapflags & LCMAP_LOWERCASE)
f = tolower;
for (i=0; i < srclen; i++)
dststr[i] = (WCHAR) f(srcstr[i]);
return srclen;
}
}
/*****************************************************************
*
* OLE_GetFormatA() [internal]
This function implements stuff for GetDateFormat() and
GetTimeFormat().
d single-digit (no leading zero) day (of month)
dd two-digit day (of month)
ddd short day-of-week name
dddd long day-of-week name
M single-digit month
MM two-digit month
MMM short month name
MMMM full month name
y two-digit year, no leading 0
yy two-digit year
yyyy four-digit year
gg era string
h hours with no leading zero (12-hour)
hh hours with full two digits
H hours with no leading zero (24-hour)
HH hours with full two digits
m minutes with no leading zero
mm minutes with full two digits
s seconds with no leading zero
ss seconds with full two digits
t time marker (A or P)
tt time marker (AM, PM)
'' used to quote literal characters
'' (within a quoted string) indicates a literal '
These functions REQUIRE valid locale, date, and format.
*/
INT32 WINAPI OLE_GetFormatA(LCID locale,
DWORD flags,
LPSYSTEMTIME xtime,
LPCSTR format,
LPSTR date, INT32 datelen)
{
INT32 inpos, outpos;
int count, type, inquote, Overflow;
char buf[40];
int buflen;
const char * _dgfmt[] = { "%d", "%02d" };
const char ** dgfmt = _dgfmt - 1;
/* report, for debugging */
TRACE(ole, "func(%8lx,%8lx, time(d=%d,h=%d,m=%d,s=%d), fmt:\'%s\' (at %p), %p (%9s), len=%d)\n", locale, flags,
xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
format, format, date, date, datelen);
/* initalize state variables and output buffer */
inpos = outpos = 0;
count = 0; inquote = 0; Overflow = 0;
type = '\0';
date[0] = buf[0] = '\0';
for (inpos = 0;; inpos++) {
/* TRACE(ole, "STATE inpos=%2d outpos=%2d count=%d inquote=%d type=%c buf,date = %c,%c\n", inpos, outpos, count, inquote, type, buf[inpos], date[outpos]); */
if (inquote) {
if (format[inpos] == '\'') {
if (format[inpos+1] == '\'') {
inpos += 1;
date[outpos++] = '\'';
} else {
inquote = 0;
continue; /* we did nothing to the output */
}
} else if (format[inpos] == '\0') {
date[outpos++] = '\0';
if (outpos > datelen) Overflow = 1;
break;
} else {
date[outpos++] = format[inpos];
if (outpos > datelen) {
Overflow = 1;
date[outpos-1] = '\0'; /* this is the last place where
it's safe to write */
break;
}
}
} else if ( (count && (format[inpos] != type))
|| count == 4
|| (count == 2 && strchr("ghHmst", type)) )
{
if (type == 'd') {
if (count == 4) {
GetLocaleInfo32A(locale,
LOCALE_SDAYNAME1
+ xtime->wDayOfWeek - 1,
buf, sizeof(buf));
} else if (count == 3) {
GetLocaleInfo32A(locale,
LOCALE_SABBREVDAYNAME1
+ xtime->wDayOfWeek - 1,
buf, sizeof(buf));
} else {
sprintf(buf, dgfmt[count], xtime->wDay);
}
} else if (type == 'M') {
if (count == 3) {
GetLocaleInfo32A(locale,
LOCALE_SABBREVMONTHNAME1
+ xtime->wMonth - 1,
buf, sizeof(buf));
} else if (count == 4) {
GetLocaleInfo32A(locale,
LOCALE_SMONTHNAME1
+ xtime->wMonth - 1,
buf, sizeof(buf));
} else {
sprintf(buf, dgfmt[count], xtime->wMonth);
}
} else if (type == 'y') {
if (count == 4) {
sprintf(buf, "%d", xtime->wYear);
} else if (count == 3) {
strcpy(buf, "yyy");
WARN(ole,
"unknown format,\
c=%c, n=%d\n", type, count);
} else {
sprintf(buf, dgfmt[count], xtime->wYear % 100);
}
} else if (type == 'g') {
if (count == 2) {
FIXME(ole, "LOCALE_ICALENDARTYPE unimp.\n");
strcpy(buf, "AD");
} else {
strcpy(buf, "g");
WARN(ole,
"unknown format, \
c=%c, n=%d\n", type, count);
}
} else if (type == 'h') {
/* gives us hours 1:00 -- 12:00 */
sprintf(buf, dgfmt[count], (xtime->wHour-1)%12 +1);
} else if (type == 'H') {
/* 24-hour time */
sprintf(buf, dgfmt[count], xtime->wHour);
} else if (type == 'm') {
sprintf(buf, dgfmt[count], xtime->wMinute);
} else if (type == 's') {
sprintf(buf, dgfmt[count], xtime->wSecond);
} else if (type == 't') {
if (count == 1) {
sprintf(buf, "%c", (xtime->wHour < 12) ? 'A' : 'P');
} else if (count == 2) {
/* sprintf(buf, "%s", (xtime->wHour < 12) ? "AM" : "PM"); */
GetLocaleInfo32A(locale,
(xtime->wHour<12)
? LOCALE_S1159 : LOCALE_S2359,
buf, sizeof(buf));
}
};
/* we need to check the next char in the format string
again, no matter what happened */
inpos--;
/* add the contents of buf to the output */
buflen = strlen(buf);
if (outpos + buflen < datelen) {
date[outpos] = '\0'; /* for strcat to hook onto */
strcat(date, buf);
outpos += buflen;
} else {
date[outpos] = '\0';
strncat(date, buf, datelen - outpos);
date[datelen - 1] = '\0';
SetLastError(ERROR_INSUFFICIENT_BUFFER);
WARN(ole, "insufficient buffer\n");
return 0;
}
/* reset the variables we used to keep track of this item */
count = 0;
type = '\0';
} else if (format[inpos] == '\0') {
/* we can't check for this at the loop-head, because
that breaks the printing of the last format-item */
date[outpos] = '\0';
break;
} else if (count) {
/* continuing a code for an item */
count +=1;
continue;
} else if (strchr("hHmstyMdg", format[inpos])) {
type = format[inpos];
count = 1;
continue;
} else if (format[inpos] == '\'') {
inquote = 1;
continue;
} else {
date[outpos++] = format[inpos];
}
/* now deal with a possible buffer overflow */
if (outpos >= datelen) {
date[datelen - 1] = '\0';
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
}
}
if (Overflow) {
SetLastError(ERROR_INSUFFICIENT_BUFFER);
};
/* finish it off with a string terminator */
outpos++;
/* sanity check */
if (outpos > datelen-1) outpos = datelen-1;
date[outpos] = '\0';
TRACE(ole, "OLE_GetFormatA returns string '%s', len %d\n",
date, outpos);
return outpos;
}
/**************************************************************
* OLE_GetFormatW [internal]
*/
INT32 WINAPI OLE_GetFormatW(LCID locale, DWORD flags,
LPSYSTEMTIME xtime,
LPCWSTR format,
LPWSTR output, INT32 outlen)
{
INT32 inpos, outpos;
int count, type=0, inquote;
int Overflow; /* loop check */
int usedate, usetime;
WCHAR buf[40];
int buflen=0;
char abuf[40];
WCHAR arg0[] = {0}, arg1[] = {'%','d',0};
WCHAR arg2[] = {'%','0','2','d',0};
WCHAR *argarr[] = {arg0, arg1, arg2};
int datevars=0, timevars=0;
/* make a debug report */
lstrcpynWtoA(abuf, format, sizeof(format));
TRACE(ole, "args: %8lx, %8lx, time(d=%d,h=%d,m=%d,s=%d), fmt:\'%s\' (at %p), %p with max len %d\n",
locale, flags,
xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
abuf, format, output, outlen);
/* initialize state variables */
inpos = outpos = 0;
count = 0;
inquote = Overflow = 0;
/* this is really just a sanity check */
output[0] = buf[0] = 0;
abuf[0] = '\0';
/* for compatibility with official Windows behavior */
usedate = flags & DATE_DATEVARSONLY;
usetime = flags & TIME_TIMEVARSONLY;
/* this loop is the core of the function */
for (inpos = 0; /* we have several break points */ ; inpos++) {
if (inquote) {
if (format[inpos] == (WCHAR) '\'') {
if (format[inpos+1] == '\'') {
inpos++;
output[outpos++] = '\'';
} else {
inquote = 0;
continue;
}
} else if (format[inpos] == 0) {
output[outpos++] = 0;
if (outpos > outlen) Overflow = 1;
break; /* normal exit (within a quote) */
} else {
output[outpos++] = format[inpos]; /* copy input */
if (outpos > outlen) {
Overflow = 1;
output[outpos-1] = 0;
break;
}
}
} else if ( (count && (format[inpos] != type))
|| ( (count==4 && type =='y') ||
(count==4 && type =='M') ||
(count==4 && type =='d') ||
(count==2 && type =='g') ||
(count==2 && type =='h') ||
(count==2 && type =='H') ||
(count==2 && type =='m') ||
(count==2 && type =='s') ||
(count==2 && type =='t') ) ) {
if (type == 'd') {
if (count == 3) {
GetLocaleInfo32W(locale,
LOCALE_SDAYNAME1 + xtime->wDayOfWeek -1,
buf, sizeof(buf)/sizeof(WCHAR) );
} else if (count == 3) {
GetLocaleInfo32W(locale,
LOCALE_SABBREVDAYNAME1 +
xtime->wDayOfWeek -1,
buf, sizeof(buf)/sizeof(WCHAR) );
} else {
wsnprintf32W(buf, 5, argarr[count], xtime->wDay );
};
} else if (type == 'M') {
if (count == 4) {
GetLocaleInfo32W(locale, LOCALE_SMONTHNAME1 +
xtime->wMonth -1, buf,
sizeof(buf)/sizeof(WCHAR) );
} else if (count == 3) {
GetLocaleInfo32W(locale, LOCALE_SABBREVMONTHNAME1 +
xtime->wMonth -1, buf,
sizeof(buf)/sizeof(WCHAR) );
} else {
wsnprintf32W(buf, 5, argarr[count], xtime->wMonth);
}
} else if (type == 'y') {
if (count == 4) {
wsnprintf32W(buf, 6, argarr[1] /* "%d" */,
xtime->wYear);
} else if (count == 3) {
lstrcpynAtoW(buf, "yyy", 5);
} else {
wsnprintf32W(buf, 6, argarr[count],
xtime->wYear % 100);
}
} else if (type == 'g') {
if (count == 2) {
FIXME(ole, "LOCALE_ICALENDARTYPE unimplemented\n");
lstrcpynAtoW(buf, "AD", 5);
} else {
/* Win API sez we copy it verbatim */
lstrcpynAtoW(buf, "g", 5);
}
} else if (type == 'h') {
/* hours 1:00-12:00 --- is this right? */
wsnprintf32W(buf, 5, argarr[count],
(xtime->wHour-1)%12 +1);
} else if (type == 'H') {
wsnprintf32W(buf, 5, argarr[count],
xtime->wHour);
} else if (type == 'm') {
wsnprintf32W(buf, 5, argarr[count],
xtime->wMinute);
} else if (type == 's') {
wsnprintf32W(buf, 5, argarr[count],
xtime->wSecond);
} else if (type == 't') {
GetLocaleInfo32W(locale, (xtime->wHour < 12) ?
LOCALE_S1159 : LOCALE_S2359,
buf, sizeof(buf) );
if (count == 1) {
buf[1] = 0;
}
}
/* no matter what happened, we need to check this next
character the next time we loop through */
inpos--;
/* cat buf onto the output */
outlen = lstrlen32W(buf);
if (outpos + buflen < outlen) {
output[outpos] = 0; /* a "hook" for strcat */
lstrcat32W(output, buf);
outpos += buflen;
} else {
output[outpos] = 0;
lstrcatn32W(output, buf, outlen - outpos);
output[outlen - 1] = 0;
Overflow = 1;
break; /* Abnormal exit */
}
/* reset the variables we used this time */
count = 0;
type = '\0';
} else if (format[inpos] == 0) {
/* we can't check for this at the beginning, because that
would keep us from printing a format spec that ended the
string */
output[outpos] = 0;
break; /* NORMAL EXIT */
} else if (count) {
/* how we keep track of the middle of a format spec */
count++;
continue;
} else if ( (datevars && (format[inpos]=='d' ||
format[inpos]=='M' ||
format[inpos]=='y' ||
format[inpos]=='g') ) ||
(timevars && (format[inpos]=='H' ||
format[inpos]=='h' ||
format[inpos]=='m' ||
format[inpos]=='s' ||
format[inpos]=='t') ) ) {
type = format[inpos];
count = 1;
continue;
} else if (format[inpos] == '\'') {
inquote = 1;
continue;
} else {
/* unquoted literals */
output[outpos++] = format[inpos];
}
}
if (Overflow) {
SetLastError(ERROR_INSUFFICIENT_BUFFER);
WARN(ole, " buffer overflow\n");
};
/* final string terminator and sanity check */
outpos++;
if (outpos > outlen-1) outpos = outlen-1;
output[outpos] = '0';
lstrcpynWtoA(abuf, output, sizeof(abuf) );
TRACE(ole, " returning string \'%s\'\n", abuf);
return (!Overflow) ? outlen : 0;
}
/*****************************************************************
* GetDateFormat32A() [KERNEL32.310] Makes an ASCII string of the date
*
* This function uses format to format the date, or, if format
* is NULL, uses the default for the locale. format is a string
* of literal fields and characters as follows:
*
* - d single-digit (no leading zero) day (of month)
* - dd two-digit day (of month)
* - ddd short day-of-week name
* - dddd long day-of-week name
* - M single-digit month
* - MM two-digit month
* - MMM short month name
* - MMMM full month name
* - y two-digit year, no leading 0
* - yy two-digit year
* - yyyy four-digit year
* - gg era string
*
*/
INT32 WINAPI GetDateFormat32A(LCID locale,DWORD flags,
LPSYSTEMTIME xtime,
LPCSTR format, LPSTR date,INT32 datelen)
{
char format_buf[40];
LPCSTR thisformat;
SYSTEMTIME t;
LPSYSTEMTIME thistime;
LCID thislocale;
INT32 ret;
TRACE(ole,"(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",
locale,flags,xtime,format,date,datelen);
if (!locale) {
locale = LOCALE_SYSTEM_DEFAULT;
};
if (locale == LOCALE_SYSTEM_DEFAULT) {
thislocale = GetSystemDefaultLCID();
} else if (locale == LOCALE_USER_DEFAULT) {
thislocale = GetUserDefaultLCID();
} else {
thislocale = locale;
};
if (xtime == NULL) {
GetSystemTime(&t);
thistime = &t;
} else {
thistime = xtime;
};
if (format == NULL) {
GetLocaleInfo32A(thislocale, ((flags&DATE_LONGDATE)
? LOCALE_SLONGDATE
: LOCALE_SSHORTDATE),
format_buf, sizeof(format_buf));
thisformat = format_buf;
} else {
thisformat = format;
};
ret = OLE_GetFormatA(thislocale, flags, thistime, thisformat,
date, datelen);
TRACE(ole,
"GetDateFormat32A() returning %d, with data=%s\n",
ret, date);
return ret;
}
/* ****************************************************************
* GetDateFormat32W() [KERNEL32.311] Makes a Unicode string of the date
*
* Acts the same as GetDateFormat32A(), except that it's Unicode.
* Accepts & returns sizes as counts of Unicode characters.
*
*/
INT32 WINAPI GetDateFormat32W(LCID locale,DWORD flags,
LPSYSTEMTIME xtime,
LPCWSTR format,
LPWSTR date, INT32 datelen)
{
short datearr[] = {'1','9','9','4','-','1','-','1',0};
FIXME(ole, "STUB (should call OLE_GetFormatW)\n");
lstrcpyn32W(date, datearr, datelen);
return ( datelen < 9) ? datelen : 9;
}
/**************************************************************************
* GetNumberFormat32A (KERNEL32.355)
* NOTE: type of lpFormat should be CONST NUMBERFORMAT
*/
INT32 WINAPI GetNumberFormat32A(LCID locale, DWORD dwflags,
LPCSTR lpvalue, char *lpFormat,
LPSTR lpNumberStr, int cchNumber)
{
int n;
FIXME(file,"%s: stub, no reformating done\n",lpvalue);
n = strlen(lpvalue);
if (cchNumber) {
strncpy(lpNumberStr,lpvalue,cchNumber);
if (cchNumber <= n) {
lpNumberStr[cchNumber-1] = 0;
n = cchNumber-1;
}
}
return n;
}
/*****************************************************************
*
* GetTimeFormat32A() [KERNEL32.422] Makes an ASCII string of the time
*
* Formats date according to format, or locale default if format is
* NULL. The format consists of literal characters and fields as follows:
*
* h hours with no leading zero (12-hour)
* hh hours with full two digits
* H hours with no leading zero (24-hour)
* HH hours with full two digits
* m minutes with no leading zero
* mm minutes with full two digits
* s seconds with no leading zero
* ss seconds with full two digits
* t time marker (A or P)
* tt time marker (AM, PM)
*
*/
INT32 WINAPI
GetTimeFormat32A(LCID locale, /* in */
DWORD flags, /* in */
LPSYSTEMTIME xtime, /* in */
LPCSTR format, /* in */
LPSTR timestr, /* out */
INT32 timelen /* in */)
{
LPCSTR realformat;
char fmt_buf[40];
TRACE(ole,"GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",
locale,flags,xtime,format,timestr,timelen);
if (format) {
realformat = format;
} else if (locale) {
GetLocaleInfo32A(locale, LOCALE_STIMEFORMAT,
fmt_buf, sizeof(fmt_buf));
realformat = fmt_buf;
} else {
WARN(ole, "Caller gave no locale and no format\n");
realformat = "hh:mm:ss";
};
if (!locale) {
locale = GetSystemDefaultLCID();
}
return OLE_GetFormatA(locale, flags, xtime, realformat, timestr, timelen);
}
/* ****************************************************************
* GetTimeFormat32W() [KERNEL32.423] Makes a Unicode string of the time
*
*
*/
INT32 WINAPI
GetTimeFormat32W(LCID locale,DWORD flags,
LPSYSTEMTIME xtime,
LPCWSTR format,
LPWSTR timestr,INT32 timelen)
{
char debugbuf[40];
WCHAR buf[20];
LPCWSTR realformat=0;
SYSTEMTIME t;
LPSYSTEMTIME realtime;
WCHAR * fmt_buf = NULL;
int fmt_buf_size = 0; /* units of WCHARs */
INT32 retval;
lstrcpynWtoA(debugbuf, format, (sizeof(buf))/2);
TRACE(ole, "GetTimeFormatW len %d flags 0x%lX format >%s<\n",
timelen, flags, debugbuf);
/* Enforce the Windows behavior */
flags |= ~LOCALE_TIMEDATEBOTH;
flags |= TIME_TIMEVARSONLY;
/* take care of the format or locale not being given */
if (format) {
realformat = format;
} else if (locale) {
/* allocate memory */
retval = ERROR_INSUFFICIENT_BUFFER;
fmt_buf = malloc((fmt_buf_size+=7) * sizeof(WCHAR));
if (!fmt_buf)
goto out_nomem;
while(!GetLocaleInfo32W(locale, LOCALE_STIMEFORMAT,
fmt_buf, fmt_buf_size)) {
retval = ERROR_OUTOFMEMORY;
fmt_buf = realloc(fmt_buf,
(fmt_buf_size += 10) * sizeof(WCHAR));
if (!fmt_buf)
goto out_nomem;
}
realformat = fmt_buf;
} else {
FIXME(ole, "caller gave no locale, no format; what should we do?\n");
SetLastError(ERROR_BAD_FORMAT);
}
if (!locale)
locale = GetSystemDefaultLCID();
realtime = xtime;
if (!realtime) {
realtime = &t;
GetSystemTime(realtime);
}
retval = OLE_GetFormatW(locale, flags, realtime, realformat, timestr, timelen);
if (fmt_buf)
free(fmt_buf);
return retval;
out_nomem:
SetLastError(retval);
WARN(ole, "could not allocate %d chars of memory\n", fmt_buf_size);
return 0;
}