17#ifdef LIBXML_HTTP_ENABLED
25#ifdef HAVE_SYS_TYPES_H
28#ifdef HAVE_SYS_SOCKET_H
31#ifdef HAVE_NETINET_IN_H
32#include <netinet/in.h>
34#ifdef HAVE_ARPA_INET_H
41#ifdef HAVE_ARPA_NAMESER_H
42#include <arpa/nameser.h>
53#ifdef HAVE_SYS_SELECT_H
54#include <sys/select.h>
59#ifdef LIBXML_ZLIB_ENABLED
66#define XML_SOCKLEN_T unsigned int
85#if !defined(__BEOS__) || defined(__HAIKU__)
86#define closesocket(s) close(s)
89#define INVALID_SOCKET (-1)
94#define PF_INET AF_INET
99#define XML_SOCKLEN_T unsigned int
104#define xmlStrncasecmp(a, b, n) strncasecmp((char *)a, (char *)b, n)
105#define xmlStrcasecmpi(a, b) strcasecmp((char *)a, (char *)b)
108#define XML_NANO_HTTP_MAX_REDIR 10
110#define XML_NANO_HTTP_CHUNK 4096
112#define XML_NANO_HTTP_CLOSED 0
113#define XML_NANO_HTTP_WRITE 1
114#define XML_NANO_HTTP_READ 2
115#define XML_NANO_HTTP_NONE 4
117typedef struct xmlNanoHTTPCtxt {
141#ifdef LIBXML_ZLIB_ENABLED
145} xmlNanoHTTPCtxt, *xmlNanoHTTPCtxtPtr;
150static unsigned int timeout = 60;
152static int xmlNanoHTTPFetchContent(
void *
ctx,
char **
ptr,
int *
len );
161xmlHTTPErrMemory(
const char *
extra)
169static int socket_errno(
void) {
213xmlNanoHTTPInit(
void) {
230 if (
env && ((
env[0] ==
'*') && (
env[1] == 0)))
234 xmlNanoHTTPScanProxy(
env);
239 xmlNanoHTTPScanProxy(
env);
254xmlNanoHTTPCleanup(
void) {
277xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt,
const char *URL) {
284 if (ctxt->protocol !=
NULL) {
286 ctxt->protocol =
NULL;
288 if (ctxt->hostname !=
NULL) {
290 ctxt->hostname =
NULL;
292 if (ctxt->path !=
NULL) {
296 if (ctxt->query !=
NULL) {
300 if (URL ==
NULL)
return;
313 if ((
uri->server !=
NULL) && (*
uri->server ==
'[')) {
315 if ((
len > 2) && (
uri->server[
len - 1] ==
']')) {
328 ctxt->port =
uri->port;
344xmlNanoHTTPScanProxy(
const char *URL) {
356 "Removing HTTP proxy info\n");
359 "Using HTTP proxy %s\n", URL);
361 if (URL ==
NULL)
return;
374 proxyPort =
uri->port;
388static xmlNanoHTTPCtxtPtr
389xmlNanoHTTPNewCtxt(
const char *URL) {
390 xmlNanoHTTPCtxtPtr
ret;
392 ret = (xmlNanoHTTPCtxtPtr)
xmlMalloc(
sizeof(xmlNanoHTTPCtxt));
394 xmlHTTPErrMemory(
"allocating context");
400 ret->returnValue = 0;
402 ret->ContentLength = -1;
404 xmlNanoHTTPScanURL(
ret, URL);
417xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) {
418 if (ctxt ==
NULL)
return;
419 if (ctxt->hostname !=
NULL)
xmlFree(ctxt->hostname);
420 if (ctxt->protocol !=
NULL)
xmlFree(ctxt->protocol);
425 if (ctxt->contentType !=
NULL)
xmlFree(ctxt->contentType);
426 if (ctxt->encoding !=
NULL)
xmlFree(ctxt->encoding);
427 if (ctxt->mimeType !=
NULL)
xmlFree(ctxt->mimeType);
428 if (ctxt->location !=
NULL)
xmlFree(ctxt->location);
429 if (ctxt->authHeader !=
NULL)
xmlFree(ctxt->authHeader);
430#ifdef LIBXML_ZLIB_ENABLED
431 if (ctxt->strm !=
NULL) {
437 ctxt->state = XML_NANO_HTTP_NONE;
452xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt,
const char *xmt_ptr,
int outlen)
462 if ((ctxt->state & XML_NANO_HTTP_WRITE) && (xmt_ptr !=
NULL)) {
463 while (total_sent < outlen) {
465 outlen - total_sent, 0);
469 else if ((nsent == -1) &&
471 (socket_errno() !=
EAGAIN) &&
496#pragma warning(disable: 4018)
526xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt)
536 while (ctxt->state & XML_NANO_HTTP_READ) {
537 if (ctxt->in ==
NULL) {
539 if (ctxt->in ==
NULL) {
540 xmlHTTPErrMemory(
"allocating input");
545 ctxt->inptr = ctxt->content = ctxt->inrptr = ctxt->in;
547 if (ctxt->inrptr > ctxt->in + XML_NANO_HTTP_CHUNK) {
548 int delta = ctxt->inrptr - ctxt->in;
549 int len = ctxt->inptr - ctxt->inrptr;
552 ctxt->inrptr -= delta;
553 ctxt->content -= delta;
554 ctxt->inptr -= delta;
556 if ((ctxt->in + ctxt->inlen) < (ctxt->inptr + XML_NANO_HTTP_CHUNK)) {
557 int d_inptr = ctxt->inptr - ctxt->in;
558 int d_content = ctxt->content - ctxt->in;
559 int d_inrptr = ctxt->inrptr - ctxt->in;
560 char *tmp_ptr = ctxt->in;
563 ctxt->in = (
char *)
xmlRealloc(tmp_ptr, ctxt->inlen);
564 if (ctxt->in ==
NULL) {
565 xmlHTTPErrMemory(
"allocating input buffer");
570 ctxt->inptr = ctxt->in + d_inptr;
571 ctxt->content = ctxt->in + d_content;
572 ctxt->inrptr = ctxt->in + d_inrptr;
574 ctxt->last =
recv(ctxt->fd, ctxt->inptr, XML_NANO_HTTP_CHUNK, 0);
575 if (ctxt->last > 0) {
576 ctxt->inptr += ctxt->last;
579 if (ctxt->last == 0) {
582 if (ctxt->last == -1) {
583 switch (socket_errno()) {
586#if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
621#pragma warning(disable: 4018)
632 && (socket_errno() !=
EINTR)
653xmlNanoHTTPReadLine(xmlNanoHTTPCtxtPtr ctxt) {
658 while (bp -
buf < 4095) {
659 if (ctxt->inrptr == ctxt->inptr) {
660 if ( (rc = xmlNanoHTTPRecv(ctxt)) == 0) {
667 else if ( rc == -1 ) {
671 *bp = *ctxt->inrptr++;
699xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt,
const char *
line) {
709 while ((*
cur >=
'0') && (*
cur <=
'9')) {
716 if ((*
cur >=
'0') && (*
cur <=
'9')) {
721 while ((*
cur >=
'0') && (*
cur <=
'9'))
725 if ((*
cur !=
' ') && (*
cur !=
'\t'))
return;
726 while ((*
cur ==
' ') || (*
cur ==
'\t'))
cur++;
727 if ((*
cur <
'0') || (*
cur >
'9'))
return;
728 while ((*
cur >=
'0') && (*
cur <=
'9')) {
733 if ((*
cur != 0) && (*
cur !=
' ') && (*
cur !=
'\t'))
return;
734 ctxt->returnValue =
ret;
739 while ((*
cur ==
' ') || (*
cur ==
'\t'))
cur++;
740 if (ctxt->contentType !=
NULL)
745 while ((*
last != 0) && (*
last !=
' ') && (*
last !=
'\t') &&
748 if (ctxt->mimeType !=
NULL)
755 while ((*
last != 0) && (*
last !=
' ') && (*
last !=
'\t') &&
758 if (ctxt->encoding !=
NULL)
765 if (ctxt->contentType !=
NULL)
return;
766 while ((*
cur ==
' ') || (*
cur ==
'\t'))
cur++;
770 while ((*
last != 0) && (*
last !=
' ') && (*
last !=
'\t') &&
773 if (ctxt->mimeType !=
NULL)
780 while ((*
last != 0) && (*
last !=
' ') && (*
last !=
'\t') &&
783 if (ctxt->encoding !=
NULL)
789 while ((*
cur ==
' ') || (*
cur ==
'\t'))
cur++;
790 if (ctxt->location !=
NULL)
803 while ((*
cur ==
' ') || (*
cur ==
'\t'))
cur++;
804 if (ctxt->authHeader !=
NULL)
809 while ((*
cur ==
' ') || (*
cur ==
'\t'))
cur++;
810 if (ctxt->authHeader !=
NULL)
813#ifdef LIBXML_ZLIB_ENABLED
816 while ((*
cur ==
' ') || (*
cur ==
'\t'))
cur++;
822 if (ctxt->strm !=
NULL) {
823 ctxt->strm->zalloc =
Z_NULL;
824 ctxt->strm->zfree =
Z_NULL;
825 ctxt->strm->opaque =
Z_NULL;
826 ctxt->strm->avail_in = 0;
827 ctxt->strm->next_in =
Z_NULL;
899#if defined(__BEOS__) && !defined(__HAIKU__)
908 if ((
status = fcntl(
s, F_GETFL, 0)) != -1) {
931 switch (socket_errno()) {
937 "error connecting to HTTP server");
948#pragma warning(disable: 4018)
1012 "Error connecting to remote host");
1039xmlNanoHTTPConnectHost(
const char *
host,
int port)
1050 memset (&sockin, 0,
sizeof(sockin));
1052 memset (&sockin6, 0,
sizeof(sockin6));
1055#if !defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && defined(RES_USE_INET6)
1058 if (!(_res.options & RES_INIT))
1060 _res.options |= RES_USE_INET6;
1064#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
1067#if defined(HAVE_GETADDRINFO) && (defined(SUPPORT_IP6) || defined(_WIN32))
1084 if ((
size_t)
res->ai_addrlen >
sizeof(sockin)) {
1093 }
else if (have_ipv6 () && (
res->ai_family ==
AF_INET6)) {
1094 if ((
size_t)
res->ai_addrlen >
sizeof(sockin6)) {
1106 s = xmlNanoHTTPConnectAttempt (
addr);
1117#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
1120#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32)
1134#if defined(HAVE_NETDB_H) && defined(HOST_NOT_FOUND) && defined(__linux__)
1135 const char *h_err_txt =
"";
1139 h_err_txt =
"Authoritative host not found";
1144 "Non-authoritative host not found or server failure.";
1149 "Non-recoverable errors: FORMERR, REFUSED, or NOTIMP.";
1155 "Valid name, no data record of requested type.";
1160 h_err_txt =
"No error text defined.";
1170 for (
i = 0;
h->h_addr_list[
i];
i++) {
1173 if ((
unsigned int)
h->h_length >
sizeof(ia)) {
1177 memcpy (&ia,
h->h_addr_list[
i],
h->h_length);
1178 sockin.sin_family =
h->h_addrtype;
1179 sockin.sin_addr = ia;
1183 }
else if (have_ipv6 () && (
h->h_addrtype ==
AF_INET6)) {
1185 if ((
unsigned int)
h->h_length >
sizeof(ia6)) {
1189 memcpy (&ia6,
h->h_addr_list[
i],
h->h_length);
1190 sockin6.sin6_family =
h->h_addrtype;
1191 sockin6.sin6_addr = ia6;
1198 s = xmlNanoHTTPConnectAttempt (
addr);
1207 "xmlNanoHTTPConnectHost: unable to connect to '%s'.\n",
1228xmlNanoHTTPOpen(
const char *URL,
char **contentType) {
1229 if (contentType !=
NULL) *contentType =
NULL;
1230 return(xmlNanoHTTPMethod(URL,
NULL,
NULL, contentType,
NULL, 0));
1248xmlNanoHTTPOpenRedir(
const char *URL,
char **contentType,
char **redir) {
1249 if (contentType !=
NULL) *contentType =
NULL;
1251 return(xmlNanoHTTPMethodRedir(URL,
NULL,
NULL, contentType, redir,
NULL,0));
1267xmlNanoHTTPRead(
void *
ctx,
void *
dest,
int len) {
1268 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1269#ifdef LIBXML_ZLIB_ENABLED
1277 if (
len <= 0)
return(0);
1279#ifdef LIBXML_ZLIB_ENABLED
1280 if (ctxt->usesGzip == 1) {
1281 if (ctxt->strm ==
NULL)
return(0);
1283 ctxt->strm->next_out =
dest;
1284 ctxt->strm->avail_out =
len;
1285 ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr;
1287 while (ctxt->strm->avail_out > 0 &&
1288 (ctxt->strm->avail_in > 0 || xmlNanoHTTPRecv(ctxt) > 0)) {
1289 orig_avail_in = ctxt->strm->avail_in =
1290 ctxt->inptr - ctxt->inrptr - bytes_read;
1291 ctxt->strm->next_in =
BAD_CAST (ctxt->inrptr + bytes_read);
1294 bytes_read += orig_avail_in - ctxt->strm->avail_in;
1296 if (z_ret !=
Z_OK)
break;
1299 ctxt->inrptr += bytes_read;
1300 return(
len - ctxt->strm->avail_out);
1304 while (ctxt->inptr - ctxt->inrptr <
len) {
1305 if (xmlNanoHTTPRecv(ctxt) <= 0)
break;
1307 if (ctxt->inptr - ctxt->inrptr <
len)
1308 len = ctxt->inptr - ctxt->inrptr;
1310 ctxt->inrptr +=
len;
1322xmlNanoHTTPClose(
void *
ctx) {
1323 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1327 xmlNanoHTTPFreeCtxt(ctxt);
1349xmlNanoHTTPMethodRedir(
const char *URL,
const char *
method,
const char *
input,
1350 char **contentType,
char **redir,
1351 const char *
headers,
int ilen ) {
1352 xmlNanoHTTPCtxtPtr ctxt;
1356 int nbRedirects = 0;
1357 char *redirURL =
NULL;
1367 if (redirURL ==
NULL) {
1368 ctxt = xmlNanoHTTPNewCtxt(URL);
1372 ctxt = xmlNanoHTTPNewCtxt(redirURL);
1378 if ((ctxt->protocol ==
NULL) || (
strcmp(ctxt->protocol,
"http"))) {
1380 xmlNanoHTTPFreeCtxt(ctxt);
1384 if (ctxt->hostname ==
NULL) {
1386 "Failed to identify host in URI");
1387 xmlNanoHTTPFreeCtxt(ctxt);
1392 blen =
strlen(ctxt->hostname) * 2 + 16;
1393 ret = xmlNanoHTTPConnectHost(
proxy, proxyPort);
1396 blen =
strlen(ctxt->hostname);
1397 ret = xmlNanoHTTPConnectHost(ctxt->hostname, ctxt->port);
1400 xmlNanoHTTPFreeCtxt(ctxt);
1413 if (contentType && *contentType)
1415 blen +=
strlen(*contentType) + 16;
1416 if (ctxt->query !=
NULL)
1418 blen +=
strlen(ctxt->query) + 1;
1420#ifdef LIBXML_ZLIB_ENABLED
1424 if (ctxt->port != 80) {
1433 xmlNanoHTTPFreeCtxt( ctxt );
1434 xmlHTTPErrMemory(
"allocating header buffer");
1441 if (ctxt->port != 80) {
1442 p +=
snprintf(
p, blen - (
p - bp),
"%s http://%s:%d%s",
1444 ctxt->port, ctxt->path );
1448 ctxt->hostname, ctxt->path);
1453 if (ctxt->query !=
NULL)
1454 p +=
snprintf(
p, blen - (
p - bp),
"?%s", ctxt->query);
1456 if (ctxt->port == 80) {
1457 p +=
snprintf(
p, blen - (
p - bp),
" HTTP/1.0\r\nHost: %s\r\n",
1460 p +=
snprintf(
p, blen - (
p - bp),
" HTTP/1.0\r\nHost: %s:%d\r\n",
1461 ctxt->hostname, ctxt->port);
1464#ifdef LIBXML_ZLIB_ENABLED
1465 p +=
snprintf(
p, blen - (
p - bp),
"Accept-Encoding: gzip\r\n");
1468 if (contentType !=
NULL && *contentType)
1469 p +=
snprintf(
p, blen - (
p - bp),
"Content-Type: %s\r\n", *contentType);
1475 snprintf(
p, blen - (
p - bp),
"Content-Length: %d\r\n\r\n", ilen );
1481 "-> %s%s",
proxy?
"(Proxy) " :
"", bp);
1482 if ((blen -=
strlen(bp)+1) < 0)
1484 "ERROR: overflowed buffer by %d bytes\n", -blen);
1486 ctxt->outptr = ctxt->out = bp;
1487 ctxt->state = XML_NANO_HTTP_WRITE;
1488 blen =
strlen( ctxt->out );
1490 xmt_bytes = xmlNanoHTTPSend(ctxt, ctxt->out, blen );
1491 if ( xmt_bytes != blen )
1493 "xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
1495 "bytes of HTTP headers sent to host",
1498 xmlNanoHTTPSend(ctxt, ctxt->out, blen );
1503 xmt_bytes = xmlNanoHTTPSend( ctxt,
input, ilen );
1505 if ( xmt_bytes != ilen )
1507 "xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
1509 "bytes of HTTP content sent to host",
1512 xmlNanoHTTPSend( ctxt,
input, ilen );
1516 ctxt->state = XML_NANO_HTTP_READ;
1518 while ((
p = xmlNanoHTTPReadLine(ctxt)) !=
NULL) {
1520 ctxt->content = ctxt->inrptr;
1524 xmlNanoHTTPScanAnswer(ctxt,
p);
1532 if ((ctxt->location !=
NULL) && (ctxt->returnValue >= 300) &&
1533 (ctxt->returnValue < 400)) {
1536 "\nRedirect to: %s\n", ctxt->location);
1538 while ( xmlNanoHTTPRecv(ctxt) > 0 )
1540 if (nbRedirects < XML_NANO_HTTP_MAX_REDIR) {
1542 if (redirURL !=
NULL)
1545 xmlNanoHTTPFreeCtxt(ctxt);
1548 xmlNanoHTTPFreeCtxt(ctxt);
1552 "xmlNanoHTTPMethodRedir: Too many redirects, aborting ...\n");
1557 if (contentType !=
NULL) {
1558 if (ctxt->contentType !=
NULL)
1561 *contentType =
NULL;
1564 if ((redir !=
NULL) && (redirURL !=
NULL)) {
1567 if (redirURL !=
NULL)
1574 if (ctxt->contentType !=
NULL)
1576 "\nCode %d, content-type '%s'\n\n",
1577 ctxt->returnValue, ctxt->contentType);
1580 "\nCode %d, no content-type\n\n",
1584 return((
void *) ctxt);
1605xmlNanoHTTPMethod(
const char *URL,
const char *
method,
const char *
input,
1606 char **contentType,
const char *
headers,
int ilen) {
1607 return(xmlNanoHTTPMethodRedir(URL,
method,
input, contentType,
1625xmlNanoHTTPFetch(
const char *URL,
const char *
filename,
char **contentType) {
1633 ctxt = xmlNanoHTTPOpen(URL, contentType);
1634 if (ctxt ==
NULL)
return(-1);
1641 xmlNanoHTTPClose(ctxt);
1642 if ((contentType !=
NULL) && (*contentType !=
NULL)) {
1644 *contentType =
NULL;
1650 xmlNanoHTTPFetchContent( ctxt, &
buf, &
len );
1657 xmlNanoHTTPClose(ctxt);
1662#ifdef LIBXML_OUTPUT_ENABLED
1674xmlNanoHTTPSave(
void *ctxt,
const char *
filename) {
1687 xmlNanoHTTPClose(ctxt);
1692 xmlNanoHTTPFetchContent( ctxt, &
buf, &
len );
1699 xmlNanoHTTPClose(ctxt);
1714xmlNanoHTTPReturnCode(
void *
ctx) {
1715 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1717 if (ctxt ==
NULL)
return(-1);
1719 return(ctxt->returnValue);
1732xmlNanoHTTPAuthHeader(
void *
ctx) {
1733 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1737 return(ctxt->authHeader);
1751xmlNanoHTTPContentLength(
void *
ctx ) {
1752 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1754 return ( ( ctxt ==
NULL ) ? -1 : ctxt->ContentLength );
1766xmlNanoHTTPRedir(
void *
ctx ) {
1767 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1769 return ( ( ctxt ==
NULL ) ?
NULL : ctxt->location );
1781xmlNanoHTTPEncoding(
void *
ctx ) {
1782 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1784 return ( ( ctxt ==
NULL ) ?
NULL : ctxt->encoding );
1796xmlNanoHTTPMimeType(
void *
ctx ) {
1797 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1799 return ( ( ctxt ==
NULL ) ?
NULL : ctxt->mimeType );
1815xmlNanoHTTPFetchContent(
void *
ctx,
char **
ptr,
int *
len ) {
1816 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)
ctx;
1822 char * dummy_ptr =
NULL;
1834 if ( ( ctxt ==
NULL ) || ( ctxt->content ==
NULL ) ) {
1840 rcvd_lgth = ctxt->inptr - ctxt->content;
1842 while ( (cur_lgth = xmlNanoHTTPRecv( ctxt )) > 0 ) {
1844 rcvd_lgth += cur_lgth;
1845 if ( (ctxt->ContentLength > 0) && (rcvd_lgth >= ctxt->ContentLength) )
1849 *
ptr = ctxt->content;
1852 if ( ( ctxt->ContentLength > 0 ) && ( rcvd_lgth < ctxt->ContentLength ) )
1854 else if ( rcvd_lgth == 0 )
1862 char *contentType =
NULL;
1866 xmlNanoHTTPFetch(
argv[1],
argv[2], &contentType);
1868 xmlNanoHTTPFetch(
argv[1],
"-", &contentType);
1872 "%s: minimal HTTP GET implementation\n",
argv[0]);
1874 "\tusage %s [ URL [ filename ] ]\n",
argv[0]);
1876 xmlNanoHTTPCleanup();
1886 "%s : HTTP support not compiled in\n",
argv[0]);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
static LPCWSTR LPCWSTR LPCWSTR env
int inflate(z_streamp strm, int flush)
int inflateEnd(z_streamp strm)
static const WCHAR version[]
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
PHOSTENT WSAAPI gethostbyname(IN const char FAR *name)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum const GLvoid * addr
GLenum GLenum GLenum input
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
#define location(file, line)
void __xmlIOErr(int domain, int code, const char *extra)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
XMLPUBVAR xmlMallocFunc xmlMallocAtomic
XMLPUBVAR xmlStrdupFunc xmlMemStrdup
XMLPUBVAR xmlMallocFunc xmlMalloc
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBVAR void * xmlGenericErrorContext
XMLPUBVAR xmlReallocFunc xmlRealloc
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
#define inflateInit2(strm, windowBits)
#define GETHOSTBYNAME_ARG_CAST
vector< Header * > headers
namespace GUID const ADDRINFOEXW * hints
INT WSAAPI setsockopt(IN SOCKET s, IN INT level, IN INT optname, IN CONST CHAR FAR *optval, IN INT optlen)
INT WSAAPI getsockopt(IN SOCKET s, IN INT level, IN INT optname, OUT CHAR FAR *optval, IN OUT INT FAR *optlen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
XMLPUBFUN xmlURIPtr XMLCALL xmlParseURIRaw(const char *str, int raw)
XMLPUBFUN void XMLCALL xmlFreeURI(xmlURIPtr uri)
#define FD_ISSET(fd, set)
int PASCAL FAR WSAGetLastError(void)
int PASCAL FAR WSACleanup(void)
XMLPUBFUN void XMLCALL xmlMemoryDump(void)
XMLPUBFUN xmlChar *XMLCALL xmlStrndup(const xmlChar *cur, int len)
XMLPUBFUN xmlChar *XMLCALL xmlStrcat(xmlChar *cur, const xmlChar *add)
XMLPUBFUN const xmlChar *XMLCALL xmlStrstr(const xmlChar *str, const xmlChar *val)
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
XMLPUBFUN xmlChar *XMLCALL xmlCharStrndup(const char *cur, int len)
XMLPUBFUN int XMLCALL xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, int len)