summaryrefslogtreecommitdiffstats
path: root/Base64.c
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2014-12-23 09:22:43 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-23 13:47:29 (GMT)
commit6ed23ff4e9bbf848a77865e6d08c1e8e6074de92 (patch)
tree1e2d0021f54ef1830302d0d5ea47171857fe03d1 /Base64.c
parent1f7de54346142f05aef5814ee16754fba017b521 (diff)
downloadCMake-6ed23ff4e9bbf848a77865e6d08c1e8e6074de92.zip
CMake-6ed23ff4e9bbf848a77865e6d08c1e8e6074de92.tar.gz
CMake-6ed23ff4e9bbf848a77865e6d08c1e8e6074de92.tar.bz2
KWSys 2014-12-23 (5a15cb3b)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 5a15cb3b | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 87c65319..5a15cb3b Brad King (1): 5a15cb3b Base64: Use size_t for lenghts in API Change-Id: I09a2c5d6b67280f96d580c7b26bf8b2aa0bdb709
Diffstat (limited to 'Base64.c')
-rw-r--r--Base64.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/Base64.c b/Base64.c
index d07bdd0..4b8ede2 100644
--- a/Base64.c
+++ b/Base64.c
@@ -115,10 +115,10 @@ void kwsysBase64_Encode1(const unsigned char *src, unsigned char *dest)
actually knowing how much data to expect (if the input is not a multiple of
3 bytes then the extra padding needed to complete the encode 4 bytes will
stop the decoding anyway). */
-unsigned long kwsysBase64_Encode(const unsigned char *input,
- unsigned long length,
- unsigned char *output,
- int mark_end)
+size_t kwsysBase64_Encode(const unsigned char *input,
+ size_t length,
+ unsigned char *output,
+ int mark_end)
{
const unsigned char *ptr = input;
const unsigned char *end = input + length;
@@ -157,7 +157,7 @@ unsigned long kwsysBase64_Encode(const unsigned char *input,
optr += 4;
}
- return (unsigned long)(optr - output);
+ return (size_t)(optr - output);
}
/*--------------------------------------------------------------------------*/
@@ -207,10 +207,10 @@ int kwsysBase64_Decode3(const unsigned char *src, unsigned char *dest)
'length' parameter is ignored. This enables the caller to decode a stream
without actually knowing how much decoded data to expect (of course, the
buffer must be large enough). */
-unsigned long kwsysBase64_Decode(const unsigned char *input,
- unsigned long length,
- unsigned char *output,
- unsigned long max_input_length)
+size_t kwsysBase64_Decode(const unsigned char *input,
+ size_t length,
+ unsigned char *output,
+ size_t max_input_length)
{
const unsigned char *ptr = input;
unsigned char *optr = output;
@@ -226,7 +226,7 @@ unsigned long kwsysBase64_Decode(const unsigned char *input,
optr += len;
if(len < 3)
{
- return (unsigned long)(optr - output);
+ return (size_t)(optr - output);
}
ptr += 4;
}
@@ -240,7 +240,7 @@ unsigned long kwsysBase64_Decode(const unsigned char *input,
optr += len;
if(len < 3)
{
- return (unsigned long)(optr - output);
+ return (size_t)(optr - output);
}
ptr += 4;
}
@@ -275,5 +275,5 @@ unsigned long kwsysBase64_Decode(const unsigned char *input,
}
}
- return (unsigned long)(optr - output);
+ return (size_t)(optr - output);
}