diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:10 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:10 +0000 |
commit | c32c3c99a1e1d395c88e901de200c21b9ca1e84f (patch) | |
tree | e272e1dc395df2947314ff24f0f9ce12b94f8f53 /src/base64.c | |
parent | 431918ceacfd5a580d4f28a8ae6077c9bbc44b99 (diff) |
Made all protocol modules able to be compiled via mostly constifying strings.
Due to the above, also had to constify strings in many other areas.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1202 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/base64.c')
-rw-r--r-- | src/base64.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/base64.c b/src/base64.c index 10b2f0254..2c78a9703 100644 --- a/src/base64.c +++ b/src/base64.c @@ -6,8 +6,8 @@ * Please read COPYING and README for further details. * * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * + * Based on the original code of Services by Andy Church. + * * */ @@ -88,9 +88,9 @@ static const char Pad64 = '='; end of the data is performed using the '=' character. Since all base64 input is an integral number of octets, only the - ------------------------------------------------- + ------------------------------------------------- following cases can arise: - + (1) the final quantum of encoding input is an integral multiple of 24 bits; here, the final unit of encoded output will be an integral multiple of 4 characters @@ -162,7 +162,7 @@ int b64_encode(char *src, size_t srclength, char *target, size_t targsize) it returns the number of data bytes stored at the target, or -1 on error. */ -int b64_decode(char *src, char *target, size_t targsize) +int b64_decode(const char *src, char *target, size_t targsize) { int tarindex, state, ch; char *pos; @@ -301,7 +301,7 @@ char *encode_ip(unsigned char *ip) return buf; } -int decode_ip(char *buf) +int decode_ip(const char *buf) { int len = strlen(buf); char targ[25]; @@ -351,8 +351,8 @@ char base64_to_int6_map[] = { static char *int_to_base64(long val) { - /* 32/6 == max 6 bytes for representation, - * +1 for the null, +1 for byte boundaries + /* 32/6 == max 6 bytes for representation, + * +1 for the null, +1 for byte boundaries */ static char base64buf[8]; long i = 7; @@ -391,7 +391,7 @@ static long base64_to_int(char *b64) return v; } -long base64dects(char *ts) +long base64dects(const char *ts) { char *token; long value; |