summaryrefslogtreecommitdiff
path: root/lib/inet_pton.c
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/inet_pton.c
parent5c7dcc6c33bb9e9621cf09ada4a15f310cf1c0e0 (diff)
downloadcurl-39af394a1c3ae1d8ac71ad263a7c524988702c2e.tar.gz
removed tabs and trailing whitespace from source
Diffstat (limited to 'lib/inet_pton.c')
-rw-r--r--lib/inet_pton.c48
1 files changed, 24 insertions, 24 deletions
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);
}