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
722fd584
Commit
722fd584
authored
Apr 28, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Apr 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Process CRLF escape sequences in normal insert sequence processing…
kernel32: Process CRLF escape sequences in normal insert sequence processing path in FormatMessageA/W.
parent
1d18b890
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
format_msg.c
dlls/kernel32/format_msg.c
+8
-0
format_msg.c
dlls/kernel32/tests/format_msg.c
+14
-0
No files found.
dlls/kernel32/format_msg.c
View file @
722fd584
...
...
@@ -360,6 +360,14 @@ static LPWSTR format_message( BOOL unicode_caller, DWORD dwFlags, LPCWSTR fmtstr
ADD_TO_T
(
'\n'
);
f
++
;
break
;
case
'r'
:
ADD_TO_T
(
'\r'
);
f
++
;
break
;
case
't'
:
ADD_TO_T
(
'\t'
);
f
++
;
break
;
case
'0'
:
eos
=
TRUE
;
f
++
;
...
...
dlls/kernel32/tests/format_msg.c
View file @
722fd584
...
...
@@ -84,6 +84,7 @@ static void test_message_from_string_wide(void)
static
const
WCHAR
fmt_t0t
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'%'
,
'0'
,
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
fmt_yah
[]
=
{
'y'
,
'a'
,
'h'
,
'%'
,
'!'
,
'%'
,
'0'
,
' '
,
' '
,
' '
,
0
};
static
const
WCHAR
fmt_space
[]
=
{
'%'
,
' '
,
'%'
,
' '
,
' '
,
' '
,
0
};
static
const
WCHAR
fmt_nrt
[]
=
{
'%'
,
'n'
,
'%'
,
'r'
,
'%'
,
't'
,
0
};
static
const
WCHAR
fmt_hi_lf
[]
=
{
'h'
,
'i'
,
'\n'
,
0
};
static
const
WCHAR
fmt_hi_crlf
[]
=
{
'h'
,
'i'
,
'\r'
,
'\n'
,
0
};
static
const
WCHAR
fmt_cr
[]
=
{
'\r'
,
0
};
...
...
@@ -108,6 +109,7 @@ static void test_message_from_string_wide(void)
static
const
WCHAR
s_2dot147
[]
=
{
' '
,
'.'
,
'.'
,
' '
,
' '
,
'4'
,
'2'
,
'7'
,
0
};
static
const
WCHAR
s_yah
[]
=
{
'y'
,
'a'
,
'h'
,
'!'
,
0
};
static
const
WCHAR
s_space
[]
=
{
' '
,
' '
,
' '
,
' '
,
0
};
static
const
WCHAR
s_nrt
[]
=
{
'\r'
,
'\n'
,
'\r'
,
'\t'
,
0
};
static
const
WCHAR
s_hi_crlf
[]
=
{
'h'
,
'i'
,
'\r'
,
'\n'
,
0
};
static
const
WCHAR
s_crlf
[]
=
{
'\r'
,
'\n'
,
0
};
static
const
WCHAR
s_crlfcrlf
[]
=
{
'\r'
,
'\n'
,
'\r'
,
'\n'
,
0
};
...
...
@@ -327,6 +329,12 @@ static void test_message_from_string_wide(void)
ok
(
!
lstrcmpW
(
s_space
,
out
),
"failed out=%s
\n
"
,
wine_dbgstr_w
(
out
));
ok
(
r
==
4
,
"failed: r=%d
\n
"
,
r
);
/* %n yields \r\n, %r yields \r, %t yields \t */
r
=
doitW
(
FORMAT_MESSAGE_FROM_STRING
,
fmt_nrt
,
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
WCHAR
));
ok
(
!
lstrcmpW
(
s_nrt
,
out
),
"failed out=%s
\n
"
,
wine_dbgstr_w
(
out
));
ok
(
r
==
4
,
"failed: r=%d
\n
"
,
r
);
/* line feed */
r
=
doitW
(
FORMAT_MESSAGE_FROM_STRING
,
fmt_hi_lf
,
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
WCHAR
));
...
...
@@ -624,6 +632,12 @@ static void test_message_from_string(void)
ok
(
!
strcmp
(
" "
,
out
),
"failed out=[%s]
\n
"
,
out
);
ok
(
r
==
4
,
"failed: r=%d
\n
"
,
r
);
/* %n yields \r\n, %r yields \r, %t yields \t */
r
=
doit
(
FORMAT_MESSAGE_FROM_STRING
,
"%n%r%t"
,
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
CHAR
));
ok
(
!
strcmp
(
"
\r\n\r\t
"
,
out
),
"failed out=[%s]
\n
"
,
out
);
ok
(
r
==
4
,
"failed: r=%d
\n
"
,
r
);
/* line feed */
r
=
doit
(
FORMAT_MESSAGE_FROM_STRING
,
"hi
\n
"
,
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
CHAR
));
...
...
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