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
353ce51b
Commit
353ce51b
authored
Sep 12, 2002
by
Jon Griffiths
Committed by
Alexandre Julliard
Sep 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make hex digits static const & share them.
parent
f5b34b5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
url.c
dlls/shlwapi/url.c
+10
-10
No files found.
dlls/shlwapi/url.c
View file @
353ce51b
...
@@ -56,6 +56,8 @@ typedef enum {
...
@@ -56,6 +56,8 @@ typedef enum {
USERPASS
,
USERPASS
,
}
WINE_URL_SCAN_TYPE
;
}
WINE_URL_SCAN_TYPE
;
static
const
CHAR
hexDigits
[]
=
"0123456789ABCDEF"
;
static
const
WCHAR
fileW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
'\0'
};
static
const
WCHAR
fileW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
'\0'
};
static
const
unsigned
char
HashDataLookup
[
256
]
=
{
static
const
unsigned
char
HashDataLookup
[
256
]
=
{
...
@@ -730,7 +732,6 @@ HRESULT WINAPI UrlEscapeA(
...
@@ -730,7 +732,6 @@ HRESULT WINAPI UrlEscapeA(
DWORD
needed
=
0
,
ret
;
DWORD
needed
=
0
,
ret
;
BOOL
stop_escaping
=
FALSE
;
BOOL
stop_escaping
=
FALSE
;
char
next
[
3
],
*
dst
=
pszEscaped
;
char
next
[
3
],
*
dst
=
pszEscaped
;
char
hex
[]
=
"0123456789ABCDEF"
;
INT
len
;
INT
len
;
TRACE
(
"(%s %p %p 0x%08lx)
\n
"
,
debugstr_a
(
pszUrl
),
pszEscaped
,
TRACE
(
"(%s %p %p 0x%08lx)
\n
"
,
debugstr_a
(
pszUrl
),
pszEscaped
,
...
@@ -762,8 +763,8 @@ HRESULT WINAPI UrlEscapeA(
...
@@ -762,8 +763,8 @@ HRESULT WINAPI UrlEscapeA(
if
(
URL_NeedEscapeA
(
*
src
,
dwFlags
)
&&
stop_escaping
==
FALSE
)
{
if
(
URL_NeedEscapeA
(
*
src
,
dwFlags
)
&&
stop_escaping
==
FALSE
)
{
/* TRACE("escaping %c\n", *src); */
/* TRACE("escaping %c\n", *src); */
next
[
0
]
=
'%'
;
next
[
0
]
=
'%'
;
next
[
1
]
=
hex
[(
*
src
>>
4
)
&
0xf
];
next
[
1
]
=
hex
Digits
[(
*
src
>>
4
)
&
0xf
];
next
[
2
]
=
hex
[
*
src
&
0xf
];
next
[
2
]
=
hex
Digits
[
*
src
&
0xf
];
len
=
3
;
len
=
3
;
}
else
{
}
else
{
/* TRACE("passing %c\n", *src); */
/* TRACE("passing %c\n", *src); */
...
@@ -804,7 +805,6 @@ HRESULT WINAPI UrlEscapeW(
...
@@ -804,7 +805,6 @@ HRESULT WINAPI UrlEscapeW(
DWORD
needed
=
0
,
ret
;
DWORD
needed
=
0
,
ret
;
BOOL
stop_escaping
=
FALSE
;
BOOL
stop_escaping
=
FALSE
;
WCHAR
next
[
5
],
*
dst
=
pszEscaped
;
WCHAR
next
[
5
],
*
dst
=
pszEscaped
;
CHAR
hex
[]
=
"0123456789ABCDEF"
;
INT
len
;
INT
len
;
TRACE
(
"(%s %p %p 0x%08lx)
\n
"
,
debugstr_w
(
pszUrl
),
pszEscaped
,
TRACE
(
"(%s %p %p 0x%08lx)
\n
"
,
debugstr_w
(
pszUrl
),
pszEscaped
,
...
@@ -846,14 +846,14 @@ HRESULT WINAPI UrlEscapeW(
...
@@ -846,14 +846,14 @@ HRESULT WINAPI UrlEscapeW(
* the character with 4 hex digits (or even 8),
* the character with 4 hex digits (or even 8),
* however, experiments show that native shlwapi escapes
* however, experiments show that native shlwapi escapes
* with only 2 hex digits.
* with only 2 hex digits.
* next[1] = hex[(*src >> 12) & 0xf];
* next[1] = hex
Digits
[(*src >> 12) & 0xf];
* next[2] = hex[(*src >> 8) & 0xf];
* next[2] = hex
Digits
[(*src >> 8) & 0xf];
* next[3] = hex[(*src >> 4) & 0xf];
* next[3] = hex
Digits
[(*src >> 4) & 0xf];
* next[4] = hex[*src & 0xf];
* next[4] = hex
Digits
[*src & 0xf];
* len = 5;
* len = 5;
*/
*/
next
[
1
]
=
hex
[(
*
src
>>
4
)
&
0xf
];
next
[
1
]
=
hex
Digits
[(
*
src
>>
4
)
&
0xf
];
next
[
2
]
=
hex
[
*
src
&
0xf
];
next
[
2
]
=
hex
Digits
[
*
src
&
0xf
];
len
=
3
;
len
=
3
;
}
else
{
}
else
{
/* TRACE("passing %c\n", *src); */
/* TRACE("passing %c\n", *src); */
...
...
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