2 ===================================================================
3 --- ftp.c (revision 30893)
4 +++ ftp.c (working copy)
7 #include "wine/debug.h"
9 +typedef size_t socklen_t;
11 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
14 ===================================================================
15 --- http.c (revision 30893)
16 +++ http.c (working copy)
18 #include "wine/debug.h"
19 #include "wine/unicode.h"
21 +#include "inet_ntop.c"
23 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
25 static const WCHAR g_szHttp1_0[] = {' ','H','T','T','P','/','1','.','0',0 };
26 @@ -3010,7 +3011,11 @@
28 * HACK peek at the buffer
31 + /* This is Wine code, we don't support MSG_PEEK yet so we have to do it
33 NETCON_recv(&lpwhr->netConnection, buffer, buflen, MSG_PEEK, &rc);
37 * We should first receive 'HTTP/1.x nnn OK' where nnn is the status code.
39 memset(buffer, 0, MAX_REPLY_LEN);
40 if (!NETCON_getNextLine(&lpwhr->netConnection, bufferA, &buflen))
45 MultiByteToWideChar( CP_ACP, 0, bufferA, buflen, buffer, MAX_REPLY_LEN );
47 /* regenerate raw headers */
49 ===================================================================
50 --- inet_ntop.c (revision 30893)
51 +++ inet_ntop.c (working copy)
53 +/* from NetBSD: inet_ntop.c,v 1.9 2000/01/22 22:19:16 mycroft Exp */
55 +/* Copyright (c) 1996 by Internet Software Consortium.
57 + * Permission to use, copy, modify, and distribute this software for any
58 + * purpose with or without fee is hereby granted, provided that the above
59 + * copyright notice and this permission notice appear in all copies.
61 + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
62 + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
63 + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
64 + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
65 + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
66 + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
67 + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
72 +#define EAFNOSUPPORT 52
83 +# define SPRINTF(x) strlen(sprintf/**/x)
85 +# define SPRINTF(x) ((size_t)sprintf x)
89 + * WARNING: Don't even consider trying to compile this on a system where
90 + * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
93 +static const char *inet_ntop4(const u_char *src, char *dst, size_t size);
94 +static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
97 + * inet_ntop(af, src, dst, size)
98 + * convert a network format address to presentation format.
100 + * pointer to presentation format address (`dst'), or NULL (see errno).
102 + * Paul Vixie, 1996.
105 +inet_ntop(int af, const void *src, char *dst, size_t size)
110 + return (inet_ntop4(src, dst, size));
113 + return (inet_ntop6(src, dst, size));
116 + errno = EAFNOSUPPORT;
123 + * inet_ntop4(src, dst, size)
124 + * format an IPv4 address, more or less like inet_ntoa()
126 + * `dst' (as a const)
128 + * (1) uses no statics
129 + * (2) takes a u_char* not an in_addr as input
131 + * Paul Vixie, 1996.
134 +inet_ntop4(const u_char *src, char *dst, size_t size)
136 + static const char fmt[] = "%u.%u.%u.%u";
137 + char tmp[sizeof "255.255.255.255"];
139 + if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
149 + * inet_ntop6(src, dst, size)
150 + * convert IPv6 binary address into presentation (printable) format
152 + * Paul Vixie, 1996.
155 +inet_ntop6(const u_char *src, char *dst, size_t size)
158 + * Note that int32_t and int16_t need only be "at least" large enough
159 + * to contain a value of the specified size. On some systems, like
160 + * Crays, there is no such thing as an integer variable with 16 bits.
161 + * Keep this in mind if you think this function should have been coded
162 + * to use pointer overlays. All the world's not a VAX.
164 + char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
165 + struct { int base, len; } best, cur;
166 + u_int words[IN6ADDRSZ / INT16SZ];
171 + * Copy the input (bytewise) array into a wordwise array.
172 + * Find the longest run of 0x00's in src[] for :: shorthanding.
174 + memset(words, '\0', sizeof words);
175 + for (i = 0; i < IN6ADDRSZ; i++)
176 + words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
179 + for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
180 + if (words[i] == 0) {
181 + if (cur.base == -1)
182 + cur.base = i, cur.len = 1;
186 + if (cur.base != -1) {
187 + if (best.base == -1 || cur.len > best.len)
193 + if (cur.base != -1) {
194 + if (best.base == -1 || cur.len > best.len)
197 + if (best.base != -1 && best.len < 2)
201 + * Format the result.
204 + for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
205 + /* Are we inside the best run of 0x00's? */
206 + if (best.base != -1 && i >= best.base &&
207 + i < (best.base + best.len)) {
208 + if (i == best.base)
212 + /* Are we following an initial run of 0x00s or any real hex? */
215 + /* Is this address an encapsulated IPv4? */
216 + if (i == 6 && best.base == 0 &&
217 + (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
218 + if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
223 + tp += SPRINTF((tp, "%x", words[i]));
225 + /* Was it a trailing run of 0x00's? */
226 + if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
231 + * Check for overflow, copy, and we're done.
233 + if ((size_t)(tp - tmp) > size) {
243 ===================================================================
244 --- internet.c (revision 30893)
245 +++ internet.c (working copy)
247 #include "resource.h"
249 #include "wine/unicode.h"
250 +#define CP_UNIXCP CP_THREAD_ACP
252 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
254 Index: netconnection.c
255 ===================================================================
256 --- netconnection.c (revision 30893)
257 +++ netconnection.c (working copy)
259 #include "internet.h"
261 #define RESPONSE_TIMEOUT 30 /* FROM internet.c */
262 +#define sock_get_error(x) WSAGetLastError()
266 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
272 /* translate a unix error code into a winsock one */
273 static int sock_get_error( int err )
276 default: errno=err; perror("sock_set_error"); return WSAEFAULT;
281 /******************************************************************************
284 ===================================================================
285 --- rsrc.rc (revision 30893)
286 +++ rsrc.rc (working copy)
288 #include "wininet_Si.rc"
289 #include "wininet_Sv.rc"
290 #include "wininet_Tr.rc"
291 +#include "wininet_Uk.rc"
293 ===================================================================
294 --- utility.c (revision 30893)
295 +++ utility.c (working copy)
298 #include "wine/debug.h"
299 #include "internet.h"
300 +#define CP_UNIXCP CP_THREAD_ACP
302 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
304 Index: wininet.rbuild
305 ===================================================================
306 --- wininet.rbuild (revision 30893)
307 +++ wininet.rbuild (working copy)
309 <library>ntdll</library>
310 <library>secur32</library>
311 <library>crypt32</library>
312 + <library>ws2_32</library>
313 <file>cookie.c</file>
314 <file>dialogs.c</file>
317 ===================================================================
318 --- wininet_Uk.rc (revision 30893)
319 +++ wininet_Uk.rc (working copy)
322 + * wininet.dll (Ukrainian resources)
324 + * Copyright 2006 Artem Reznikov
326 + * This library is free software; you can redistribute it and/or
327 + * modify it under the terms of the GNU Lesser General Public
328 + * License as published by the Free Software Foundation; either
329 + * version 2.1 of the License, or (at your option) any later version.
331 + * This library is distributed in the hope that it will be useful,
332 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
333 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
334 + * Lesser General Public License for more details.
336 + * You should have received a copy of the GNU Lesser General Public
337 + * License along with this library; if not, write to the Free Software
338 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
341 +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
343 +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
344 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
345 +CAPTION "Ââåä³òü Ìåðåæíèé Ïàðîëü"
346 +FONT 8, "MS Shell Dlg"
348 + LTEXT "Áóäü ëàñêà, ââåä³òü Âàø³ ³ì'ÿ òà ïàðîëü:", -1, 40, 6, 150, 15
349 + LTEXT "Ïðîêñ³", -1, 40, 26, 50, 10
350 + LTEXT "Îáëàñòü", -1, 40, 46, 50, 10
351 + LTEXT "Êîðèñòóâà÷", -1, 40, 66, 50, 10
352 + LTEXT "Ïàðîëü", -1, 40, 86, 50, 10
353 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
354 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
355 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
356 + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
357 + CHECKBOX "&Çáåðåãòè öåé ïàðîëü (íåáåçïå÷íî)", IDC_SAVEPASSWORD,
358 + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
359 + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
360 + PUSHBUTTON "Ñêàñóâàòè", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
363 +STRINGTABLE DISCARDABLE
365 + IDS_LANCONNECTION "ϳäêëþ÷åííÿ ïî ëîêàëüí³é ìåðåæ³"