Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3b370994
Commit
3b370994
authored
Jun 08, 2005
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- implement handling of exponents (e+,e-,E+,E-) when parsing number
formats - fix a small cut'n'paste error in the comments
parent
ff4ba957
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
varformat.c
dlls/oleaut32/varformat.c
+31
-3
No files found.
dlls/oleaut32/varformat.c
View file @
3b370994
...
...
@@ -275,8 +275,8 @@ typedef struct tagFMT_DATE_HEADER
#define FMT_NUM_COPY_SKIP 0x35
/* Copy 1 digit or skip if no digit */
#define FMT_NUM_DECIMAL 0x36
/* Decimal separator */
#define FMT_NUM_EXP_POS_U 0x37
/* Scientific notation, uppercase, + sign */
#define FMT_NUM_EXP_NEG_U 0x38
/* Scientific notation,
low
ercase, - sign */
#define FMT_NUM_EXP_POS_L 0x39
/* Scientific notation,
upp
ercase, + sign */
#define FMT_NUM_EXP_NEG_U 0x38
/* Scientific notation,
upp
ercase, - sign */
#define FMT_NUM_EXP_POS_L 0x39
/* Scientific notation,
low
ercase, + sign */
#define FMT_NUM_EXP_NEG_L 0x3A
/* Scientific notation, lowercase, - sign */
#define FMT_NUM_CURRENCY 0x3B
/* Currency symbol */
#define FMT_NUM_TRUE_FALSE 0x3D
/* Convert to "True" or "False" */
...
...
@@ -708,7 +708,35 @@ HRESULT WINAPI VarTokenizeFormatString(LPOLESTR lpszFormat, LPBYTE rgbTok,
pFormat
++
;
TRACE
(
"decimal sep
\n
"
);
}
/* FIXME: E+ E- e+ e- => Exponent */
else
if
((
*
pFormat
==
'e'
||
*
pFormat
==
'E'
)
&&
(
pFormat
[
1
]
==
'-'
||
pFormat
[
1
]
==
'+'
)
&&
header
->
type
==
FMT_TYPE_NUMBER
)
{
/* Number formats: Exponent specifier
* Other formats: Literal
*/
num_header
->
flags
|=
FMT_FLAG_EXPONENT
;
NEED_SPACE
(
2
*
sizeof
(
BYTE
));
if
(
*
pFormat
==
'e'
)
{
if
(
pFormat
[
1
]
==
'+'
)
*
pOut
=
FMT_NUM_EXP_POS_L
;
else
*
pOut
=
FMT_NUM_EXP_NEG_L
;
}
else
{
if
(
pFormat
[
1
]
==
'+'
)
*
pOut
=
FMT_NUM_EXP_POS_U
;
else
*
pOut
=
FMT_NUM_EXP_NEG_U
;
}
pFormat
+=
2
;
*++
pOut
=
0x0
;
while
(
*
pFormat
==
'0'
)
{
*
pOut
=
*
pOut
+
1
;
pFormat
++
;
}
pOut
++
;
TRACE
(
"exponent
\n
"
);
}
/* FIXME: %% => Divide by 1000 */
else
if
(
*
pFormat
==
','
&&
header
->
type
==
FMT_TYPE_NUMBER
)
{
...
...
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