# HG changeset patch # User alex # Date 1052074659 0 # Node ID 76b1c7d20da896a558dc8e9664e42bf163de8919 # Parent f4d6cf8c6c9349d8c4c5916d863fc484343cb4a5 corrected the sample code diff -r f4d6cf8c6c93 -r 76b1c7d20da8 DOCS/tech/mpcf.txt --- a/DOCS/tech/mpcf.txt Sun May 04 11:03:02 2003 +0000 +++ b/DOCS/tech/mpcf.txt Sun May 04 18:57:39 2003 +0000 @@ -540,7 +540,7 @@ return val; } -static inline uint64_t get_v(ByteStream *bc){ +static inline uint64_t get_v(BufferContext *bc){ uint64_t val= 0; for(; spaceLeft(bc) > 0; ){ @@ -554,7 +554,7 @@ return -1; } -static inline int put_v(ByteStream *bc, uint64_t val){ +static inline int put_v(BufferContext *bc, uint64_t val){ int i; if(spaceLeft(bc) < 9) return -1; @@ -572,12 +572,12 @@ return 0; } -static inline int put_s(ByteStream *bc, uint64_t val){ +static inline int put_s(BufferContext *bc, uint64_t val){ if(val<=0) return put_v(bc, -2*val ); else return put_v(bc, 2*val-1); } -static inline int64_t get_s(ByteStream *bc){ +static inline int64_t get_s(BufferContext *bc){ int64_t v= get_v(bc) + 1; if(v&1) return -(v>>1); else return (v>>1);