Permalink
Browse files

removed tabs and trailing whitespace from source

  • Loading branch information...
1 parent 5c7dcc6 commit 39af394a1c3ae1d8ac71ad263a7c524988702c2e @bagder bagder committed Oct 6, 2004
Showing with 2,091 additions and 2,095 deletions.
  1. +172 −172 ares/adig.c
  2. +8 −8 ares/ahost.c
  3. +49 −49 ares/ares.h
  4. +58 −58 ares/ares__get_hostent.c
  5. +7 −7 ares/ares__read_line.c
  6. +47 −47 ares/ares_dns.h
  7. +50 −50 ares/ares_expand_name.c
  8. +12 −12 ares/ares_fds.c
  9. +40 −40 ares/ares_gethostbyaddr.c
  10. +58 −58 ares/ares_gethostbyname.c
  11. +88 −88 ares/ares_init.c
  12. +24 −24 ares/ares_mkquery.c
  13. +46 −46 ares/ares_parse_a_reply.c
  14. +55 −55 ares/ares_parse_ptr_reply.c
  15. +7 −7 ares/ares_private.h
  16. +216 −216 ares/ares_process.c
  17. +22 −22 ares/ares_query.c
  18. +73 −73 ares/ares_search.c
  19. +1 −1 ares/ares_send.c
  20. +4 −4 ares/ares_timeout.c
  21. +8 −1 curl-style.el
  22. +2 −2 docs/MANUAL
  23. +286 −286 docs/examples/curlx.c
  24. +198 −198 docs/examples/fopen.c
  25. +12 −12 docs/examples/multi-app.c
  26. +2 −2 include/curl/curl.h
  27. +3 −3 lib/amigaos.c
  28. +4 −4 lib/amigaos.h
  29. +35 −35 lib/config-mac.h
  30. +8 −10 lib/config-vms.h
  31. +3 −3 lib/connect.c
  32. +20 −20 lib/cookie.c
  33. +1 −1 lib/cookie.h
  34. +17 −17 lib/dict.c
  35. +1 −1 lib/file.c
  36. +15 −15 lib/formdata.c
  37. +23 −23 lib/ftp.c
  38. +7 −7 lib/getenv.c
  39. +2 −2 lib/hostares.c
  40. +2 −2 lib/hostasyn.c
  41. +2 −2 lib/hostip.c
  42. +2 −2 lib/hostip4.c
  43. +2 −2 lib/hostip6.c
  44. +7 −7 lib/hostsyn.c
  45. +2 −2 lib/hostthre.c
  46. +6 −6 lib/http.c
  47. +1 −1 lib/http_digest.c
  48. +3 −3 lib/inet_ntop.c
  49. +24 −24 lib/inet_pton.c
  50. +3 −3 lib/krb4.c
  51. +4 −4 lib/ldap.c
  52. +5 −5 lib/memory.h
  53. +49 −49 lib/netrc.c
  54. +1 −1 lib/progress.c
  55. +9 −9 lib/security.c
  56. +8 −8 lib/security.h
  57. +6 −6 lib/sendf.c
  58. +10 −10 lib/speedcheck.c
  59. +3 −3 lib/ssluse.c
  60. +1 −1 lib/strequal.c
  61. +26 −26 lib/telnet.c
  62. +5 −5 lib/transfer.h
  63. +35 −35 lib/url.c
  64. +26 −26 lib/urldata.h
  65. +15 −24 src/config-amigaos.h
  66. +6 −6 src/config-mac.h
  67. +5 −5 src/getpass.c
  68. +10 −10 src/homedir.c
  69. +74 −74 src/main.c
  70. +55 −55 src/urlglob.c
View
Oops, something went wrong.
View
@@ -33,7 +33,7 @@
#include "ares_dns.h"
#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
+#define INADDR_NONE 0xffffffff
#endif
static void callback(void *arg, int status, struct hostent *host);
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
WORD wVersionRequested = MAKEWORD(1,1);
WSADATA wsaData;
WSAStartup(wVersionRequested, &wsaData);
-#endif
+#endif
if (argc <= 1)
usage();
@@ -68,12 +68,12 @@ int main(int argc, char **argv)
{
addr.s_addr = inet_addr(*argv);
if (addr.s_addr == INADDR_NONE)
- ares_gethostbyname(channel, *argv, AF_INET, callback, *argv);
+ ares_gethostbyname(channel, *argv, AF_INET, callback, *argv);
else
- {
- ares_gethostbyaddr(channel, &addr, sizeof(addr), AF_INET, callback,
- *argv);
- }
+ {
+ ares_gethostbyaddr(channel, &addr, sizeof(addr), AF_INET, callback,
+ *argv);
+ }
}
/* Wait for all queries to complete. */
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
FD_ZERO(&write_fds);
nfds = ares_fds(channel, &read_fds, &write_fds);
if (nfds == 0)
- break;
+ break;
tvp = ares_timeout(channel, NULL, &tv);
select(nfds, &read_fds, &write_fds, NULL, tvp);
ares_process(channel, &read_fds, &write_fds);
View
@@ -37,49 +37,49 @@
#include <netinet/in.h>
#endif
-#define ARES_SUCCESS 0
+#define ARES_SUCCESS 0
/* Server error codes (ARES_ENODATA indicates no relevant answer) */
-#define ARES_ENODATA 1
-#define ARES_EFORMERR 2
-#define ARES_ESERVFAIL 3
-#define ARES_ENOTFOUND 4
-#define ARES_ENOTIMP 5
-#define ARES_EREFUSED 6
+#define ARES_ENODATA 1
+#define ARES_EFORMERR 2
+#define ARES_ESERVFAIL 3
+#define ARES_ENOTFOUND 4
+#define ARES_ENOTIMP 5
+#define ARES_EREFUSED 6
/* Locally generated error codes */
-#define ARES_EBADQUERY 7
-#define ARES_EBADNAME 8
-#define ARES_EBADFAMILY 9
-#define ARES_EBADRESP 10
-#define ARES_ECONNREFUSED 11
-#define ARES_ETIMEOUT 12
-#define ARES_EOF 13
-#define ARES_EFILE 14
-#define ARES_ENOMEM 15
-#define ARES_EDESTRUCTION 16
-#define ARES_EBADSTR 17
+#define ARES_EBADQUERY 7
+#define ARES_EBADNAME 8
+#define ARES_EBADFAMILY 9
+#define ARES_EBADRESP 10
+#define ARES_ECONNREFUSED 11
+#define ARES_ETIMEOUT 12
+#define ARES_EOF 13
+#define ARES_EFILE 14
+#define ARES_ENOMEM 15
+#define ARES_EDESTRUCTION 16
+#define ARES_EBADSTR 17
/* Flag values */
-#define ARES_FLAG_USEVC (1 << 0)
-#define ARES_FLAG_PRIMARY (1 << 1)
-#define ARES_FLAG_IGNTC (1 << 2)
-#define ARES_FLAG_NORECURSE (1 << 3)
-#define ARES_FLAG_STAYOPEN (1 << 4)
-#define ARES_FLAG_NOSEARCH (1 << 5)
-#define ARES_FLAG_NOALIASES (1 << 6)
-#define ARES_FLAG_NOCHECKRESP (1 << 7)
+#define ARES_FLAG_USEVC (1 << 0)
+#define ARES_FLAG_PRIMARY (1 << 1)
+#define ARES_FLAG_IGNTC (1 << 2)
+#define ARES_FLAG_NORECURSE (1 << 3)
+#define ARES_FLAG_STAYOPEN (1 << 4)
+#define ARES_FLAG_NOSEARCH (1 << 5)
+#define ARES_FLAG_NOALIASES (1 << 6)
+#define ARES_FLAG_NOCHECKRESP (1 << 7)
/* Option mask values */
-#define ARES_OPT_FLAGS (1 << 0)
-#define ARES_OPT_TIMEOUT (1 << 1)
-#define ARES_OPT_TRIES (1 << 2)
-#define ARES_OPT_NDOTS (1 << 3)
-#define ARES_OPT_UDP_PORT (1 << 4)
-#define ARES_OPT_TCP_PORT (1 << 5)
-#define ARES_OPT_SERVERS (1 << 6)
-#define ARES_OPT_DOMAINS (1 << 7)
-#define ARES_OPT_LOOKUPS (1 << 8)
+#define ARES_OPT_FLAGS (1 << 0)
+#define ARES_OPT_TIMEOUT (1 << 1)
+#define ARES_OPT_TRIES (1 << 2)
+#define ARES_OPT_NDOTS (1 << 3)
+#define ARES_OPT_UDP_PORT (1 << 4)
+#define ARES_OPT_TCP_PORT (1 << 5)
+#define ARES_OPT_SERVERS (1 << 6)
+#define ARES_OPT_DOMAINS (1 << 7)
+#define ARES_OPT_LOOKUPS (1 << 8)
struct ares_options {
int flags;
@@ -100,41 +100,41 @@ struct timeval;
struct ares_channeldata;
typedef struct ares_channeldata *ares_channel;
typedef void (*ares_callback)(void *arg, int status, unsigned char *abuf,
- int alen);
+ int alen);
typedef void (*ares_host_callback)(void *arg, int status,
- struct hostent *hostent);
+ struct hostent *hostent);
int ares_init(ares_channel *channelptr);
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
- int optmask);
+ int optmask);
void ares_destroy(ares_channel channel);
void ares_cancel(ares_channel channel);
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
- ares_callback callback, void *arg);
+ ares_callback callback, void *arg);
void ares_query(ares_channel channel, const char *name, int dnsclass,
- int type, ares_callback callback, void *arg);
+ int type, ares_callback callback, void *arg);
void ares_search(ares_channel channel, const char *name, int dnsclass,
- int type, ares_callback callback, void *arg);
+ int type, ares_callback callback, void *arg);
void ares_gethostbyname(ares_channel channel, const char *name, int family,
- ares_host_callback callback, void *arg);
+ ares_host_callback callback, void *arg);
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
- int family, ares_host_callback callback, void *arg);
+ int family, ares_host_callback callback, void *arg);
int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
- struct timeval *tv);
+ struct timeval *tv);
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
- int rd, unsigned char **buf, int *buflen);
+ int rd, unsigned char **buf, int *buflen);
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
- int alen, char **s, long *enclen);
+ int alen, char **s, long *enclen);
int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf,
- int alen, unsigned char **s, long *enclen);
+ int alen, unsigned char **s, long *enclen);
int ares_parse_a_reply(const unsigned char *abuf, int alen,
- struct hostent **host);
+ struct hostent **host);
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
- int addrlen, int family, struct hostent **host);
+ int addrlen, int family, struct hostent **host);
void ares_free_string(void *str);
void ares_free_hostent(struct hostent *host);
const char *ares_strerror(int code);
@@ -42,96 +42,96 @@ int ares__get_hostent(FILE *fp, struct hostent **host)
{
/* Skip comment lines; terminate line at comment character. */
if (*line == '#' || !*line)
- continue;
+ continue;
p = strchr(line, '#');
if (p)
- *p = 0;
+ *p = 0;
/* Get the address part. */
p = line;
while (*p && !isspace((unsigned char)*p))
- p++;
+ p++;
if (!*p)
- continue;
+ continue;
*p = 0;
addr.s_addr = inet_addr(line);
if (addr.s_addr == INADDR_NONE)
- continue;
+ continue;
/* Get the canonical hostname. */
p++;
while (isspace((unsigned char)*p))
- p++;
+ p++;
if (!*p)
- continue;
+ continue;
q = p;
while (*q && !isspace((unsigned char)*q))
- q++;
+ q++;
end_at_hostname = (*q == 0);
*q = 0;
canonical = p;
naliases = 0;
if (!end_at_hostname)
- {
- /* Count the aliases. */
- p = q + 1;
- while (isspace((unsigned char)*p))
- p++;
- while (*p)
- {
- while (*p && !isspace((unsigned char)*p))
- p++;
- while (isspace((unsigned char)*p))
- p++;
- naliases++;
- }
- }
+ {
+ /* Count the aliases. */
+ p = q + 1;
+ while (isspace((unsigned char)*p))
+ p++;
+ while (*p)
+ {
+ while (*p && !isspace((unsigned char)*p))
+ p++;
+ while (isspace((unsigned char)*p))
+ p++;
+ naliases++;
+ }
+ }
/* Allocate memory for the host structure. */
hostent = malloc(sizeof(struct hostent));
if (!hostent)
- break;
+ break;
hostent->h_aliases = NULL;
hostent->h_addr_list = NULL;
hostent->h_name = strdup(canonical);
if (!hostent->h_name)
- break;
+ break;
hostent->h_addr_list = malloc(2 * sizeof(char *));
if (!hostent->h_addr_list)
- break;
+ break;
hostent->h_addr_list[0] = malloc(sizeof(struct in_addr));
if (!hostent->h_addr_list[0])
- break;
+ break;
hostent->h_aliases = malloc((naliases + 1) * sizeof(char *));
if (!hostent->h_aliases)
- break;
+ break;
/* Copy in aliases. */
naliases = 0;
if (!end_at_hostname)
- {
- p = canonical + strlen(canonical) + 1;
- while (isspace((unsigned char)*p))
- p++;
- while (*p)
- {
- q = p;
- while (*q && !isspace((unsigned char)*q))
- q++;
- hostent->h_aliases[naliases] = malloc(q - p + 1);
- if (hostent->h_aliases[naliases] == NULL)
- break;
- memcpy(hostent->h_aliases[naliases], p, q - p);
- hostent->h_aliases[naliases][q - p] = 0;
- p = q;
- while (isspace((unsigned char)*p))
- p++;
- naliases++;
- }
- if (*p)
- break;
- }
+ {
+ p = canonical + strlen(canonical) + 1;
+ while (isspace((unsigned char)*p))
+ p++;
+ while (*p)
+ {
+ q = p;
+ while (*q && !isspace((unsigned char)*q))
+ q++;
+ hostent->h_aliases[naliases] = malloc(q - p + 1);
+ if (hostent->h_aliases[naliases] == NULL)
+ break;
+ memcpy(hostent->h_aliases[naliases], p, q - p);
+ hostent->h_aliases[naliases][q - p] = 0;
+ p = q;
+ while (isspace((unsigned char)*p))
+ p++;
+ naliases++;
+ }
+ if (*p)
+ break;
+ }
hostent->h_aliases[naliases] = NULL;
hostent->h_addrtype = AF_INET;
@@ -149,22 +149,22 @@ int ares__get_hostent(FILE *fp, struct hostent **host)
{
/* Memory allocation failure; clean up. */
if (hostent)
- {
+ {
if(hostent->h_name)
free((char *) hostent->h_name);
- if (hostent->h_aliases)
- {
- for (alias = hostent->h_aliases; *alias; alias++)
- free(*alias);
- }
+ if (hostent->h_aliases)
+ {
+ for (alias = hostent->h_aliases; *alias; alias++)
+ free(*alias);
+ }
if(hostent->h_aliases)
free(hostent->h_aliases);
- if (hostent->h_addr_list && hostent->h_addr_list[0])
- free(hostent->h_addr_list[0]);
+ if (hostent->h_addr_list && hostent->h_addr_list[0])
+ free(hostent->h_addr_list[0]);
if(hostent->h_addr_list)
free(hostent->h_addr_list);
free(hostent);
- }
+ }
return ARES_ENOMEM;
}
@@ -38,26 +38,26 @@ int ares__read_line(FILE *fp, char **buf, int *bufsize)
{
*buf = malloc(128);
if (!*buf)
- return ARES_ENOMEM;
+ return ARES_ENOMEM;
*bufsize = 128;
}
while (1)
{
if (!fgets(*buf + offset, *bufsize - (int)offset, fp))
- return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
+ return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
len = offset + strlen(*buf + offset);
if ((*buf)[len - 1] == '\n')
- {
- (*buf)[len - 1] = 0;
- return ARES_SUCCESS;
- }
+ {
+ (*buf)[len - 1] = 0;
+ return ARES_SUCCESS;
+ }
offset = len;
/* Allocate more space. */
newbuf = realloc(*buf, *bufsize * 2);
if (!newbuf)
- return ARES_ENOMEM;
+ return ARES_ENOMEM;
*buf = newbuf;
*bufsize *= 2;
}
Oops, something went wrong.

0 comments on commit 39af394

Please sign in to comment.