aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-02-22 18:56:29 +0000
committerYang Tse <yangsita@gmail.com>2010-02-22 18:56:29 +0000
commit439f62bfa8fff1b6370c286f4e06775aa81661bc (patch)
tree2b63d28f849d4b9dce83325af286b6b4010c40e0 /lib
parent693abbae3a20eaadc36759b89722fd2d38b95004 (diff)
convert Curl_ultous() and Curl_ultouc() functions to curlx_ultous() and
curlx_ultouc(), exposing them through curlx.h to allow proper code reuse later in our test harness.
Diffstat (limited to 'lib')
-rw-r--r--lib/base64.c6
-rw-r--r--lib/curlx.h7
-rw-r--r--lib/warnless.c4
-rw-r--r--lib/warnless.h4
4 files changed, 14 insertions, 7 deletions
diff --git a/lib/base64.c b/lib/base64.c
index fd0340dd3..2361d9e75 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -71,11 +71,11 @@ static void decodeQuantum(unsigned char *dest, const char *src)
x = (x << 6);
}
- dest[2] = Curl_ultouc(x);
+ dest[2] = curlx_ultouc(x);
x >>= 8;
- dest[1] = Curl_ultouc(x);
+ dest[1] = curlx_ultouc(x);
x >>= 8;
- dest[0] = Curl_ultouc(x);
+ dest[0] = curlx_ultouc(x);
}
/*
diff --git a/lib/curlx.h b/lib/curlx.h
index 1e03a05fc..1f84e6d0a 100644
--- a/lib/curlx.h
+++ b/lib/curlx.h
@@ -56,6 +56,13 @@
#include "nonblock.h"
/* "nonblock.h" provides curlx_nonblock() */
+#include "warnless.h"
+/* "warnless.h" provides functions:
+
+ curlx_ultous()
+ curlx_ultouc()
+*/
+
/* Now setup curlx_ * names for the functions that are to become curlx_ and
be removed from a future libcurl official API:
curlx_getenv
diff --git a/lib/warnless.c b/lib/warnless.c
index 94e77de46..ffbcaa3f1 100644
--- a/lib/warnless.c
+++ b/lib/warnless.c
@@ -25,7 +25,7 @@
#include "warnless.h"
-unsigned short Curl_ultous(unsigned long ulnum)
+unsigned short curlx_ultous(unsigned long ulnum)
{
#ifdef __INTEL_COMPILER
# pragma warning(push)
@@ -39,7 +39,7 @@ unsigned short Curl_ultous(unsigned long ulnum)
#endif
}
-unsigned char Curl_ultouc(unsigned long ulnum)
+unsigned char curlx_ultouc(unsigned long ulnum)
{
#ifdef __INTEL_COMPILER
# pragma warning(push)
diff --git a/lib/warnless.h b/lib/warnless.h
index d8734910a..0976088cd 100644
--- a/lib/warnless.h
+++ b/lib/warnless.h
@@ -23,8 +23,8 @@
* $Id$
***************************************************************************/
-unsigned short Curl_ultous(unsigned long ulnum);
+unsigned short curlx_ultous(unsigned long ulnum);
-unsigned char Curl_ultouc(unsigned long ulnum);
+unsigned char curlx_ultouc(unsigned long ulnum);
#endif /* HEADER_CURL_WARNLESS_H */