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
5bf29fb8
Commit
5bf29fb8
authored
Mar 04, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Hardcode the base64 table to avoid ugly macros.
parent
336be2f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
33 deletions
+10
-33
http.c
dlls/wininet/http.c
+10
-33
No files found.
dlls/wininet/http.c
View file @
5bf29fb8
...
...
@@ -1555,40 +1555,17 @@ static UINT HTTP_EncodeBase64( LPCSTR bin, unsigned int len, LPWSTR base64 )
return
n
;
}
#define CH(x) (((x) >= 'A' && (x) <= 'Z') ? (x) - 'A' : \
((x) >= 'a' && (x) <= 'z') ? (x) - 'a' + 26 : \
((x) >= '0' && (x) <= '9') ? (x) - '0' + 52 : \
((x) == '+') ? 62 : ((x) == '/') ? 63 : -1)
static
const
signed
char
HTTP_Base64Dec
[
256
]
=
{
CH
(
0
),
CH
(
1
),
CH
(
2
),
CH
(
3
),
CH
(
4
),
CH
(
5
),
CH
(
6
),
CH
(
7
),
CH
(
8
),
CH
(
9
),
CH
(
10
),
CH
(
11
),
CH
(
12
),
CH
(
13
),
CH
(
14
),
CH
(
15
),
CH
(
16
),
CH
(
17
),
CH
(
18
),
CH
(
19
),
CH
(
20
),
CH
(
21
),
CH
(
22
),
CH
(
23
),
CH
(
24
),
CH
(
25
),
CH
(
26
),
CH
(
27
),
CH
(
28
),
CH
(
29
),
CH
(
30
),
CH
(
31
),
CH
(
32
),
CH
(
33
),
CH
(
34
),
CH
(
35
),
CH
(
36
),
CH
(
37
),
CH
(
38
),
CH
(
39
),
CH
(
40
),
CH
(
41
),
CH
(
42
),
CH
(
43
),
CH
(
44
),
CH
(
45
),
CH
(
46
),
CH
(
47
),
CH
(
48
),
CH
(
49
),
CH
(
50
),
CH
(
51
),
CH
(
52
),
CH
(
53
),
CH
(
54
),
CH
(
55
),
CH
(
56
),
CH
(
57
),
CH
(
58
),
CH
(
59
),
CH
(
60
),
CH
(
61
),
CH
(
62
),
CH
(
63
),
CH
(
64
),
CH
(
65
),
CH
(
66
),
CH
(
67
),
CH
(
68
),
CH
(
69
),
CH
(
70
),
CH
(
71
),
CH
(
72
),
CH
(
73
),
CH
(
74
),
CH
(
75
),
CH
(
76
),
CH
(
77
),
CH
(
78
),
CH
(
79
),
CH
(
80
),
CH
(
81
),
CH
(
82
),
CH
(
83
),
CH
(
84
),
CH
(
85
),
CH
(
86
),
CH
(
87
),
CH
(
88
),
CH
(
89
),
CH
(
90
),
CH
(
91
),
CH
(
92
),
CH
(
93
),
CH
(
94
),
CH
(
95
),
CH
(
96
),
CH
(
97
),
CH
(
98
),
CH
(
99
),
CH
(
100
),
CH
(
101
),
CH
(
102
),
CH
(
103
),
CH
(
104
),
CH
(
105
),
CH
(
106
),
CH
(
107
),
CH
(
108
),
CH
(
109
),
CH
(
110
),
CH
(
111
),
CH
(
112
),
CH
(
113
),
CH
(
114
),
CH
(
115
),
CH
(
116
),
CH
(
117
),
CH
(
118
),
CH
(
119
),
CH
(
120
),
CH
(
121
),
CH
(
122
),
CH
(
123
),
CH
(
124
),
CH
(
125
),
CH
(
126
),
CH
(
127
),
CH
(
128
),
CH
(
129
),
CH
(
130
),
CH
(
131
),
CH
(
132
),
CH
(
133
),
CH
(
134
),
CH
(
135
),
CH
(
136
),
CH
(
137
),
CH
(
138
),
CH
(
139
),
CH
(
140
),
CH
(
141
),
CH
(
142
),
CH
(
143
),
CH
(
144
),
CH
(
145
),
CH
(
146
),
CH
(
147
),
CH
(
148
),
CH
(
149
),
CH
(
150
),
CH
(
151
),
CH
(
152
),
CH
(
153
),
CH
(
154
),
CH
(
155
),
CH
(
156
),
CH
(
157
),
CH
(
158
),
CH
(
159
),
CH
(
160
),
CH
(
161
),
CH
(
162
),
CH
(
163
),
CH
(
164
),
CH
(
165
),
CH
(
166
),
CH
(
167
),
CH
(
168
),
CH
(
169
),
CH
(
170
),
CH
(
171
),
CH
(
172
),
CH
(
173
),
CH
(
174
),
CH
(
175
),
CH
(
176
),
CH
(
177
),
CH
(
178
),
CH
(
179
),
CH
(
180
),
CH
(
181
),
CH
(
182
),
CH
(
183
),
CH
(
184
),
CH
(
185
),
CH
(
186
),
CH
(
187
),
CH
(
188
),
CH
(
189
),
CH
(
190
),
CH
(
191
),
CH
(
192
),
CH
(
193
),
CH
(
194
),
CH
(
195
),
CH
(
196
),
CH
(
197
),
CH
(
198
),
CH
(
199
),
CH
(
200
),
CH
(
201
),
CH
(
202
),
CH
(
203
),
CH
(
204
),
CH
(
205
),
CH
(
206
),
CH
(
207
),
CH
(
208
),
CH
(
209
),
CH
(
210
),
CH
(
211
),
CH
(
212
),
CH
(
213
),
CH
(
214
),
CH
(
215
),
CH
(
216
),
CH
(
217
),
CH
(
218
),
CH
(
219
),
CH
(
220
),
CH
(
221
),
CH
(
222
),
CH
(
223
),
CH
(
224
),
CH
(
225
),
CH
(
226
),
CH
(
227
),
CH
(
228
),
CH
(
229
),
CH
(
230
),
CH
(
231
),
CH
(
232
),
CH
(
233
),
CH
(
234
),
CH
(
235
),
CH
(
236
),
CH
(
237
),
CH
(
238
),
CH
(
239
),
CH
(
240
),
CH
(
241
),
CH
(
242
),
CH
(
243
),
CH
(
244
),
CH
(
245
),
CH
(
246
),
CH
(
247
),
CH
(
248
),
CH
(
249
),
CH
(
250
),
CH
(
251
),
CH
(
252
),
CH
(
253
),
CH
(
254
),
CH
(
255
),
static
const
signed
char
HTTP_Base64Dec
[]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
/* 0x00 */
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
/* 0x10 */
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
62
,
-
1
,
-
1
,
-
1
,
63
,
/* 0x20 */
52
,
53
,
54
,
55
,
56
,
57
,
58
,
59
,
60
,
61
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
/* 0x30 */
-
1
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
/* 0x40 */
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
/* 0x50 */
-
1
,
26
,
27
,
28
,
29
,
30
,
31
,
32
,
33
,
34
,
35
,
36
,
37
,
38
,
39
,
40
,
/* 0x60 */
41
,
42
,
43
,
44
,
45
,
46
,
47
,
48
,
49
,
50
,
51
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
/* 0x70 */
};
#undef CH
/***********************************************************************
* HTTP_DecodeBase64
...
...
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