summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Kramm <kramm@quiss.org>2011-09-22 14:45:41 -0700
committerMatthias Kramm <kramm@quiss.org>2011-09-22 14:45:41 -0700
commit67f3b0f10e901823c835b0bf0db4df21ec2c0db1 (patch)
tree6e2f48eeb64996b7538b2aec872629debc2205db /lib
parent30c3a7a163e3f3ef534dea3f203752d295a0dc58 (diff)
removed remaining int32 instances from bitio.c
Diffstat (limited to 'lib')
-rw-r--r--lib/bitio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/bitio.c b/lib/bitio.c
index 923759aa..b03e6498 100644
--- a/lib/bitio.c
+++ b/lib/bitio.c
@@ -813,20 +813,20 @@ char*reader_readString(reader_t*r)
g.finish(&g);
return string;
}
-uint32_t read_compressed_uint(reader_t*r)
+unsigned int read_compressed_uint(reader_t*r)
{
- uint32_t u = 0;
- uint32_t b;
+ unsigned int u = 0;
+ unsigned int b;
do {
b = reader_readU8(r);
u = u<<7|b&0x7f;
} while(b&0x80);
return u;
}
-int32_t read_compressed_int(reader_t*r)
+int read_compressed_int(reader_t*r)
{
- int32_t i = 0;
- int32_t b;
+ int i = 0;
+ int b;
b = reader_readS8(r);
i = b&0x7f;
@@ -913,7 +913,7 @@ void writer_writeDouble(writer_t*w, double f)
w->write(w, &b7, 1);
w->write(w, &b8, 1);
}
-void write_compressed_uint(writer_t*w, uint32_t u)
+void write_compressed_uint(writer_t*w, unsigned int u)
{
if(u<0x80) {
writer_writeU8(w, u);
@@ -937,7 +937,7 @@ void write_compressed_uint(writer_t*w, uint32_t u)
writer_writeU8(w, u&0x7f);
}
}
-void write_compressed_int(writer_t*w, int32_t i)
+void write_compressed_int(writer_t*w, int i)
{
if(i>=-0x40 && i<0x40) {
writer_writeU8(w, i&0x7f);