Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c267e3ae
Commit
c267e3ae
authored
Oct 18, 1998
by
Juergen Schmied
Committed by
Alexandre Julliard
Oct 18, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetLocaleInfo32A can handle len=0 now, sets LastError and touches
buffer only when necessary. Updated deu.nls and some LCTYPES in winnls.h.
parent
76e07b9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
47 deletions
+74
-47
winnls.h
include/winnls.h
+3
-0
deu.nls
ole/nls/deu.nls
+29
-27
ole2nls.c
ole/ole2nls.c
+42
-20
No files found.
include/winnls.h
View file @
c267e3ae
...
...
@@ -24,6 +24,7 @@
#define LOCALE_IDEFAULTCOUNTRY 0x0000000A
#define LOCALE_IDEFAULTCODEPAGE 0x0000000B
#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
#define LOCALE_IDEFAULTMACCODEPAGE 0x00001011
#define LOCALE_SLIST 0x0000000C
#define LOCALE_IMEASURE 0x0000000D
#define LOCALE_SDECIMAL 0x0000000E
...
...
@@ -110,6 +111,8 @@
#define LOCALE_INEGSYMPRECEDES 0x00000056
#define LOCALE_INEGSEPBYSPACE 0x00000057
#define LOCALE_FONTSIGNATURE 0x00000058
#define LOCALE_SISO639LANGNAME 0x00000059
#define LOCALE_SISO3166CTRYNAME 0x0000005A
#define NORM_IGNORECASE 1
...
...
ole/nls/deu.nls
View file @
c267e3ae
...
...
@@ -4,9 +4,9 @@
*/
LOCVAL(LOCALE_ILANGUAGE,"0407")
LOCVAL(LOCALE_SLANGUAGE,"Deutsch")
LOCVAL(LOCALE_SLANGUAGE,"Deutsch
(Deutschland)
")
LOCVAL(LOCALE_SENGLANGUAGE,"German")
LOCVAL(LOCALE_SABBREVLANGNAME,"
deu
")
LOCVAL(LOCALE_SABBREVLANGNAME,"
DEU
")
LOCVAL(LOCALE_SNATIVELANGNAME,"Deutsch")
LOCVAL(LOCALE_ICOUNTRY,"49")
LOCVAL(LOCALE_SCOUNTRY,"Deutschland")
...
...
@@ -15,16 +15,17 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"DEU")
LOCVAL(LOCALE_SNATIVECTRYNAME,"Deutschland")
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"0407")
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"49")
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"85
1
")
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"85
0
")
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,"1252")
LOCVAL(LOCALE_SLIST,";")
LOCVAL(LOCALE_IMEASURE,"0")
LOCVAL(LOCALE_SDECIMAL,",")
LOCVAL(LOCALE_STHOUSAND,".")
/* LOCVAL(LOCALE_SGROUPING) */
LOCVAL(LOCALE_SGROUPING,"3;0")
LOCVAL(LOCALE_IDIGITS,"2")
LOCVAL(LOCALE_IDEFAULTMACCODEPAGE,"10000")
LOCVAL(LOCALE_ILZERO,"1")
/* LOCVAL(LOCALE_INEGNUMBER) */
LOCVAL(LOCALE_INEGNUMBER,"1")
LOCVAL(LOCALE_SNATIVEDIGITS, "0123456789")
LOCVAL(LOCALE_SCURRENCY,"DM")
LOCVAL(LOCALE_SINTLSYMBOL, "DEM")
...
...
@@ -32,35 +33,35 @@ LOCVAL(LOCALE_SMONDECIMALSEP, ",")
LOCVAL(LOCALE_SMONTHOUSANDSEP, ".")
LOCVAL(LOCALE_SMONGROUPING, "3;0")
LOCVAL(LOCALE_ICURRDIGITS,"2")
/* LOCVAL(LOCALE_IINTLCURRDIGITS) */
LOCVAL(LOCALE_IINTLCURRDIGITS,"2")
LOCVAL(LOCALE_ICURRENCY,"3")
LOCVAL(LOCALE_INEGCURR,"8")
LOCVAL(LOCALE_SDATE,".")
LOCVAL(LOCALE_STIME,":")
LOCVAL(LOCALE_SSHORTDATE,"dd.MM.yy
yy
")
LOCVAL(LOCALE_SLONGDATE,"ddd, d. MMMM yyyy")
/* LOCVAL(LOCALE_STIMEFORMAT) */
LOCVAL(LOCALE_SSHORTDATE,"dd.MM.yy")
LOCVAL(LOCALE_SLONGDATE,"ddd
d
, d. MMMM yyyy")
LOCVAL(LOCALE_STIMEFORMAT,"HH:mm:ss")
LOCVAL(LOCALE_IDATE,"1")
/* LOCVAL(LOCALE_ILDATE) */
LOCVAL(LOCALE_ILDATE,"1")
LOCVAL(LOCALE_ITIME,"1")
/* LOCVAL(LOCALE_ITIMEMARKPOSN) */
/* LOCVAL(LOCALE_ICENTURY) */
LOCVAL(LOCALE_ITIMEMARKPOSN,"0")
LOCVAL(LOCALE_ICENTURY,"0")
LOCVAL(LOCALE_ITLZERO,"1")
/* LOCVAL(LOCALE_IDAYLZERO) */
/* LOCVAL(LOCALE_IMONLZERO) */
LOCVAL(LOCALE_IDAYLZERO,"1")
LOCVAL(LOCALE_IMONLZERO,"1")
LOCVAL(LOCALE_S1159,"")
LOCVAL(LOCALE_S2359,"")
LOCVAL(LOCALE_ICALENDARTYPE, "1")
/* LOCVAL(LOCALE_IOPTIONALCALENDAR) */
/* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
/* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */
LOCVAL(LOCALE_IOPTIONALCALENDAR,"0")
LOCVAL(LOCALE_IFIRSTDAYOFWEEK,"0")
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR,"2")
LOCVAL(LOCALE_SDAYNAME1,"Montag")
LOCVAL(LOCALE_SDAYNAME2,"Dienstag")
LOCVAL(LOCALE_SDAYNAME3,"Mittwoch")
LOCVAL(LOCALE_SDAYNAME4,"Donnerstag")
LOCVAL(LOCALE_SDAYNAME5,"Freitag")
LOCVAL(LOCALE_SDAYNAME6,"S
onnabend
")
LOCVAL(LOCALE_SDAYNAME6,"S
amstag
")
LOCVAL(LOCALE_SDAYNAME7,"Sonntag")
LOCVAL(LOCALE_SABBREVDAYNAME1,"Mo")
...
...
@@ -87,7 +88,7 @@ LOCVAL(LOCALE_SMONTHNAME13,"")
LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jan")
LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mr")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mr
z
")
LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr")
LOCVAL(LOCALE_SABBREVMONTHNAME5,"Mai")
LOCVAL(LOCALE_SABBREVMONTHNAME6,"Jun")
...
...
@@ -101,11 +102,12 @@ 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) */
/* Gregorianischer Kalender */
LOCVAL(LOCALE_IPOSSIGNPOSN,"1")
LOCVAL(LOCALE_INEGSIGNPOSN,"1")
LOCVAL(LOCALE_IPOSSYMPRECEDES,"0")
LOCVAL(LOCALE_IPOSSEPBYSPACE,"1")
LOCVAL(LOCALE_INEGSYMPRECEDES,"0")
LOCVAL(LOCALE_INEGSEPBYSPACE,"1")
LOCVAL(LOCALE_FONTSIGNATURE,"/")
LOCVAL(LOCALE_SISO639LANGNAME,"de")
LOCVAL(LOCALE_SISO3166CTRYNAME,"DE")
ole/ole2nls.c
View file @
c267e3ae
...
...
@@ -42,6 +42,7 @@ static struct tagLOCALE_NAME2ID {
LOCALE_ENTRY
(
IDEFAULTCOUNTRY
),
LOCALE_ENTRY
(
IDEFAULTCODEPAGE
),
LOCALE_ENTRY
(
IDEFAULTANSICODEPAGE
),
LOCALE_ENTRY
(
IDEFAULTMACCODEPAGE
),
LOCALE_ENTRY
(
SLIST
),
LOCALE_ENTRY
(
IMEASURE
),
LOCALE_ENTRY
(
SDECIMAL
),
...
...
@@ -127,7 +128,9 @@ static struct tagLOCALE_NAME2ID {
LOCALE_ENTRY
(
IPOSSEPBYSPACE
),
LOCALE_ENTRY
(
INEGSYMPRECEDES
),
LOCALE_ENTRY
(
INEGSEPBYSPACE
),
/* LOCALE_ENTRY(FONTSIGNATURE),*/
LOCALE_ENTRY
(
FONTSIGNATURE
),
LOCALE_ENTRY
(
SISO639LANGNAME
),
LOCALE_ENTRY
(
SISO3166CTRYNAME
),
{
NULL
,
0
},
};
...
...
@@ -419,6 +422,11 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
TRACE
(
ole
,
"(lcid=0x%lx,lctype=0x%lx,%p,%x)
\n
"
,
lcid
,
LCType
,
buf
,
len
);
if
(
len
&&
(
!
buf
)
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
0
;
}
if
(
lcid
==
LOCALE_SYSTEM_DEFAULT
||
(
LCType
&
LOCALE_NOUSEROVERRIDE
)
)
{
lcid
=
GetSystemDefaultLCID
();
}
...
...
@@ -517,39 +525,53 @@ LANG_END
/*Insert other languages here*/
default:
found
=
0
;
break
;
}
/* switch */
found
=
0
;
break
;
}
/* switch */
/* language not found, try without a sublanguage*/
if
(
i
==
1
)
lang
=
MAKELANGID
(
PRIMARYLANGID
(
lang
),
SUBLANG_DEFAULT
);
/* mask the LC Value */
if
(
i
==
2
)
LCType
&=
0xfff
;
/* language not found, try without a sublanguage*/
lang
=
MAKELANGID
(
PRIMARYLANGID
(
lang
),
SUBLANG_DEFAULT
);
i
++
;
}
while
(
!
found
&&
i
<
2
);
i
++
;
}
while
(
!
found
&&
i
<
3
);
if
(
!
found
)
{
ERR
(
ole
,
"'%s' not supported for your language.
\n
"
,
retString
);
ret
String
=
"<WINE-NLS-unknown>"
;
if
(
!
found
)
{
ERR
(
ole
,
"'%s' not supported for your language.
\n
"
,
retString
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
urn
0
;
}
if
(
buf
)
/* if len=0 return only the length, don't touch the buffer*/
if
(
len
)
lstrcpyn32A
(
buf
,
retString
,
len
);
return
strlen
(
retString
)
+
1
;
}
/******************************************************************************
* GetLocaleInfo32W [KERNEL32.343]
*
* 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
);
{
WORD
wlen
;
LPSTR
abuf
;
if
(
len
&&
(
!
wbuf
)
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
0
;
}
abuf
=
(
LPSTR
)
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
wlen
=
2
*
GetLocaleInfo32A
(
lcid
,
LCType
,
abuf
,
len
);
if
(
wlen
&&
len
)
/* if len=0 return only the length*/
lstrcpynAtoW
(
wbuf
,
abuf
,
len
/
2
);
INT32
n
=
GetLocaleInfo32A
(
lcid
,
LCType
,
abuf
,
len
);
if
(
wbuf
)
lstrcpynAtoW
(
wbuf
,
abuf
,
len
);
HeapFree
(
GetProcessHeap
(),
0
,
abuf
);
return
n
;
return
wle
n
;
}
/******************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment