summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-06 07:50:18 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-10-06 07:50:18 +0000
commit39af394a1c3ae1d8ac71ad263a7c524988702c2e (patch)
tree4ba44670440d52ff6c3b07fdef35ae3384f3dc5a /lib
parent5c7dcc6c33bb9e9621cf09ada4a15f310cf1c0e0 (diff)
downloadcurl-39af394a1c3ae1d8ac71ad263a7c524988702c2e.tar.gz
removed tabs and trailing whitespace from source
Diffstat (limited to 'lib')
-rw-r--r--lib/amigaos.c6
-rw-r--r--lib/amigaos.h8
-rw-r--r--lib/config-mac.h70
-rwxr-xr-xlib/config-vms.h18
-rw-r--r--lib/connect.c6
-rw-r--r--lib/cookie.c40
-rw-r--r--lib/cookie.h2
-rw-r--r--lib/dict.c34
-rw-r--r--lib/file.c2
-rw-r--r--lib/formdata.c30
-rw-r--r--lib/ftp.c46
-rw-r--r--lib/getenv.c14
-rw-r--r--lib/hostares.c4
-rw-r--r--lib/hostasyn.c4
-rw-r--r--lib/hostip.c4
-rw-r--r--lib/hostip4.c4
-rw-r--r--lib/hostip6.c4
-rw-r--r--lib/hostsyn.c14
-rw-r--r--lib/hostthre.c4
-rw-r--r--lib/http.c12
-rw-r--r--lib/http_digest.c2
-rw-r--r--lib/inet_ntop.c6
-rw-r--r--lib/inet_pton.c48
-rw-r--r--lib/krb4.c6
-rw-r--r--lib/ldap.c8
-rw-r--r--lib/memory.h10
-rw-r--r--lib/netrc.c98
-rw-r--r--lib/progress.c2
-rw-r--r--lib/security.c18
-rw-r--r--lib/security.h16
-rw-r--r--lib/sendf.c12
-rw-r--r--lib/speedcheck.c20
-rw-r--r--lib/ssluse.c6
-rw-r--r--lib/strequal.c2
-rw-r--r--lib/telnet.c52
-rw-r--r--lib/transfer.h10
-rw-r--r--lib/url.c70
-rw-r--r--lib/urldata.h52
38 files changed, 381 insertions, 383 deletions
diff --git a/lib/amigaos.c b/lib/amigaos.c
index d81384618..13336ce05 100644
--- a/lib/amigaos.c
+++ b/lib/amigaos.c
@@ -30,7 +30,7 @@ void amiga_cleanup()
{
if(SocketBase)
CloseLibrary(SocketBase);
-
+
SocketBase = NULL;
}
@@ -38,12 +38,12 @@ BOOL amiga_init()
{
if(!SocketBase)
SocketBase = OpenLibrary("bsdsocket.library", 4);
-
+
if(!SocketBase) {
fprintf(stderr, "No TCP/IP Stack running!\n\a");
return FALSE;
}
-
+
atexit(amiga_cleanup);
return TRUE;
}
diff --git a/lib/amigaos.h b/lib/amigaos.h
index f8529c46e..0196eece7 100644
--- a/lib/amigaos.h
+++ b/lib/amigaos.h
@@ -36,10 +36,10 @@
#include "config-amigaos.h"
-#define select(args...) WaitSelect( args, NULL)
-#define inet_ntoa(x) Inet_NtoA( x ## .s_addr)
-#define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
-#define _AMIGASF 1
+#define select(args...) WaitSelect( args, NULL)
+#define inet_ntoa(x) Inet_NtoA( x ## .s_addr)
+#define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
+#define _AMIGASF 1
extern void amiga_cleanup();
extern BOOL amiga_init();
diff --git a/lib/config-mac.h b/lib/config-mac.h
index 2328ada13..8b0b0337c 100644
--- a/lib/config-mac.h
+++ b/lib/config-mac.h
@@ -1,45 +1,45 @@
#define OS "mac"
-#define HAVE_NETINET_IN_H 1
-#define HAVE_SYS_SOCKET_H 1
-#define HAVE_SYS_SELECT_H 1
-#define HAVE_NETDB_H 1
-#define HAVE_ARPA_INET_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_NET_IF_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_GETTIMEOFDAY 1
-#define HAVE_FCNTL_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_TIME_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_UTIME_H 1
-
-#define TIME_WITH_SYS_TIME 1
-
-#define HAVE_STRDUP 1
-#define HAVE_UTIME 1
-#define HAVE_INET_NTOA 1
-#define HAVE_SETVBUF 1
-#define HAVE_STRFTIME 1
-#define HAVE_INET_ADDR 1
-#define HAVE_MEMCPY 1
-#define HAVE_SELECT 1
-#define HAVE_SOCKET 1
-
-//#define HAVE_STRICMP 1
-#define HAVE_SIGACTION 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_NETDB_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_NET_IF_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_FCNTL_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_ALLOCA_H 1
+#define HAVE_TIME_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_UTIME_H 1
+
+#define TIME_WITH_SYS_TIME 1
+
+#define HAVE_STRDUP 1
+#define HAVE_UTIME 1
+#define HAVE_INET_NTOA 1
+#define HAVE_SETVBUF 1
+#define HAVE_STRFTIME 1
+#define HAVE_INET_ADDR 1
+#define HAVE_MEMCPY 1
+#define HAVE_SELECT 1
+#define HAVE_SOCKET 1
+
+//#define HAVE_STRICMP 1
+#define HAVE_SIGACTION 1
#ifdef MACOS_SSL_SUPPORT
-# define USE_SSLEAY 1
-# define USE_OPENSSL 1
+# define USE_SSLEAY 1
+# define USE_OPENSSL 1
#endif
-#define HAVE_RAND_STATUS 1
-#define HAVE_RAND_EGD 1
+#define HAVE_RAND_STATUS 1
+#define HAVE_RAND_EGD 1
-#define HAVE_FIONBIO 1
+#define HAVE_FIONBIO 1
#include <extra/stricmp.h>
#include <extra/strdup.h>
diff --git a/lib/config-vms.h b/lib/config-vms.h
index d29303fd2..83751073d 100755
--- a/lib/config-vms.h
+++ b/lib/config-vms.h
@@ -1,5 +1,3 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
@@ -224,19 +222,19 @@
#define HAVE_OPENSSL_CRYPTO_H 1
/* Define if you have the <openssl/err.h> header file. */
-#define HAVE_OPENSSL_ERR_H 1
+#define HAVE_OPENSSL_ERR_H 1
/* Define if you have the <openssl/pem.h> header file. */
-#define HAVE_OPENSSL_PEM_H 1
+#define HAVE_OPENSSL_PEM_H 1
/* Define if you have the <openssl/rsa.h> header file. */
#define HAVE_OPENSSL_RSA_H 1
/* Define if you have the <openssl/ssl.h> header file. */
-#define HAVE_OPENSSL_SSL_H 1
+#define HAVE_OPENSSL_SSL_H 1
/* Define if you have the <openssl/x509.h> header file. */
-#define HAVE_OPENSSL_X509_H 1
+#define HAVE_OPENSSL_X509_H 1
/* Define if you have the <pem.h> header file. */
#undef HAVE_PEM_H
@@ -314,7 +312,7 @@
#define HAVE_LIBSOCKET 1
/* Define if you have the ssl library (-lssl). */
-#define HAVE_LIBSSL 1
+#define HAVE_LIBSSL 1
/* Define if you have the ucb library (-lucb). */
#undef HAVE_LIBUCB
@@ -334,7 +332,7 @@
/* Set to explicitly specify we don't want to use thread-safe functions */
#undef DISABLED_THREADSAFE
-#define HAVE_TIMEVAL_H 1
+#define HAVE_TIMEVAL_H 1
/* Name of this package! */
#define PACKAGE "not-used"
@@ -346,7 +344,7 @@
#undef HAVE_GETPASS
/* Define if you have a working OpenSSL installation */
-#define OPENSSL_ENABLED 1
+#define OPENSSL_ENABLED 1
/* Define if you have the `dlopen' function. */
#undef HAVE_DLOPEN
@@ -368,7 +366,7 @@
#define HAVE_MEMORY_H 1
-#define HAVE_FIONBIO 1
+#define HAVE_FIONBIO 1
/* Define if you have the `sigsetjmp' function. */
#define HAVE_SIGSETJMP 1
diff --git a/lib/connect.c b/lib/connect.c
index 5e8c047bc..3ff73636d 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -67,7 +67,7 @@
#undef in_addr_t
#define in_addr_t unsigned long
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#endif
@@ -362,8 +362,8 @@ static CURLcode bindlocal(struct connectdata *conn,
} /* end of if h */
else {
- failf(data,"could't find my own IP address (%s)", myhost);
- return CURLE_HTTP_PORT_FAILED;
+ failf(data,"could't find my own IP address (%s)", myhost);
+ return CURLE_HTTP_PORT_FAILED;
}
} /* end of inet_addr */
diff --git a/lib/cookie.c b/lib/cookie.c
index 47ed95254..528d88f65 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -29,20 +29,20 @@ RECEIVING COOKIE INFORMATION
struct CookieInfo *cookie_init(char *file);
- Inits a cookie struct to store data in a local file. This is always
- called before any cookies are set.
+ Inits a cookie struct to store data in a local file. This is always
+ called before any cookies are set.
int cookies_set(struct CookieInfo *cookie, char *cookie_line);
- The 'cookie_line' parameter is a full "Set-cookie:" line as
- received from a server.
+ The 'cookie_line' parameter is a full "Set-cookie:" line as
+ received from a server.
- The function need to replace previously stored lines that this new
- line superceeds.
+ The function need to replace previously stored lines that this new
+ line superceeds.
- It may remove lines that are expired.
+ It may remove lines that are expired.
- It should return an indication of success/error.
+ It should return an indication of success/error.
SENDING COOKIE INFORMATION
@@ -51,12 +51,12 @@ SENDING COOKIE INFORMATION
struct Cookies *cookie_getlist(struct CookieInfo *cookie,
char *host, char *path, bool secure);
- For a given host and path, return a linked list of cookies that
- the client should send to the server if used now. The secure
- boolean informs the cookie if a secure connection is achieved or
- not.
+ For a given host and path, return a linked list of cookies that
+ the client should send to the server if used now. The secure
+ boolean informs the cookie if a secure connection is achieved or
+ not.
- It shall only return cookies that haven't expired.
+ It shall only return cookies that haven't expired.
Example set of cookies:
@@ -775,10 +775,10 @@ void Curl_cookie_freelist(struct Cookie *co)
struct Cookie *next;
if(co) {
while(co) {
- next = co->next;
- free(co); /* we only free the struct since the "members" are all
- just copied! */
- co = next;
+ next = co->next;
+ free(co); /* we only free the struct since the "members" are all
+ just copied! */
+ co = next;
}
}
}
@@ -796,13 +796,13 @@ void Curl_cookie_cleanup(struct CookieInfo *c)
struct Cookie *next;
if(c) {
if(c->filename)
- free(c->filename);
+ free(c->filename);
co = c->cookies;
while(co) {
- next = co->next;
+ next = co->next;
freecookie(co);
- co = next;
+ co = next;
}
free(c); /* free the base struct as well */
}
diff --git a/lib/cookie.h b/lib/cookie.h
index 48b9d20fa..6f8e8e5fc 100644
--- a/lib/cookie.h
+++ b/lib/cookie.h
@@ -36,7 +36,7 @@ struct Cookie {
struct Cookie *next; /* next in the chain */
char *name; /* <this> = value */
char *value; /* name = <this> */
- char *path; /* path = <this> */
+ char *path; /* path = <this> */
char *domain; /* domain = <this> */
long expires; /* expires = <this> */
char *expirestr; /* the plain text version */
diff --git a/lib/dict.c b/lib/dict.c
index 2a7ad22c7..1b3f00452 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -1,8 +1,8 @@
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -10,7 +10,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -101,7 +101,7 @@ CURLcode Curl_dict(struct connectdata *conn)
if (strnequal(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
strnequal(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
strnequal(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
-
+
word = strchr(path, ':');
if (word) {
word++;
@@ -118,7 +118,7 @@ CURLcode Curl_dict(struct connectdata *conn)
}
}
}
-
+
if ((word == NULL) || (*word == (char)0)) {
failf(data, "lookup word is missing");
}
@@ -128,7 +128,7 @@ CURLcode Curl_dict(struct connectdata *conn)
if ((strategy == NULL) || (*strategy == (char)0)) {
strategy = (char *)".";
}
-
+
result = Curl_sendf(sockfd, conn,
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
"MATCH "
@@ -136,7 +136,7 @@ CURLcode Curl_dict(struct connectdata *conn)
"%s " /* strategy */
"%s\n" /* word */
"QUIT\n",
-
+
database,
strategy,
word
@@ -145,14 +145,14 @@ CURLcode Curl_dict(struct connectdata *conn)
failf(data, "Failed sending DICT request");
else
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
- -1, NULL); /* no upload */
+ -1, NULL); /* no upload */
if(result)
return result;
}
else if (strnequal(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
strnequal(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
strnequal(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
-
+
word = strchr(path, ':');
if (word) {
word++;
@@ -165,14 +165,14 @@ CURLcode Curl_dict(struct connectdata *conn)
}
}
}
-
+
if ((word == NULL) || (*word == (char)0)) {
failf(data, "lookup word is missing");
}
if ((database == NULL) || (*database == (char)0)) {
database = (char *)"!";
}
-
+
result = Curl_sendf(sockfd, conn,
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
"DEFINE "
@@ -186,17 +186,17 @@ CURLcode Curl_dict(struct connectdata *conn)
else
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
-1, NULL); /* no upload */
-
+
if(result)
return result;
-
+
}
else {
-
+
ppath = strchr(path, '/');
if (ppath) {
int i;
-
+
ppath++;
for (i = 0; ppath[i]; i++) {
if (ppath[i] == ':')
diff --git a/lib/file.c b/lib/file.c
index 57201d417..6d6287d74 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -148,7 +148,7 @@ CURLcode Curl_file_connect(struct connectdata *conn)
if (actual_path[i] == '/')
actual_path[i] = '\\';
- fd = open(actual_path, O_RDONLY | O_BINARY); /* no CR/LF translation! */
+ fd = open(actual_path, O_RDONLY | O_BINARY); /* no CR/LF translation! */
file->path = actual_path;
#else
fd = open(real_path, O_RDONLY);
diff --git a/lib/formdata.c b/lib/formdata.c
index 5297e68de..d7c741938 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -242,7 +242,7 @@ static FormInfo * AddFormInfo(char *value,
*
***************************************************************************/
static const char * ContentTypeForFilename (const char *filename,
- const char *prevtype)
+ const char *prevtype)
{
const char *contenttype = NULL;
unsigned int i;
@@ -273,10 +273,10 @@ static const char * ContentTypeForFilename (const char *filename,
for(i=0; i<sizeof(ctts)/sizeof(ctts[0]); i++) {
if(strlen(filename) >= strlen(ctts[i].extension)) {
if(strequal(filename +
- strlen(filename) - strlen(ctts[i].extension),
- ctts[i].extension)) {
- contenttype = ctts[i].type;
- break;
+ strlen(filename) - strlen(ctts[i].extension),
+ ctts[i].extension)) {
+ contenttype = ctts[i].type;
+ break;
}
}
}
@@ -606,23 +606,23 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
current_form)))
return_value = CURL_FORMADD_MEMORY;
}
- else
- return_value = CURL_FORMADD_NULL;
+ else
+ return_value = CURL_FORMADD_NULL;
}
else
return_value = CURL_FORMADD_OPTION_TWICE;
}
else {
- if (contenttype) {
- current_form->contenttype = strdup(contenttype);
+ if (contenttype) {
+ current_form->contenttype = strdup(contenttype);
if(!current_form->contenttype)
return_value = CURL_FORMADD_MEMORY;
else
current_form->contenttype_alloc = TRUE;
}
- else
- return_value = CURL_FORMADD_NULL;
- }
+ else
+ return_value = CURL_FORMADD_NULL;
+ }
break;
}
case CURLFORM_CONTENTHEADER:
@@ -1425,10 +1425,10 @@ int main()
name3[1] = '\0';
value3[1] = '\0';
if (FormAddTest("PTRNAME + NAMELENGTH + COPYNAME + CONTENTSLENGTH test",
- &httppost, &last_post,
+ &httppost, &last_post,
CURLFORM_PTRNAME, name3, CURLFORM_COPYCONTENTS, value3,
CURLFORM_CONTENTSLENGTH, value3length,
- CURLFORM_NAMELENGTH, name3length, CURLFORM_END))
+ CURLFORM_NAMELENGTH, name3length, CURLFORM_END))
++errors;
if (FormAddTest("simple PTRCONTENTS test", &httppost, &last_post,
CURLFORM_COPYNAME, name4, CURLFORM_PTRCONTENTS, value4,
@@ -1529,7 +1529,7 @@ char *Curl_FormBoundary(void)
{
char *retstring;
static int randomizer=0; /* this is just so that two boundaries within
- the same form won't be identical */
+ the same form won't be identical */
size_t i;
static char table16[]="abcdef0123456789";
diff --git a/lib/ftp.c b/lib/ftp.c
index 96ea84331..e6c979e6d 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -55,7 +55,7 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#endif
@@ -207,7 +207,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
if (CURL_SOCKET_BAD == s) {
/* DIE! */
failf(data, "Error accept()ing server connect");
- return CURLE_FTP_PORT_FAILED;
+ return CURLE_FTP_PORT_FAILED;
}
infof(data, "Connection accepted from server\n");
@@ -260,7 +260,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
if (ftpcode)
*ftpcode = 0; /* 0 for errors */
- FD_ZERO (&readfd); /* clear it */
+ FD_ZERO (&readfd); /* clear it */
FD_SET (sockfd, &readfd); /* read socket */
/* get this in a backup variable to be able to restore it on each lap in the
@@ -300,7 +300,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
}
if(!ftp->cache) {
- readfd = rkeepfd; /* set every lap */
+ readfd = rkeepfd; /* set every lap */
interval.tv_sec = 1; /* use 1 second timeout intervals */
interval.tv_usec = 0;
@@ -327,13 +327,13 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
if(ftp->cache) {
/* we had data in the "cache", copy that instead of doing an actual
* read
- *
- * Dave Meyer, December 2003:
- * ftp->cache_size is cast to int here. This should be safe,
- * because it would have been populated with something of size
- * int to begin with, even though its datatype may be larger
- * than an int.
- */
+ *
+ * Dave Meyer, December 2003:
+ * ftp->cache_size is cast to int here. This should be safe,
+ * because it would have been populated with something of size
+ * int to begin with, even though its datatype may be larger
+ * than an int.
+ */
memcpy(ptr, ftp->cache, (int)ftp->cache_size);
gotbytes = (int)ftp->cache_size;
free(ftp->cache); /* free the cache */
@@ -387,7 +387,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
return result;
#define lastline(line) (isdigit((int)line[0]) && isdigit((int)line[1]) && \
- isdigit((int)line[2]) && (' ' == line[3]))
+ isdigit((int)line[2]) && (' ' == line[3]))
if(perline>3 && lastline(line_start)) {
/* This is the end of the last line, copy the last
@@ -790,7 +790,7 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status)
!data->set.crlf) {
failf(data, "Uploaded unaligned file size (%" FORMAT_OFF_T
" out of %" FORMAT_OFF_T " bytes)",
- *ftp->bytecountp, data->set.infilesize);
+ *ftp->bytecountp, data->set.infilesize);
conn->bits.close = TRUE; /* close this connection since we don't
know what state this error leaves us in */
return CURLE_PARTIAL_FILE;
@@ -800,7 +800,7 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status)
if((-1 != conn->size) && (conn->size != *ftp->bytecountp) &&
(conn->maxdownload != *ftp->bytecountp)) {
failf(data, "Received only partial file: %" FORMAT_OFF_T " bytes",
- *ftp->bytecountp);
+ *ftp->bytecountp);
conn->bits.close = TRUE; /* close this connection since we don't
know what state this error leaves us in */
return CURLE_PARTIAL_FILE;
@@ -1777,11 +1777,11 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
if(conn->ssl[SECONDARYSOCKET].use) {
/* since we only have a plaintext TCP connection here, we must now
- do the TLS stuff */
+ do the TLS stuff */
infof(data, "Doing the SSL/TLS handshake on the data stream\n");
result = Curl_SSLConnect(conn, SECONDARYSOCKET);
if(result)
- return result;
+ return result;
}
*bytecountp=0;
@@ -1838,7 +1838,7 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
}
infof(data, "range-download from %" FORMAT_OFF_T
" to %" FORMAT_OFF_T ", totally %" FORMAT_OFF_T " bytes\n",
- from, to, conn->maxdownload);
+ from, to, conn->maxdownload);
ftp->dont_check = TRUE; /* dont check for successful transfer */
}
@@ -2045,12 +2045,12 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
}
if(conn->ssl[SECONDARYSOCKET].use) {
- /* since we only have a plaintext TCP connection here, we must now
- do the TLS stuff */
- infof(data, "Doing the SSL/TLS handshake on the data stream\n");
- result = Curl_SSLConnect(conn, SECONDARYSOCKET);
- if(result)
- return result;
+ /* since we only have a plaintext TCP connection here, we must now
+ do the TLS stuff */
+ infof(data, "Doing the SSL/TLS handshake on the data stream\n");
+ result = Curl_SSLConnect(conn, SECONDARYSOCKET);
+ if(result)
+ return result;
}
if(size > conn->maxdownload && conn->maxdownload > 0)
diff --git a/lib/getenv.c b/lib/getenv.c
index abea29a31..8f8311bf0 100644
--- a/lib/getenv.c
+++ b/lib/getenv.c
@@ -1,8 +1,8 @@
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -10,7 +10,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -51,10 +51,10 @@ char *GetEnv(const char *variable)
if (temp != NULL)
ExpandEnvironmentStrings(temp, env, sizeof(env));
#else
-#ifdef VMS
+#ifdef VMS
char *env = getenv(variable);
if (env && strcmp("HOME",variable) == 0) {
- env = decc$translate_vms(env);
+ env = decc$translate_vms(env);
}
#else
/* no length control */
diff --git a/lib/hostares.c b/lib/hostares.c
index 80d1ecd6c..48d62115e 100644
--- a/lib/hostares.c
+++ b/lib/hostares.c
@@ -47,12 +47,12 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
+#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
diff --git a/lib/hostasyn.c b/lib/hostasyn.c
index 5a0397d7a..2abad14fd 100644
--- a/lib/hostasyn.c
+++ b/lib/hostasyn.c
@@ -47,12 +47,12 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
+#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
diff --git a/lib/hostip.c b/lib/hostip.c
index c9c78784f..3db704f44 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -47,12 +47,12 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
+#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
diff --git a/lib/hostip4.c b/lib/hostip4.c
index b0196d15a..50d2adaa8 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -47,12 +47,12 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
+#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
diff --git a/lib/hostip6.c b/lib/hostip6.c
index e72794251..e1a08f78a 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -47,12 +47,12 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
+#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
index 559043d38..d2343b962 100644
--- a/lib/hostsyn.c
+++ b/lib/hostsyn.c
@@ -1,8 +1,8 @@
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -10,7 +10,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -47,12 +47,12 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
+#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
diff --git a/lib/hostthre.c b/lib/hostthre.c
index 6ab070638..738efa52f 100644
--- a/lib/hostthre.c
+++ b/lib/hostthre.c
@@ -47,12 +47,12 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
+#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
-#ifdef VMS
+#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
diff --git a/lib/http.c b/lib/http.c
index 52dc8486b..80484975f 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -967,7 +967,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
if(result)
return result;
- FD_ZERO (&readfd); /* clear it */
+ FD_ZERO (&readfd); /* clear it */
FD_SET (tunnelsocket, &readfd); /* read socket */
/* get this in a backup variable to be able to restore it on each lap in
@@ -1555,17 +1555,17 @@ CURLcode Curl_http(struct connectdata *conn)
curl_off_t total_expected_size=
conn->resume_from + data->set.infilesize;
conn->allocptr.rangeline =
- aprintf("Content-Range: bytes %s%" FORMAT_OFF_T
+ aprintf("Content-Range: bytes %s%" FORMAT_OFF_T
"/%" FORMAT_OFF_T "\r\n",
- conn->range, total_expected_size-1,
- total_expected_size);
+ conn->range, total_expected_size-1,
+ total_expected_size);
}
else {
/* Range was selected and then we just pass the incoming range and
append total size */
conn->allocptr.rangeline =
- aprintf("Content-Range: bytes %s/%" FORMAT_OFF_T "\r\n",
- conn->range, data->set.infilesize);
+ aprintf("Content-Range: bytes %s/%" FORMAT_OFF_T "\r\n",
+ conn->range, data->set.infilesize);
}
}
}
diff --git a/lib/http_digest.c b/lib/http_digest.c
index cd224625c..20f5dc47b 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -314,7 +314,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
A2 = Method ":" digest-uri-value
- If the "qop" value is "auth-int", then A2 is:
+ If the "qop" value is "auth-int", then A2 is:
A2 = Method ":" digest-uri-value ":" H(entity-body)
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c
index 0408bfdee..6b15c025f 100644
--- a/lib/inet_ntop.c
+++ b/lib/inet_ntop.c
@@ -35,9 +35,9 @@
#include "inet_ntoa_r.h"
#endif
-#define IN6ADDRSZ 16
-#define INADDRSZ 4
-#define INT16SZ 2
+#define IN6ADDRSZ 16
+#define INADDRSZ 4
+#define INT16SZ 2
#ifdef WIN32
#define EAFNOSUPPORT WSAEAFNOSUPPORT
diff --git a/lib/inet_pton.c b/lib/inet_pton.c
index c79b46335..9eb199af5 100644
--- a/lib/inet_pton.c
+++ b/lib/inet_pton.c
@@ -40,9 +40,9 @@
#include "inet_pton.h"
-#define IN6ADDRSZ 16
-#define INADDRSZ 4
-#define INT16SZ 2
+#define IN6ADDRSZ 16
+#define INADDRSZ 4
+#define INT16SZ 2
#ifdef WIN32
#define EAFNOSUPPORT WSAEAFNOSUPPORT
@@ -53,21 +53,21 @@
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
*/
-static int inet_pton4(const char *src, unsigned char *dst);
+static int inet_pton4(const char *src, unsigned char *dst);
#ifdef ENABLE_IPV6
-static int inet_pton6(const char *src, unsigned char *dst);
+static int inet_pton6(const char *src, unsigned char *dst);
#endif
/* int
* inet_pton(af, src, dst)
- * convert from presentation format (which usually means ASCII printable)
- * to network format (which is usually some kind of binary format).
+ * convert from presentation format (which usually means ASCII printable)
+ * to network format (which is usually some kind of binary format).
* return:
- * 1 if the address was valid for the specified address family
- * 0 if the address wasn't valid (`dst' is untouched in this case)
- * -1 if some other error occurred (`dst' is untouched in this case, too)
+ * 1 if the address was valid for the specified address family
+ * 0 if the address wasn't valid (`dst' is untouched in this case)
+ * -1 if some other error occurred (`dst' is untouched in this case, too)
* author:
- * Paul Vixie, 1996.
+ * Paul Vixie, 1996.
*/
int
Curl_inet_pton(int af, const char *src, void *dst)
@@ -76,8 +76,8 @@ Curl_inet_pton(int af, const char *src, void *dst)
case AF_INET:
return (inet_pton4(src, dst));
#ifdef ENABLE_IPV6
-#ifndef AF_INET6
-#define AF_INET6 AF_MAX+1 /* just to let this compile */
+#ifndef AF_INET6
+#define AF_INET6 AF_MAX+1 /* just to let this compile */
#endif
case AF_INET6:
return (inet_pton6(src, dst));
@@ -91,13 +91,13 @@ Curl_inet_pton(int af, const char *src, void *dst)
/* int
* inet_pton4(src, dst)
- * like inet_aton() but without all the hexadecimal and shorthand.
+ * like inet_aton() but without all the hexadecimal and shorthand.
* return:
- * 1 if `src' is a valid dotted quad, else 0.
+ * 1 if `src' is a valid dotted quad, else 0.
* notice:
- * does not touch `dst' unless it's returning 1.
+ * does not touch `dst' unless it's returning 1.
* author:
- * Paul Vixie, 1996.
+ * Paul Vixie, 1996.
*/
static int
inet_pton4(const char *src, unsigned char *dst)
@@ -142,16 +142,16 @@ inet_pton4(const char *src, unsigned char *dst)
#ifdef ENABLE_IPV6
/* int
* inet_pton6(src, dst)
- * convert presentation level address to network order binary form.
+ * convert presentation level address to network order binary form.
* return:
- * 1 if `src' is a valid [RFC1884 2.2] address, else 0.
+ * 1 if `src' is a valid [RFC1884 2.2] address, else 0.
* notice:
- * (1) does not touch `dst' unless it's returning 1.
- * (2) :: in a full address is silently ignored.
+ * (1) does not touch `dst' unless it's returning 1.
+ * (2) :: in a full address is silently ignored.
* credit:
- * inspired by Mark Andrews.
+ * inspired by Mark Andrews.
* author:
- * Paul Vixie, 1996.
+ * Paul Vixie, 1996.
*/
static int
inet_pton6(const char *src, unsigned char *dst)
@@ -206,7 +206,7 @@ inet_pton6(const char *src, unsigned char *dst)
inet_pton4(curtok, tp) > 0) {
tp += INADDRSZ;
saw_xdigit = 0;
- break; /* '\0' was seen by inet_pton4(). */
+ break; /* '\0' was seen by inet_pton4(). */
}
return (0);
}
diff --git a/lib/krb4.c b/lib/krb4.c
index 743f3f121..904ca774f 100644
--- a/lib/krb4.c
+++ b/lib/krb4.c
@@ -115,7 +115,7 @@ krb4_check_prot(void *app_data, int level)
static int
krb4_decode(void *app_data, void *buf, int len, int level,
- struct connectdata *conn)
+ struct connectdata *conn)
{
MSG_DAT m;
int e;
@@ -150,7 +150,7 @@ krb4_overhead(void *app_data, int level, int len)
static int
krb4_encode(void *app_data, void *from, int length, int level, void **to,
- struct connectdata *conn)
+ struct connectdata *conn)
{
struct krb4_data *d = app_data;
*to = malloc(length + 31);
@@ -168,7 +168,7 @@ krb4_encode(void *app_data, void *from, int length, int level, void **to,
static int
mk_auth(struct krb4_data *d, KTEXT adat,
- const char *service, char *host, int checksum)
+ const char *service, char *host, int checksum)
{
int ret;
CREDENTIALS cred;
diff --git a/lib/ldap.c b/lib/ldap.c
index 3ea417f24..e140f4ffa 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -74,10 +74,10 @@
#define LDAP_SIZELIMIT_EXCEEDED 4
#endif
-#define DLOPEN_MODE RTLD_LAZY /*! assume all dlopen() implementations have
+#define DLOPEN_MODE RTLD_LAZY /*! assume all dlopen() implementations have
this */
-#if defined(RTLD_LAZY_GLOBAL) /* It turns out some systems use this: */
+#if defined(RTLD_LAZY_GLOBAL) /* It turns out some systems use this: */
# undef DLOPEN_MODE
# define DLOPEN_MODE RTLD_LAZY_GLOBAL
#elif defined(RTLD_GLOBAL)
@@ -621,5 +621,5 @@ static void _ldap_free_urldesc (LDAPURLDesc *ludp)
}
free (ludp);
}
-#endif /* WIN32 */
-#endif /* CURL_DISABLE_LDAP */
+#endif /* WIN32 */
+#endif /* CURL_DISABLE_LDAP */
diff --git a/lib/memory.h b/lib/memory.h
index 4e32a6772..076d20a28 100644
--- a/lib/memory.h
+++ b/lib/memory.h
@@ -1,10 +1,10 @@
#ifndef _CURL_MEMORY_H
#define _CURL_MEMORY_H
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -12,7 +12,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
diff --git a/lib/netrc.c b/lib/netrc.c
index 233e9018f..e43140ac3 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -1,8 +1,8 @@
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -10,7 +10,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -83,7 +83,7 @@ int Curl_parsenetrc(char *host,
FILE *file;
int retcode=1;
int specific_login = (login[0] != 0);
- char *home = NULL;
+ char *home = NULL;
bool home_alloc = FALSE;
bool netrc_alloc = FALSE;
int state=NOTHING;
@@ -119,7 +119,7 @@ int Curl_parsenetrc(char *host,
struct passwd *pw;
pw= getpwuid(geteuid());
if (pw) {
-#ifdef VMS
+#ifdef VMS
home = decc$translate_vms(pw->pw_dir);
#else
home = pw->pw_dir;
@@ -156,65 +156,65 @@ int Curl_parsenetrc(char *host,
break;
}
- switch(state) {
- case NOTHING:
- if(strequal("machine", tok)) {
- /* the next tok is the machine name, this is in itself the
- delimiter that starts the stuff entered for this machine,
- after this we need to search for 'login' and
- 'password'. */
- state=HOSTFOUND;
- }
- break;
- case HOSTFOUND:
- if(strequal(host, tok)) {
- /* and yes, this is our host! */
- state=HOSTVALID;
+ switch(state) {
+ case NOTHING:
+ if(strequal("machine", tok)) {
+ /* the next tok is the machine name, this is in itself the
+ delimiter that starts the stuff entered for this machine,
+ after this we need to search for 'login' and
+ 'password'. */
+ state=HOSTFOUND;
+ }
+ break;
+ case HOSTFOUND:
+ if(strequal(host, tok)) {
+ /* and yes, this is our host! */
+ state=HOSTVALID;
#ifdef _NETRC_DEBUG
- printf("HOST: %s\n", tok);
+ printf("HOST: %s\n", tok);
#endif
- retcode=0; /* we did find our host */
- }
- else
- /* not our host */
- state=NOTHING;
- break;
- case HOSTVALID:
- /* we are now parsing sub-keywords concerning "our" host */
- if(state_login) {
+ retcode=0; /* we did find our host */
+ }
+ else
+ /* not our host */
+ state=NOTHING;
+ break;
+ case HOSTVALID:
+ /* we are now parsing sub-keywords concerning "our" host */
+ if(state_login) {
if (specific_login) {
state_our_login = strequal(login, tok);
}
else {
strncpy(login, tok, LOGINSIZE-1);
#ifdef _NETRC_DEBUG
- printf("LOGIN: %s\n", login);
+ printf("LOGIN: %s\n", login);
#endif
}
- state_login=0;
- }
- else if(state_password) {
+ state_login=0;
+ }
+ else if(state_password) {
if (state_our_login || !specific_login) {
strncpy(password, tok, PASSWORDSIZE-1);
#ifdef _NETRC_DEBUG
printf("PASSWORD: %s\n", password);
#endif
}
- state_password=0;
- }
- else if(strequal("login", tok))
- state_login=1;
- else if(strequal("password", tok))
- state_password=1;
- else if(strequal("machine", tok)) {
- /* ok, there's machine here go => */
- state = HOSTFOUND;
+ state_password=0;
+ }
+ else if(strequal("login", tok))
+ state_login=1;
+ else if(strequal("password", tok))
+ state_password=1;
+ else if(strequal("machine", tok)) {
+ /* ok, there's machine here go => */
+ state = HOSTFOUND;
state_our_login = FALSE;
- }
- break;
- } /* switch (state) */
+ }
+ break;
+ } /* switch (state) */
- tok = strtok_r(NULL, " \t\n", &tok_buf);
+ tok = strtok_r(NULL, " \t\n", &tok_buf);
} /* while (tok) */
} /* while fgets() */
@@ -240,7 +240,7 @@ int main(int argc, char **argv)
if(0 == ParseNetrc(argv[1], login, password)) {
printf("HOST: %s LOGIN: %s PASSWORD: %s\n",
- argv[1], login, password);
+ argv[1], login, password);
}
}
diff --git a/lib/progress.c b/lib/progress.c
index 7294894a7..36be56ea4 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -256,7 +256,7 @@ int Curl_pgrsUpdate(struct connectdata *conn)
if (!data->progress.callback) {
if(conn->resume_from)
fprintf(data->set.err,
- "** Resuming transfer from byte position %" FORMAT_OFF_T
+ "** Resuming transfer from byte position %" FORMAT_OFF_T
"\n",
conn->resume_from);
fprintf(data->set.err,
diff --git a/lib/security.c b/lib/security.c
index 41dfa7311..3b2a39213 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -178,15 +178,15 @@ static size_t
buffer_write(struct krb4buffer *buf, void *data, size_t len)
{
if(buf->index + len > buf->size) {
- void *tmp;
- if(buf->data == NULL)
- tmp = malloc(1024);
- else
- tmp = realloc(buf->data, buf->index + len);
- if(tmp == NULL)
- return -1;
- buf->data = tmp;
- buf->size = buf->index + len;
+ void *tmp;
+ if(buf->data == NULL)
+ tmp = malloc(1024);
+ else
+ tmp = realloc(buf->data, buf->index + len);
+ if(tmp == NULL)
+ return -1;
+ buf->data = tmp;
+ buf->size = buf->index + len;
}
memcpy((char*)buf->data + buf->index, data, len);
buf->index += len;
diff --git a/lib/security.h b/lib/security.h
index 73afd3ab2..f92473fca 100644
--- a/lib/security.h
+++ b/lib/security.h
@@ -1,10 +1,10 @@
#ifndef __SECURITY_H
#define __SECURITY_H
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -12,7 +12,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -41,9 +41,9 @@ struct Curl_sec_client_mech {
};
-#define AUTH_OK 0
-#define AUTH_CONTINUE 1
-#define AUTH_ERROR 2
+#define AUTH_OK 0
+#define AUTH_CONTINUE 1
+#define AUTH_ERROR 2
extern struct Curl_sec_client_mech Curl_krb4_client_mech;
diff --git a/lib/sendf.c b/lib/sendf.c
index 84e44688f..7d0f71de1 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -33,7 +33,7 @@
#endif
#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h> /* required for send() & recv() prototypes */
+#include <sys/socket.h> /* required for send() & recv() prototypes */
#endif
#ifdef HAVE_UNISTD_H
@@ -59,7 +59,7 @@
/* returns last node in linked list */
static struct curl_slist *slist_get_last(struct curl_slist *list)
{
- struct curl_slist *item;
+ struct curl_slist *item;
/* if caller passed us a NULL, return now */
if (!list)
@@ -83,8 +83,8 @@ static struct curl_slist *slist_get_last(struct curl_slist *list)
struct curl_slist *curl_slist_append(struct curl_slist *list,
const char *data)
{
- struct curl_slist *last;
- struct curl_slist *new_item;
+ struct curl_slist *last;
+ struct curl_slist *new_item;
new_item = (struct curl_slist *) malloc(sizeof(struct curl_slist));
if (new_item) {
@@ -114,8 +114,8 @@ struct curl_slist *curl_slist_append(struct curl_slist *list,
/* be nice and clean up resources */
void curl_slist_free_all(struct curl_slist *list)
{
- struct curl_slist *next;
- struct curl_slist *item;
+ struct curl_slist *next;
+ struct curl_slist *item;
if (!list)
return;
diff --git a/lib/speedcheck.c b/lib/speedcheck.c
index b8b45cad1..273cacb5a 100644
--- a/lib/speedcheck.c
+++ b/lib/speedcheck.c
@@ -1,8 +1,8 @@
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -10,7 +10,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -47,15 +47,15 @@ CURLcode Curl_speedcheck(struct SessionHandle *data,
/* We are now below the "low speed limit". If we are below it
for "low speed time" seconds we consider that enough reason
to abort the download. */
-
+
if( (Curl_tvdiff(now, data->state.keeps_speed)/1000) >
data->set.low_speed_time) {
/* we have been this slow for long enough, now die */
failf(data,
- "Operation too slow. "
- "Less than %d bytes/sec transfered the last %d seconds",
- data->set.low_speed_limit,
- data->set.low_speed_time);
+ "Operation too slow. "
+ "Less than %d bytes/sec transfered the last %d seconds",
+ data->set.low_speed_limit,
+ data->set.low_speed_time);
return CURLE_OPERATION_TIMEOUTED;
}
}
diff --git a/lib/ssluse.c b/lib/ssluse.c
index aa77abba3..f48928c9c 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -775,7 +775,7 @@ static int hostmatch(const char *hostname, const char *pattern)
return HOST_MATCH;
while (*hostname) {
- /* The only recursive function in libcurl! */
+ /* The only recursive function in libcurl! */
if (hostmatch(hostname++,pattern) == HOST_MATCH)
return HOST_MATCH;
}
@@ -1197,7 +1197,7 @@ Curl_SSLConnect(struct connectdata *conn,
if (!SSL_CTX_load_verify_locations(connssl->ctx, data->set.ssl.CAfile,
data->set.ssl.CApath)) {
if (data->set.ssl.verifypeer) {
- /* Fail if we insist on successfully verifying the server. */
+ /* Fail if we insist on successfully verifying the server. */
failf(data,"error setting certificate verify locations:\n"
" CAfile: %s\n CApath: %s\n",
data->set.ssl.CAfile ? data->set.ssl.CAfile : "none",
@@ -1351,7 +1351,7 @@ Curl_SSLConnect(struct connectdata *conn,
* the SO_ERROR is also lost.
*/
if (CURLE_SSL_CONNECT_ERROR == rc && errdetail == 0) {
- failf(data, "Unknown SSL protocol error in connection to %s:%d ",
+ failf(data, "Unknown SSL protocol error in connection to %s:%d ",
conn->host.name, conn->port);
return rc;
}
diff --git a/lib/strequal.c b/lib/strequal.c
index ec4910281..f993e382a 100644
--- a/lib/strequal.c
+++ b/lib/strequal.c
@@ -135,6 +135,6 @@ size_t Curl_strlcat(char *dst, const char *src, size_t siz)
}
*d = '\0';
- return(dlen + (s - src)); /* count does not include NUL */
+ return(dlen + (s - src)); /* count does not include NUL */
}
#endif
diff --git a/lib/telnet.c b/lib/telnet.c
index 1d5cdf64a..b0f74bb8d 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -107,12 +107,12 @@ static CURLcode check_wsock2 ( struct SessionHandle *data );
static
void telrcv(struct connectdata *,
- unsigned char *inbuf, /* Data received from socket */
- ssize_t count); /* Number of bytes received */
+ unsigned char *inbuf, /* Data received from socket */
+ ssize_t count); /* Number of bytes received */
static void printoption(struct SessionHandle *data,
- const char *direction,
- int cmd, int option);
+ const char *direction,
+ int cmd, int option);
static void negotiate(struct connectdata *);
static void send_negotiation(struct connectdata *, int cmd, int option);
@@ -120,17 +120,17 @@ static void set_local_option(struct connectdata *, int cmd, int option);
static void set_remote_option(struct connectdata *, int cmd, int option);
static void printsub(struct SessionHandle *data,
- int direction, unsigned char *pointer,
+ int direction, unsigned char *pointer,
size_t length);
static void suboption(struct connectdata *);
/* For negotiation compliant to RFC 1143 */
-#define CURL_NO 0
-#define CURL_YES 1
-#define CURL_WANTYES 2
-#define CURL_WANTNO 3
+#define CURL_NO 0
+#define CURL_YES 1
+#define CURL_WANTYES 2
+#define CURL_WANTNO 3
-#define CURL_EMPTY 0
+#define CURL_EMPTY 0
#define CURL_OPPOSITE 1
/*
@@ -200,7 +200,7 @@ check_wsock2 ( struct SessionHandle *data )
HIBYTE(wsaData.wVersion) != HIBYTE(wVersionRequested)) {
/* Our version isn't supported */
failf(data,"insufficient winsock version to support "
- "telnet");
+ "telnet");
return CURLE_FAILED_INIT;
}
@@ -249,7 +249,7 @@ static void negotiate(struct connectdata *conn)
}
static void printoption(struct SessionHandle *data,
- const char *direction, int cmd, int option)
+ const char *direction, int cmd, int option)
{
const char *fmt;
const char *opt;
@@ -662,9 +662,9 @@ void rec_dont(struct connectdata *conn, int option)
static void printsub(struct SessionHandle *data,
- int direction, /* '<' or '>' */
- unsigned char *pointer, /* where suboption data is */
- size_t length) /* length of suboption data */
+ int direction, /* '<' or '>' */
+ unsigned char *pointer, /* where suboption data is */
+ size_t length) /* length of suboption data */
{
unsigned int i = 0;
@@ -898,8 +898,8 @@ static void suboption(struct connectdata *conn)
static
void telrcv(struct connectdata *conn,
- unsigned char *inbuf, /* Data received from socket */
- ssize_t count) /* Number of bytes received */
+ unsigned char *inbuf, /* Data received from socket */
+ ssize_t count) /* Number of bytes received */
{
unsigned char c;
int in = 0;
@@ -1124,7 +1124,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
create_event_func = GetProcAddress(wsock2,"WSACreateEvent");
if (create_event_func == NULL) {
failf(data,"failed to find WSACreateEvent function (%d)",
- GetLastError());
+ GetLastError());
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
@@ -1133,7 +1133,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
close_event_func = GetProcAddress(wsock2,"WSACloseEvent");
if (create_event_func == NULL) {
failf(data,"failed to find WSACloseEvent function (%d)",
- GetLastError());
+ GetLastError());
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
@@ -1142,7 +1142,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
event_select_func = GetProcAddress(wsock2,"WSAEventSelect");
if (event_select_func == NULL) {
failf(data,"failed to find WSAEventSelect function (%d)",
- GetLastError());
+ GetLastError());
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
@@ -1151,7 +1151,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
enum_netevents_func = GetProcAddress(wsock2,"WSAEnumNetworkEvents");
if (enum_netevents_func == NULL) {
failf(data,"failed to find WSAEnumNetworkEvents function (%d)",
- GetLastError());
+ GetLastError());
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
@@ -1305,7 +1305,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
if (!FreeLibrary(wsock2))
infof(data,"FreeLibrary(wsock2) failed (%d)",GetLastError());
#else
- FD_ZERO (&readfd); /* clear it */
+ FD_ZERO (&readfd); /* clear it */
FD_SET (sockfd, &readfd);
FD_SET (0, &readfd);
@@ -1314,17 +1314,17 @@ CURLcode Curl_telnet(struct connectdata *conn)
while (keepon) {
struct timeval interval;
- readfd = keepfd; /* set this every lap in the loop */
+ readfd = keepfd; /* set this every lap in the loop */
interval.tv_sec = 1;
interval.tv_usec = 0;
switch (select (sockfd + 1, &readfd, NULL, NULL, &interval)) {
- case -1: /* error, stop reading */
+ case -1: /* error, stop reading */
keepon = FALSE;
continue;
- case 0: /* timeout */
+ case 0: /* timeout */
break;
- default: /* read! */
+ default: /* read! */
if(FD_ISSET(0, &readfd)) { /* read from stdin */
unsigned char outbuf[2];
int out_count = 0;
diff --git a/lib/transfer.h b/lib/transfer.h
index 4ebf07532..1b7eb828f 100644
--- a/lib/transfer.h
+++ b/lib/transfer.h
@@ -40,11 +40,11 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp);
/* This sets up a forthcoming transfer */
CURLcode
Curl_Transfer (struct connectdata *data,
- int sockindex, /* socket index to read from or -1 */
- curl_off_t size, /* -1 if unknown at this point */
- bool getheader, /* TRUE if header parsing is wanted */
- curl_off_t *bytecountp, /* return number of bytes read */
- int writesockindex, /* socket index to write to, it may
+ int sockindex, /* socket index to read from or -1 */
+ curl_off_t size, /* -1 if unknown at this point */
+ bool getheader, /* TRUE if header parsing is wanted */
+ curl_off_t *bytecountp, /* return number of bytes read */
+ int writesockindex, /* socket index to write to, it may
very well be the same we read from.
-1 disables */
curl_off_t *writecountp /* return number of bytes written */
diff --git a/lib/url.c b/lib/url.c
index 3673fa576..07d85fd71 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2451,23 +2451,23 @@ static CURLcode CreateConnection(struct SessionHandle *data,
break;
}
}
- nope=strtok_r(NULL, ", ", &no_proxy_tok_buf);
+ nope=strtok_r(NULL, ", ", &no_proxy_tok_buf);
}
if(!nope) {
- /* It was not listed as without proxy */
- char *protop = conn->protostr;
- char *envp = proxy_env;
- char *prox;
+ /* It was not listed as without proxy */
+ char *protop = conn->protostr;
+ char *envp = proxy_env;
+ char *prox;
- /* Now, build <protocol>_proxy and check for such a one to use */
- while(*protop)
- *envp++ = tolower((int)*protop++);
+ /* Now, build <protocol>_proxy and check for such a one to use */
+ while(*protop)
+ *envp++ = tolower((int)*protop++);
- /* append _proxy */
- strcpy(envp, "_proxy");
+ /* append _proxy */
+ strcpy(envp, "_proxy");
- /* read the protocol proxy: */
- prox=curl_getenv(proxy_env);
+ /* read the protocol proxy: */
+ prox=curl_getenv(proxy_env);
/*
* We don't try the uppercase version of HTTP_PROXY because of
@@ -2481,21 +2481,21 @@ static CURLcode CreateConnection(struct SessionHandle *data,
* This can cause 'internal' http/ftp requests to be
* arbitrarily redirected by any external attacker.
*/
- if(!prox && !strequal("http_proxy", proxy_env)) {
+ if(!prox && !strequal("http_proxy", proxy_env)) {
/* There was no lowercase variable, try the uppercase version: */
- for(envp = proxy_env; *envp; envp++)
- *envp = toupper((int)*envp);
- prox=curl_getenv(proxy_env);
- }
-
- if(prox && *prox) { /* don't count "" strings */
- proxy = prox; /* use this */
- }
- else {
- proxy = curl_getenv("all_proxy"); /* default proxy to use */
- if(!proxy)
+ for(envp = proxy_env; *envp; envp++)
+ *envp = toupper((int)*envp);
+ prox=curl_getenv(proxy_env);
+ }
+
+ if(prox && *prox) { /* don't count "" strings */
+ proxy = prox; /* use this */
+ }
+ else {
+ proxy = curl_getenv("all_proxy"); /* default proxy to use */
+ if(!proxy)
proxy=curl_getenv("ALL_PROXY");
- }
+ }
if(proxy && *proxy) {
/* we have a proxy here to set */
@@ -2652,7 +2652,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
if (isdigit((int)conn->path[1])) {
conn->path = strchr(&conn->path[1], '/');
if (conn->path == NULL)
- conn->path = conn->pathbuffer;
+ conn->path = conn->pathbuffer;
}
conn->protocol |= PROT_GOPHER;
conn->curl_do = Curl_http;
@@ -2728,16 +2728,16 @@ static CURLcode CreateConnection(struct SessionHandle *data,
command = toupper((int)type[6]);
switch(command) {
case 'A': /* ASCII mode */
- data->set.ftp_ascii = 1;
- break;
+ data->set.ftp_ascii = 1;
+ break;
case 'D': /* directory mode */
- data->set.ftp_list_only = 1;
- break;
+ data->set.ftp_list_only = 1;
+ break;
case 'I': /* binary mode */
default:
- /* switch off ASCII */
- data->set.ftp_ascii = 0;
- break;
+ /* switch off ASCII */
+ data->set.ftp_ascii = 0;
+ break;
}
}
#else /* CURL_DISABLE_FTP */
@@ -3162,7 +3162,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
infof(data, "Re-using existing connection! (#%ld) with host %s\n",
conn->connectindex,
- conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
+ conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
}
else {
/*
@@ -3523,7 +3523,7 @@ CURLcode Curl_done(struct connectdata **connp,
else
infof(data, "Connection #%ld to host %s left intact\n",
conn->connectindex,
- conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
+ conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
return result;
}
diff --git a/lib/urldata.h b/lib/urldata.h
index ae2642ee7..08db4d60e 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -78,7 +78,7 @@
#include "timeval.h"
#ifdef HAVE_ZLIB_H
-#include <zlib.h> /* for content-encoding */
+#include <zlib.h> /* for content-encoding */
#endif
#ifdef USE_ARES
@@ -151,8 +151,8 @@ struct ssl_config_data {
char *egdsocket; /* path to file containing the EGD daemon socket */
char *cipher_list; /* list of ciphers to use */
long numsessions; /* SSL session id cache size */
- curl_ssl_ctx_callback fsslctx; /* function to initialize ssl ctx */
- void *fsslctxp; /*parameter for call back */
+ curl_ssl_ctx_callback fsslctx; /* function to initialize ssl ctx */
+ void *fsslctxp; /*parameter for call back */
};
/* information stored about one single SSL session */
@@ -342,27 +342,27 @@ struct Curl_transfer_keeper {
curl_off_t writebytecount; /* number of bytes written */
struct timeval start; /* transfer started at this time */
struct timeval now; /* current time */
- bool header; /* incoming data has HTTP header */
+ bool header; /* incoming data has HTTP header */
enum {
HEADER_NORMAL, /* no bad header at all */
HEADER_PARTHEADER, /* part of the chunk is a bad header, the rest
is normal data */
HEADER_ALLBAD /* all was believed to be header */
- } badheader; /* the header was deemed bad and will be
+ } badheader; /* the header was deemed bad and will be
written as body */
- int headerline; /* counts header lines to better track the
+ int headerline; /* counts header lines to better track the
first one */
- char *hbufp; /* points at *end* of header line */
+ char *hbufp; /* points at *end* of header line */
size_t hbuflen;
- char *str; /* within buf */
- char *str_start; /* within buf */
- char *end_ptr; /* within buf */
- char *p; /* within headerbuff */
- bool content_range; /* set TRUE if Content-Range: was found */
- curl_off_t offset; /* possible resume offset read from the
+ char *str; /* within buf */
+ char *str_start; /* within buf */
+ char *end_ptr; /* within buf */
+ char *p; /* within headerbuff */
+ bool content_range; /* set TRUE if Content-Range: was found */
+ curl_off_t offset; /* possible resume offset read from the
Content-Range: header */
- int httpcode; /* error code from the 'HTTP/1.? XXX' line */
- int httpversion; /* the HTTP version*10 */
+ int httpcode; /* error code from the 'HTTP/1.? XXX' line */
+ int httpversion; /* the HTTP version*10 */
struct timeval start100; /* time stamp to wait for the 100 code from */
bool write_after_100_header; /* TRUE = we enable the write after we
received a 100-continue/timeout or
@@ -370,17 +370,17 @@ struct Curl_transfer_keeper {
bool wait100_after_headers; /* TRUE = after the request-headers have been
sent off properly, we go into the wait100
state, FALSE = don't */
- int content_encoding; /* What content encoding. sec 3.5, RFC2616. */
+ int content_encoding; /* What content encoding. sec 3.5, RFC2616. */
-#define IDENTITY 0 /* No encoding */
-#define DEFLATE 1 /* zlib delfate [RFC 1950 & 1951] */
-#define GZIP 2 /* gzip algorithm [RFC 1952] */
-#define COMPRESS 3 /* Not handled, added for completeness */
+#define IDENTITY 0 /* No encoding */
+#define DEFLATE 1 /* zlib delfate [RFC 1950 & 1951] */
+#define GZIP 2 /* gzip algorithm [RFC 1952] */
+#define COMPRESS 3 /* Not handled, added for completeness */
#ifdef HAVE_LIBZ
- bool zlib_init; /* True if zlib already initialized;
- undefined if Content-Encoding header. */
- z_stream z; /* State structure for zlib. */
+ bool zlib_init; /* True if zlib already initialized;
+ undefined if Content-Encoding header. */
+ z_stream z; /* State structure for zlib. */
#endif
time_t timeofdoc;
@@ -519,8 +519,8 @@ struct connectdata {
/**** curl_get() phase fields */
/* READ stuff */
- curl_socket_t sockfd; /* socket to read from or CURL_SOCKET_BAD */
- curl_off_t size; /* -1 if unknown at this point */
+ curl_socket_t sockfd; /* socket to read from or CURL_SOCKET_BAD */
+ curl_off_t size; /* -1 if unknown at this point */
curl_off_t *bytecountp; /* return number of bytes read or NULL */
/* WRITE stuff */
@@ -543,7 +543,7 @@ struct connectdata {
} allocptr;
char *newurl; /* This can only be set if a Location: was in the
- document headers */
+ document headers */
#ifdef HAVE_KRB4
enum protection_level command_prot;