X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/6d4e718f5fecd4e02e5958f477922e9bec8a4559..d858b27400eba6301a25d5cb34330e7748bcf772:/io.h diff --git a/io.h b/io.h index 360a9479..ef72bcb9 100644 --- a/io.h +++ b/io.h @@ -18,18 +18,35 @@ extern int protocol_version; static inline int32 -read_abbrevint30(int f) +read_varint30(int f) { if (protocol_version < 30) return read_int(f); - return read_abbrevint(f); + return read_varint(f); +} + +static inline int64 +read_varlong30(int f, uchar min_bytes) +{ + if (protocol_version < 30) + return read_longint(f); + return read_varlong(f, min_bytes); } static inline void -write_abbrevint30(int f, int32 x) +write_varint30(int f, int32 x) { if (protocol_version < 30) write_int(f, x); else - write_abbrevint(f, x); + write_varint(f, x); +} + +static inline void +write_varlong30(int f, int64 x, uchar min_bytes) +{ + if (protocol_version < 30) + write_longint(f, x); + else + write_varlong(f, x, min_bytes); }