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
ea6ee42c
Commit
ea6ee42c
authored
Feb 06, 2007
by
Jan Zerebecki
Committed by
Alexandre Julliard
Feb 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Remove redundant const.
parent
ecd20e28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
urlmon_main.c
dlls/urlmon/urlmon_main.c
+17
-17
No files found.
dlls/urlmon/urlmon_main.c
View file @
ea6ee42c
...
...
@@ -400,7 +400,7 @@ void WINAPI ReleaseBindInfo(BINDINFO* pbindinfo)
*
* Determines the Multipurpose Internet Mail Extensions (MIME) type from the data provided.
*/
static
BOOL
text_html_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
text_html_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
int
i
;
...
...
@@ -419,7 +419,7 @@ static BOOL text_html_filter(const BYTE const *b, DWORD size)
return
FALSE
;
}
static
BOOL
image_gif_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
image_gif_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>=
6
&&
(
b
[
0
]
==
'G'
||
b
[
0
]
==
'g'
)
...
...
@@ -430,69 +430,69 @@ static BOOL image_gif_filter(const BYTE const *b, DWORD size)
&&
(
b
[
5
]
==
'A'
||
b
[
5
]
==
'a'
);
}
static
BOOL
image_pjpeg_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
image_pjpeg_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
2
&&
b
[
0
]
==
0xff
&&
b
[
1
]
==
0xd8
;
}
static
BOOL
image_tiff_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
image_tiff_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
2
&&
b
[
0
]
==
0x4d
&&
b
[
1
]
==
0x4d
;
}
static
BOOL
image_xpng_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
image_xpng_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
static
const
BYTE
xpng_header
[]
=
{
0x89
,
'P'
,
'N'
,
'G'
,
0x0d
,
0x0a
,
0x1a
,
0x0a
};
return
size
>
sizeof
(
xpng_header
)
&&
!
memcmp
(
b
,
xpng_header
,
sizeof
(
xpng_header
));
}
static
BOOL
image_bmp_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
image_bmp_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>=
14
&&
b
[
0
]
==
0x42
&&
b
[
1
]
==
0x4d
&&
*
(
const
DWORD
*
)(
b
+
6
)
==
0
;
}
static
BOOL
video_avi_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
video_avi_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
12
&&
b
[
0
]
==
'R'
&&
b
[
1
]
==
'I'
&&
b
[
2
]
==
'F'
&&
b
[
3
]
==
'F'
&&
b
[
8
]
==
'A'
&&
b
[
9
]
==
'V'
&&
b
[
10
]
==
'I'
&&
b
[
11
]
==
0x20
;
}
static
BOOL
video_mpeg_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
video_mpeg_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
4
&&
!
b
[
0
]
&&
!
b
[
1
]
&&
b
[
2
]
==
0x01
&&
(
b
[
3
]
==
0xb3
||
b
[
3
]
==
0xba
);
}
static
BOOL
application_pdf_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
application_pdf_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
4
&&
b
[
0
]
==
0x25
&&
b
[
1
]
==
0x50
&&
b
[
2
]
==
0x44
&&
b
[
3
]
==
0x46
;
}
static
BOOL
application_xzip_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
application_xzip_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
2
&&
b
[
0
]
==
0x50
&&
b
[
1
]
==
0x4b
;
}
static
BOOL
application_xgzip_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
application_xgzip_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
2
&&
b
[
0
]
==
0x1f
&&
b
[
1
]
==
0x8b
;
}
static
BOOL
application_java_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
application_java_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
4
&&
b
[
0
]
==
0xca
&&
b
[
1
]
==
0xfe
&&
b
[
2
]
==
0xba
&&
b
[
3
]
==
0xbe
;
}
static
BOOL
application_xmsdownload
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
application_xmsdownload
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
2
&&
b
[
0
]
==
'M'
&&
b
[
1
]
==
'Z'
;
}
static
BOOL
text_plain_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
text_plain_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
const
BYTE
*
ptr
;
...
...
@@ -504,7 +504,7 @@ static BOOL text_plain_filter(const BYTE const *b, DWORD size)
return
TRUE
;
}
static
BOOL
application_octet_stream_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
application_octet_stream_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
TRUE
;
}
...
...
@@ -539,7 +539,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
}
if
(
pBuffer
)
{
const
BYTE
const
*
buf
=
pBuffer
;
const
BYTE
*
buf
=
pBuffer
;
DWORD
len
;
LPCWSTR
ret
=
NULL
;
int
i
;
...
...
@@ -568,7 +568,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
static
const
struct
{
LPCWSTR
mime
;
BOOL
(
*
filter
)(
const
BYTE
const
*
,
DWORD
);
BOOL
(
*
filter
)(
const
BYTE
*
,
DWORD
);
}
mime_filters
[]
=
{
{
wszTextHtml
,
text_html_filter
},
{
wszImageGif
,
image_gif_filter
},
...
...
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