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
f9545ad9
Commit
f9545ad9
authored
Oct 23, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added application/postscript MIME filter.
parent
58e8b19d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
misc.c
dlls/urlmon/tests/misc.c
+9
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+8
-0
No files found.
dlls/urlmon/tests/misc.c
View file @
f9545ad9
...
...
@@ -362,6 +362,8 @@ static const WCHAR mimeImageXPng[] = {'i','m','a','g','e','/','x','-','p','n','g
static
const
WCHAR
mimeImageTiff
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
't'
,
'i'
,
'f'
,
'f'
,
0
};
static
const
WCHAR
mimeVideoAvi
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'a'
,
'v'
,
'i'
,
0
};
static
const
WCHAR
mimeVideoMpeg
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'm'
,
'p'
,
'e'
,
'g'
,
0
};
static
const
WCHAR
mimeAppPostscript
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'p'
,
'o'
,
's'
,
't'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
0
};
static
const
WCHAR
mimeAppXCompressed
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
mimeAppXZip
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
...
...
@@ -466,6 +468,9 @@ static BYTE data75[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'W','A','V','E',0xff
static
BYTE
data76
[]
=
{
'R'
,
'I'
,
'F'
,
'F'
,
0xff
,
0xff
,
0xff
,
0xff
,
'W'
,
'A'
,
'V'
,
'E'
};
static
BYTE
data77
[]
=
{
'R'
,
'I'
,
'F'
,
'F'
,
0xff
,
0xff
,
0xff
,
0xff
,
'W'
,
'A'
,
'V'
,
0xff
,
0xff
};
static
BYTE
data78
[]
=
{
'R'
,
'I'
,
'F'
,
'F'
,
0xff
,
0xff
,
0xff
,
0xff
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
0xff
};
static
BYTE
data79
[]
=
{
'%'
,
'!'
,
0xff
};
static
BYTE
data80
[]
=
{
'%'
,
'!'
};
static
BYTE
data81
[]
=
{
'%'
,
'!'
,
'P'
,
'S'
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
};
static
const
struct
{
BYTE
*
data
;
...
...
@@ -549,7 +554,10 @@ static const struct {
{
data75
,
sizeof
(
data75
),
mimeAudioWav
},
{
data76
,
sizeof
(
data76
),
mimeTextPlain
},
{
data77
,
sizeof
(
data77
),
mimeTextPlain
},
{
data78
,
sizeof
(
data78
),
mimeTextHtml
}
{
data78
,
sizeof
(
data78
),
mimeTextHtml
},
{
data79
,
sizeof
(
data79
),
mimeAppPostscript
},
{
data80
,
sizeof
(
data80
),
mimeTextPlain
},
{
data81
,
sizeof
(
data81
),
mimeTextHtml
}
};
static
void
test_FindMimeFromData
(
void
)
...
...
dlls/urlmon/urlmon_main.c
View file @
f9545ad9
...
...
@@ -487,6 +487,11 @@ static BOOL video_mpeg_filter(const BYTE *b, DWORD size)
&&
(
b
[
3
]
==
0xb3
||
b
[
3
]
==
0xba
);
}
static
BOOL
application_postscript_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
2
&&
b
[
0
]
==
'%'
&&
b
[
1
]
==
'!'
;
}
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
;
...
...
@@ -579,6 +584,8 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
static
const
WCHAR
wszImageBmp
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'b'
,
'm'
,
'p'
,
0
};
static
const
WCHAR
wszVideoAvi
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'a'
,
'v'
,
'i'
,
0
};
static
const
WCHAR
wszVideoMpeg
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'm'
,
'p'
,
'e'
,
'g'
,
0
};
static
const
WCHAR
wszAppPostscript
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'p'
,
'o'
,
's'
,
't'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
0
};
static
const
WCHAR
wszAppPdf
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'p'
,
'd'
,
'f'
,
0
};
static
const
WCHAR
wszAppXZip
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
...
...
@@ -607,6 +614,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
{
wszImageBmp
,
image_bmp_filter
},
{
wszVideoAvi
,
video_avi_filter
},
{
wszVideoMpeg
,
video_mpeg_filter
},
{
wszAppPostscript
,
application_postscript_filter
},
{
wszAppPdf
,
application_pdf_filter
},
{
wszAppXZip
,
application_xzip_filter
},
{
wszAppXGzip
,
application_xgzip_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