diff options
author | Julien Chaffraix <julien.chaffraix@gmail.com> | 2011-02-07 22:12:37 -0800 |
---|---|---|
committer | Julien Chaffraix <julien.chaffraix@gmail.com> | 2011-02-10 07:38:48 -0800 |
commit | 39d0d787d20b29ed57b10477340c7d000041d31d (patch) | |
tree | ba17ec4ce43722fe1b7322f2c8af5a407baf4dfb /lib | |
parent | 3cffcba3d0cf78a2aa17197059f810f5a7ce05a5 (diff) |
test1304: Added some unit tests for Curl_parsenetrc.
Moved some definitons into the header file so that we can reuse them.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/netrc.c | 5 | ||||
-rw-r--r-- | lib/netrc.h | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/netrc.c b/lib/netrc.c index 7e0447d23..b069c8c49 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -61,11 +61,6 @@ enum host_lookup_state { HOSTEND /* LAST enum */ }; -/* make sure we have room for at least this size: */ -#define LOGINSIZE 64 -#define PASSWORDSIZE 64 - -/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */ int Curl_parsenetrc(const char *host, char *login, char *password, diff --git a/lib/netrc.h b/lib/netrc.h index 5406d4c5d..4db764df2 100644 --- a/lib/netrc.h +++ b/lib/netrc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -21,6 +21,12 @@ * KIND, either express or implied. * ***************************************************************************/ + +/* Make sure we have room for at least this size: */ +#define LOGINSIZE 64 +#define PASSWORDSIZE 64 + +/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */ int Curl_parsenetrc(const char *host, char *login, char *password, |