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
b9b812da
Commit
b9b812da
authored
Oct 21, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added image/tiff mime filter.
parent
6e63a9e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
misc.c
dlls/urlmon/tests/misc.c
+12
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+7
-0
No files found.
dlls/urlmon/tests/misc.c
View file @
b9b812da
...
...
@@ -335,6 +335,7 @@ static const WCHAR mimeImagePjpeg[] = {'i','m','a','g','e','/','p','j','p','e','
static
const
WCHAR
mimeImageGif
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'g'
,
'i'
,
'f'
,
0
};
static
const
WCHAR
mimeImageBmp
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'b'
,
'm'
,
'p'
,
0
};
static
const
WCHAR
mimeImageXPng
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'x'
,
'-'
,
'p'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
mimeImageTiff
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
't'
,
'i'
,
'f'
,
'f'
,
0
};
static
const
struct
{
LPCWSTR
url
;
...
...
@@ -387,6 +388,11 @@ static BYTE data35[] = {0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a,'x','x','x','x',0};
static
BYTE
data36
[]
=
{
0x89
,
'P'
,
'N'
,
'G'
,
0x0d
,
0x0a
,
0x1a
,
'x'
,
'x'
};
static
BYTE
data37
[]
=
{
0x89
,
'P'
,
'N'
,
'G'
,
0x0d
,
0x0a
,
0x1a
,
0x0a
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
};
static
BYTE
data38
[]
=
{
0x00
,
0x89
,
'P'
,
'N'
,
'G'
,
0x0d
,
0x0a
,
0x1a
,
0x0a
,
'x'
};
static
BYTE
data39
[]
=
{
0x4d
,
0x4d
,
0x00
,
0x2a
};
static
BYTE
data40
[]
=
{
0x4d
,
0x4d
,
0x00
,
0x2a
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
0
};
static
BYTE
data41
[]
=
{
0x4d
,
0x4d
,
0xff
};
static
BYTE
data42
[]
=
{
0x4d
,
0x4d
};
static
BYTE
data43
[]
=
{
0x00
,
0x4d
,
0x4d
,
0x00
};
static
const
struct
{
BYTE
*
data
;
...
...
@@ -430,7 +436,12 @@ static const struct {
{
data35
,
sizeof
(
data35
),
mimeImageXPng
},
{
data36
,
sizeof
(
data36
),
mimeAppOctetStream
},
{
data37
,
sizeof
(
data37
),
mimeTextHtml
},
{
data38
,
sizeof
(
data38
),
mimeAppOctetStream
}
{
data38
,
sizeof
(
data38
),
mimeAppOctetStream
},
{
data39
,
sizeof
(
data39
),
mimeImageTiff
},
{
data40
,
sizeof
(
data40
),
mimeTextHtml
},
{
data41
,
sizeof
(
data41
),
mimeImageTiff
},
{
data42
,
sizeof
(
data42
),
mimeTextPlain
},
{
data43
,
sizeof
(
data43
),
mimeAppOctetStream
}
};
static
void
test_FindMimeFromData
(
void
)
...
...
dlls/urlmon/urlmon_main.c
View file @
b9b812da
...
...
@@ -440,6 +440,11 @@ static BOOL image_pjpeg_filter(LPVOID buf, DWORD size)
return
size
>
2
&&
*
(
BYTE
*
)
buf
==
0xff
&&
*
((
BYTE
*
)
buf
+
1
)
==
0xd8
;
}
static
BOOL
image_tiff_filter
(
LPVOID
buf
,
DWORD
size
)
{
return
size
>
2
&&
*
(
WORD
*
)
buf
==
0x4d4d
;
}
static
BOOL
image_xpng_filter
(
LPVOID
buf
,
DWORD
size
)
{
static
const
BYTE
xpng_header
[]
=
{
0x89
,
'P'
,
'N'
,
'G'
,
0x0d
,
0x0a
,
0x1a
,
0x0a
};
...
...
@@ -508,6 +513,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
static
const
WCHAR
wszTextHtml
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
wszImageGif
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'g'
,
'i'
,
'f'
,
0
};
static
const
WCHAR
wszImagePjpeg
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'p'
,
'j'
,
'p'
,
'e'
,
'g'
,
0
};
static
const
WCHAR
wszImageTiff
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
't'
,
'i'
,
'f'
,
'f'
,
0
};
static
const
WCHAR
wszImageXPng
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'x'
,
'-'
,
'p'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
wszImageBmp
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'b'
,
'm'
,
'p'
,
0
};
static
const
WCHAR
wszTextPlain
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'p'
,
'l'
,
'a'
,
'i'
,
'n'
,
'\0'
};
...
...
@@ -521,6 +527,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
{
wszTextHtml
,
text_html_filter
},
{
wszImageGif
,
image_gif_filter
},
{
wszImagePjpeg
,
image_pjpeg_filter
},
{
wszImageTiff
,
image_tiff_filter
},
{
wszImageXPng
,
image_xpng_filter
},
{
wszImageBmp
,
image_bmp_filter
},
{
wszTextPlain
,
text_plain_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