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
77d06fc6
Commit
77d06fc6
authored
Apr 04, 2001
by
Rein Klazes
Committed by
Alexandre Julliard
Apr 04, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement TIME_FORCE24HOURFORMAT and TIME_NOTIMEMARKER flags in
OLE_GetFormatA.
parent
2ec34e48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
26 deletions
+15
-26
ole2nls.c
ole/ole2nls.c
+15
-26
No files found.
ole/ole2nls.c
View file @
77d06fc6
...
@@ -2659,10 +2659,10 @@ static INT OLE_GetFormatA(LCID locale,
...
@@ -2659,10 +2659,10 @@ static INT OLE_GetFormatA(LCID locale,
}
}
}
else
if
(
(
count
&&
(
format
[
inpos
]
!=
type
))
}
else
if
(
(
count
&&
(
format
[
inpos
]
!=
type
))
||
count
==
4
||
count
==
4
||
(
count
==
2
&&
strchr
(
"ghHmst"
,
type
))
)
||
(
count
==
2
&&
strchr
(
"ghHmst"
,
type
))
)
{
{
if
(
type
==
'h'
&&
(
tflags
&
TIME_FORCE24HOURFORMAT
))
type
=
'H'
;
if
(
type
==
'd'
)
{
if
(
type
==
'd'
)
{
if
(
count
==
4
)
{
if
(
count
==
4
)
{
GetLocaleInfoA
(
locale
,
GetLocaleInfoA
(
locale
,
LOCALE_SDAYNAME1
LOCALE_SDAYNAME1
+
(
xtime
->
wDayOfWeek
+
6
)
%
7
,
+
(
xtime
->
wDayOfWeek
+
6
)
%
7
,
...
@@ -2717,15 +2717,17 @@ static INT OLE_GetFormatA(LCID locale,
...
@@ -2717,15 +2717,17 @@ static INT OLE_GetFormatA(LCID locale,
}
else
if
(
type
==
's'
)
{
}
else
if
(
type
==
's'
)
{
sprintf
(
buf
,
dgfmt
[
count
],
xtime
->
wSecond
);
sprintf
(
buf
,
dgfmt
[
count
],
xtime
->
wSecond
);
}
else
if
(
type
==
't'
)
{
}
else
if
(
type
==
't'
)
{
if
(
count
==
1
)
{
if
((
tflags
&
TIME_NOTIMEMARKER
))
buf
[
0
]
=
'\0'
;
else
if
(
count
==
1
)
{
sprintf
(
buf
,
"%c"
,
(
xtime
->
wHour
<
12
)
?
'A'
:
'P'
);
sprintf
(
buf
,
"%c"
,
(
xtime
->
wHour
<
12
)
?
'A'
:
'P'
);
}
else
if
(
count
==
2
)
{
}
else
if
(
count
==
2
)
{
/* sprintf(buf, "%s", (xtime->wHour < 12) ? "AM" : "PM"); */
/* sprintf(buf, "%s", (xtime->wHour < 12) ? "AM" : "PM"); */
GetLocaleInfoA
(
locale
,
GetLocaleInfoA
(
locale
,
(
xtime
->
wHour
<
12
)
(
xtime
->
wHour
<
12
)
?
LOCALE_S1159
:
LOCALE_S2359
,
?
LOCALE_S1159
:
LOCALE_S2359
,
buf
,
sizeof
(
buf
));
buf
,
sizeof
(
buf
));
}
}
};
};
/* we need to check the next char in the format string
/* we need to check the next char in the format string
...
@@ -2787,8 +2789,7 @@ static INT OLE_GetFormatA(LCID locale,
...
@@ -2787,8 +2789,7 @@ static INT OLE_GetFormatA(LCID locale,
if
(
outpos
>
datelen
-
1
)
outpos
=
datelen
-
1
;
if
(
outpos
>
datelen
-
1
)
outpos
=
datelen
-
1
;
date
[
outpos
]
=
'\0'
;
date
[
outpos
]
=
'\0'
;
TRACE
(
"OLE_GetFormatA returns string '%s', len %d
\n
"
,
TRACE
(
"returns string '%s', len %d
\n
"
,
date
,
outpos
);
date
,
outpos
);
return
outpos
;
return
outpos
;
}
}
...
@@ -4173,12 +4174,6 @@ GetTimeFormatA(LCID locale, /* [in] */
...
@@ -4173,12 +4174,6 @@ GetTimeFormatA(LCID locale, /* [in] */
thislocale
=
OLE2NLS_CheckLocale
(
locale
);
thislocale
=
OLE2NLS_CheckLocale
(
locale
);
if
(
flags
&
(
TIME_NOTIMEMARKER
|
TIME_FORCE24HOURFORMAT
))
{
FIXME
(
"TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented
\n
"
);
}
flags
&=
(
TIME_NOSECONDS
|
TIME_NOMINUTESORSECONDS
);
/* mask for OLE_GetFormatA*/
if
(
format
==
NULL
)
if
(
format
==
NULL
)
{
if
(
flags
&
LOCALE_NOUSEROVERRIDE
)
/*use system default*/
{
if
(
flags
&
LOCALE_NOUSEROVERRIDE
)
/*use system default*/
{
thislocale
=
GetSystemDefaultLCID
();
{
thislocale
=
GetSystemDefaultLCID
();
...
@@ -4228,12 +4223,6 @@ GetTimeFormatW(LCID locale, /* [in] */
...
@@ -4228,12 +4223,6 @@ GetTimeFormatW(LCID locale, /* [in] */
thislocale
=
OLE2NLS_CheckLocale
(
locale
);
thislocale
=
OLE2NLS_CheckLocale
(
locale
);
if
(
flags
&
(
TIME_NOTIMEMARKER
|
TIME_FORCE24HOURFORMAT
))
{
FIXME
(
"TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented
\n
"
);
}
flags
&=
(
TIME_NOSECONDS
|
TIME_NOMINUTESORSECONDS
);
/* mask for OLE_GetFormatA*/
if
(
format
==
NULL
)
if
(
format
==
NULL
)
{
if
(
flags
&
LOCALE_NOUSEROVERRIDE
)
/*use system default*/
{
if
(
flags
&
LOCALE_NOUSEROVERRIDE
)
/*use system default*/
{
thislocale
=
GetSystemDefaultLCID
();
{
thislocale
=
GetSystemDefaultLCID
();
...
...
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