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.
This commit is contained in:
Yang Tse 2010-02-22 18:56:29 +00:00
parent 693abbae3a
commit 439f62bfa8
9 changed files with 56 additions and 92 deletions

View file

@ -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);
}
/*

View file

@ -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

View file

@ -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)

View file

@ -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 */