X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fbase224.c;h=6af7178c3d04f597198c54fdb0fac6a79ec1b3dc;hb=b8667492cf36a609939ee35ac42900ff0b0cc80f;hp=8e5cec3dd60297a4c164e73facb8d03bfda6c5f2;hpb=a4fe009d3366b0a3e119713b0ecc7fc0070efdfa;p=libucw.git diff --git a/ucw/base224.c b/ucw/base224.c index 8e5cec3d..6af7178c 100644 --- a/ucw/base224.c +++ b/ucw/base224.c @@ -25,13 +25,13 @@ #undef LOCAL_DEBUG -#include "ucw/lib.h" -#include "ucw/base224.h" +#include +#include static void encode_block(byte *w, u32 hi, u32 lo) { - uns x, y; + uint x, y; /* * Splitting of the 39-bit block: [a-e][0-5] are the base-32 digits, *'s are used for base-7. @@ -58,11 +58,11 @@ encode_block(byte *w, u32 hi, u32 lo) } } -uns -base224_encode(byte *dest, const byte *src, uns len) +uint +base224_encode(byte *dest, const byte *src, uint len) { u32 lo=0, hi=0; /* 64-bit buffer accumulating input bits */ - uns i=0; /* How many source bits do we have buffered */ + uint i=0; /* How many source bits do we have buffered */ u32 x; byte *w=dest; @@ -95,14 +95,14 @@ base224_encode(byte *dest, const byte *src, uns len) return w - dest; } -uns -base224_decode(byte *dest, const byte *src, uns len) +uint +base224_decode(byte *dest, const byte *src, uint len) { u32 hi=0, lo=0; /* 64-bit buffer accumulating output bits */ - uns i=0; /* How many bits do we have accumulated */ + uint i=0; /* How many bits do we have accumulated */ u32 h, l; /* Decoding of the current block */ - uns x; /* base-7 part of the current block */ - uns len0; + uint x; /* base-7 part of the current block */ + uint len0; byte *start = dest; do