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
36bfd19a
Commit
36bfd19a
authored
Mar 27, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Use nameless unions.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
497de3cc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
31 deletions
+30
-31
Makefile.in
dlls/inetcomm/Makefile.in
+0
-1
mimeintl.c
dlls/inetcomm/mimeintl.c
+10
-10
mimeole.c
dlls/inetcomm/mimeole.c
+12
-12
pop3transport.c
dlls/inetcomm/pop3transport.c
+6
-6
protocol.c
dlls/inetcomm/protocol.c
+2
-2
No files found.
dlls/inetcomm/Makefile.in
View file @
36bfd19a
MODULE
=
inetcomm.dll
IMPORTLIB
=
inetcomm
IMPORTS
=
uuid urlmon propsys oleaut32 ole32 ws2_32 user32 advapi32
EXTRADEFS
=
-DWINE_NO_NAMELESS_EXTENSION
EXTRADLLFLAGS
=
-mno-cygwin
-Wb
,--prefer-native
...
...
dlls/inetcomm/mimeintl.c
View file @
36bfd19a
...
...
@@ -410,11 +410,11 @@ static HRESULT WINAPI MimeInternat_ConvertString(IMimeInternational *iface, CODE
{
case
VT_LPSTR
:
if
(
cpiSource
==
CP_UNICODE
)
cpiSource
=
GetACP
();
src_len
=
strlen
(
pIn
->
u
.
pszVal
);
src_len
=
strlen
(
pIn
->
pszVal
);
break
;
case
VT_LPWSTR
:
cpiSource
=
CP_UNICODE
;
src_len
=
lstrlenW
(
pIn
->
u
.
pwszVal
)
*
sizeof
(
WCHAR
);
src_len
=
lstrlenW
(
pIn
->
pwszVal
)
*
sizeof
(
WCHAR
);
break
;
default:
return
E_INVALIDARG
;
...
...
@@ -426,37 +426,37 @@ static HRESULT WINAPI MimeInternat_ConvertString(IMimeInternational *iface, CODE
DWORD
mode
=
0
;
UINT
in_size
=
src_len
,
out_size
;
hr
=
IMultiLanguage_ConvertString
(
ml
,
&
mode
,
cpiSource
,
cpiDest
,
(
BYTE
*
)
pIn
->
u
.
pszVal
,
&
in_size
,
hr
=
IMultiLanguage_ConvertString
(
ml
,
&
mode
,
cpiSource
,
cpiDest
,
(
BYTE
*
)
pIn
->
pszVal
,
&
in_size
,
NULL
,
&
out_size
);
if
(
hr
==
S_OK
)
/* S_FALSE means the conversion could not be performed */
{
out_size
+=
(
cpiDest
==
CP_UNICODE
)
?
sizeof
(
WCHAR
)
:
sizeof
(
char
);
pOut
->
u
.
pszVal
=
CoTaskMemAlloc
(
out_size
);
if
(
!
pOut
->
u
.
pszVal
)
pOut
->
pszVal
=
CoTaskMemAlloc
(
out_size
);
if
(
!
pOut
->
pszVal
)
hr
=
E_OUTOFMEMORY
;
else
{
mode
=
0
;
in_size
=
src_len
;
hr
=
IMultiLanguage_ConvertString
(
ml
,
&
mode
,
cpiSource
,
cpiDest
,
(
BYTE
*
)
pIn
->
u
.
pszVal
,
&
in_size
,
(
BYTE
*
)
pOut
->
u
.
pszVal
,
&
out_size
);
hr
=
IMultiLanguage_ConvertString
(
ml
,
&
mode
,
cpiSource
,
cpiDest
,
(
BYTE
*
)
pIn
->
pszVal
,
&
in_size
,
(
BYTE
*
)
pOut
->
pszVal
,
&
out_size
);
if
(
hr
==
S_OK
)
{
if
(
cpiDest
==
CP_UNICODE
)
{
pOut
->
u
.
pwszVal
[
out_size
/
sizeof
(
WCHAR
)]
=
0
;
pOut
->
pwszVal
[
out_size
/
sizeof
(
WCHAR
)]
=
0
;
pOut
->
vt
=
VT_LPWSTR
;
}
else
{
pOut
->
u
.
pszVal
[
out_size
]
=
'\0'
;
pOut
->
pszVal
[
out_size
]
=
'\0'
;
pOut
->
vt
=
VT_LPSTR
;
}
}
else
CoTaskMemFree
(
pOut
->
u
.
pszVal
);
CoTaskMemFree
(
pOut
->
pszVal
);
}
}
IMultiLanguage_Release
(
ml
);
...
...
dlls/inetcomm/mimeole.c
View file @
36bfd19a
...
...
@@ -738,7 +738,7 @@ static void read_value(header_t *header, char **cur)
}
header
->
value
.
vt
=
VT_LPSTR
;
header
->
value
.
u
.
pszVal
=
value
;
header
->
value
.
pszVal
=
value
;
*
cur
=
end
;
}
...
...
@@ -748,22 +748,22 @@ static void init_content_type(MimeBody *body, header_t *header)
char
*
slash
;
DWORD
len
;
slash
=
strchr
(
header
->
value
.
u
.
pszVal
,
'/'
);
slash
=
strchr
(
header
->
value
.
pszVal
,
'/'
);
if
(
!
slash
)
{
WARN
(
"malformed context type value
\n
"
);
return
;
}
len
=
slash
-
header
->
value
.
u
.
pszVal
;
len
=
slash
-
header
->
value
.
pszVal
;
body
->
content_pri_type
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
);
memcpy
(
body
->
content_pri_type
,
header
->
value
.
u
.
pszVal
,
len
);
memcpy
(
body
->
content_pri_type
,
header
->
value
.
pszVal
,
len
);
body
->
content_pri_type
[
len
]
=
'\0'
;
body
->
content_sub_type
=
strdupA
(
slash
+
1
);
}
static
void
init_content_encoding
(
MimeBody
*
body
,
header_t
*
header
)
{
const
char
*
encoding
=
header
->
value
.
u
.
pszVal
;
const
char
*
encoding
=
header
->
value
.
pszVal
;
if
(
!
stricmp
(
encoding
,
"base64"
))
body
->
encoding
=
IET_BASE64
;
...
...
@@ -1099,7 +1099,7 @@ static HRESULT WINAPI MimeBody_GetProp(
{
PropVariantClear
(
pValue
);
pValue
->
vt
=
VT_LPSTR
;
pValue
->
u
.
pszVal
=
strdupA
(
This
->
content_pri_type
);
pValue
->
pszVal
=
strdupA
(
This
->
content_pri_type
);
return
S_OK
;
}
...
...
@@ -1416,11 +1416,11 @@ static HRESULT WINAPI MimeBody_SetOption(
switch
(
oid
)
{
case
OID_SECURITY_HWND_OWNER
:
FIXME
(
"OID_SECURITY_HWND_OWNER (value %08x): ignoring
\n
"
,
pValue
->
u
.
u
lVal
);
FIXME
(
"OID_SECURITY_HWND_OWNER (value %08x): ignoring
\n
"
,
pValue
->
ulVal
);
hr
=
S_OK
;
break
;
case
OID_TRANSMIT_BODY_ENCODING
:
FIXME
(
"OID_TRANSMIT_BODY_ENCODING (value %08x): ignoring
\n
"
,
pValue
->
u
.
u
lVal
);
FIXME
(
"OID_TRANSMIT_BODY_ENCODING (value %08x): ignoring
\n
"
,
pValue
->
ulVal
);
hr
=
S_OK
;
break
;
default:
...
...
@@ -2745,16 +2745,16 @@ static HRESULT WINAPI MimeMessage_SetOption(
switch
(
oid
)
{
case
OID_HIDE_TNEF_ATTACHMENTS
:
FIXME
(
"OID_HIDE_TNEF_ATTACHMENTS (value %d): ignoring
\n
"
,
pValue
->
u
.
boolVal
);
FIXME
(
"OID_HIDE_TNEF_ATTACHMENTS (value %d): ignoring
\n
"
,
pValue
->
boolVal
);
break
;
case
OID_SHOW_MACBINARY
:
FIXME
(
"OID_SHOW_MACBINARY (value %d): ignoring
\n
"
,
pValue
->
u
.
boolVal
);
FIXME
(
"OID_SHOW_MACBINARY (value %d): ignoring
\n
"
,
pValue
->
boolVal
);
break
;
case
OID_SAVEBODY_KEEPBOUNDARY
:
FIXME
(
"OID_SAVEBODY_KEEPBOUNDARY (value %d): ignoring
\n
"
,
pValue
->
u
.
boolVal
);
FIXME
(
"OID_SAVEBODY_KEEPBOUNDARY (value %d): ignoring
\n
"
,
pValue
->
boolVal
);
break
;
case
OID_CLEANUP_TREE_ON_SAVE
:
FIXME
(
"OID_CLEANUP_TREE_ON_SAVE (value %d): ignoring
\n
"
,
pValue
->
u
.
boolVal
);
FIXME
(
"OID_CLEANUP_TREE_ON_SAVE (value %d): ignoring
\n
"
,
pValue
->
boolVal
);
break
;
default:
FIXME
(
"Unhandled oid %08x
\n
"
,
oid
);
...
...
dlls/inetcomm/pop3transport.c
View file @
36bfd19a
...
...
@@ -331,12 +331,12 @@ static HRESULT POP3Transport_ParseResponse(POP3Transport *This, char *pszRespons
{
switch
(
This
->
command
)
{
case
POP3_UIDL
:
hr
=
parse_uidl_response
(
This
,
&
pResponse
->
u
.
rUidlInfo
);
break
;
case
POP3_STAT
:
hr
=
parse_stat_response
(
This
,
&
pResponse
->
u
.
rStatInfo
);
break
;
case
POP3_LIST
:
hr
=
parse_list_response
(
This
,
&
pResponse
->
u
.
rListInfo
);
break
;
case
POP3_DELE
:
hr
=
parse_dele_response
(
This
,
&
pResponse
->
u
.
dwPopId
);
break
;
case
POP3_RETR
:
hr
=
parse_retr_response
(
This
,
&
pResponse
->
u
.
rRetrInfo
);
break
;
case
POP3_TOP
:
hr
=
parse_top_response
(
This
,
&
pResponse
->
u
.
rTopInfo
);
break
;
case
POP3_UIDL
:
hr
=
parse_uidl_response
(
This
,
&
pResponse
->
rUidlInfo
);
break
;
case
POP3_STAT
:
hr
=
parse_stat_response
(
This
,
&
pResponse
->
rStatInfo
);
break
;
case
POP3_LIST
:
hr
=
parse_list_response
(
This
,
&
pResponse
->
rListInfo
);
break
;
case
POP3_DELE
:
hr
=
parse_dele_response
(
This
,
&
pResponse
->
dwPopId
);
break
;
case
POP3_RETR
:
hr
=
parse_retr_response
(
This
,
&
pResponse
->
rRetrInfo
);
break
;
case
POP3_TOP
:
hr
=
parse_top_response
(
This
,
&
pResponse
->
rTopInfo
);
break
;
default:
This
->
state
=
STATE_DONE
;
break
;
...
...
dlls/inetcomm/protocol.c
View file @
36bfd19a
...
...
@@ -141,7 +141,7 @@ static HRESULT on_mime_message_available(MimeHtmlProtocol *protocol, IMimeMessag
if
(
FAILED
(
hres
))
return
report_result
(
protocol
,
hres
);
found
=
!
lstrcmpW
(
protocol
->
location
,
value
.
u
.
pwszVal
);
found
=
!
lstrcmpW
(
protocol
->
location
,
value
.
pwszVal
);
PropVariantClear
(
&
value
);
}
while
(
!
found
);
}
else
{
...
...
@@ -159,7 +159,7 @@ static HRESULT on_mime_message_available(MimeHtmlProtocol *protocol, IMimeMessag
value
.
vt
=
VT_LPWSTR
;
hres
=
IMimeBody_GetProp
(
mime_body
,
"content-type"
,
0
,
&
value
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IInternetProtocolSink_ReportProgress
(
protocol
->
sink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
value
.
u
.
pwszVal
);
hres
=
IInternetProtocolSink_ReportProgress
(
protocol
->
sink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
value
.
pwszVal
);
PropVariantClear
(
&
value
);
}
...
...
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