diff options
author | Runxi Yu <me@runxiyu.org> | 2025-08-12 11:01:07 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-09-15 15:19:12 +0800 |
commit | eb82fdb2dc0903e6125014abd64aceab42c8eb35 (patch) | |
tree | c07276ba1595c415ebc28943163d88f3e3180254 /git2d/bare.h | |
parent | Remove forge-specific functions from misc (diff) | |
download | forge-eb82fdb2dc0903e6125014abd64aceab42c8eb35.tar.gz forge-eb82fdb2dc0903e6125014abd64aceab42c8eb35.tar.zst forge-eb82fdb2dc0903e6125014abd64aceab42c8eb35.zip |
Diffstat (limited to 'git2d/bare.h')
-rw-r--r-- | git2d/bare.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/git2d/bare.h b/git2d/bare.h index e813464..e049dd0 100644 --- a/git2d/bare.h +++ b/git2d/bare.h @@ -17,8 +17,8 @@ typedef enum { BARE_ERROR_INVALID_UTF8, } bare_error; -typedef bare_error (*bare_write_func)(void *buffer, const void *src, uint64_t sz); -typedef bare_error (*bare_read_func)(void *buffer, void *dst, uint64_t sz); +typedef bare_error(*bare_write_func) (void *buffer, const void *src, uint64_t sz); +typedef bare_error(*bare_read_func) (void *buffer, void *dst, uint64_t sz); struct bare_writer { void *buffer; @@ -30,27 +30,27 @@ struct bare_reader { bare_read_func read; }; -bare_error bare_put_uint(struct bare_writer *ctx, uint64_t x); /* varuint */ -bare_error bare_get_uint(struct bare_reader *ctx, uint64_t *x); /* varuint */ +bare_error bare_put_uint(struct bare_writer *ctx, uint64_t x); /* varuint */ +bare_error bare_get_uint(struct bare_reader *ctx, uint64_t * x); /* varuint */ bare_error bare_put_u8(struct bare_writer *ctx, uint8_t x); -bare_error bare_get_u8(struct bare_reader *ctx, uint8_t *x); +bare_error bare_get_u8(struct bare_reader *ctx, uint8_t * x); bare_error bare_put_u16(struct bare_writer *ctx, uint16_t x); -bare_error bare_get_u16(struct bare_reader *ctx, uint16_t *x); +bare_error bare_get_u16(struct bare_reader *ctx, uint16_t * x); bare_error bare_put_u32(struct bare_writer *ctx, uint32_t x); -bare_error bare_get_u32(struct bare_reader *ctx, uint32_t *x); +bare_error bare_get_u32(struct bare_reader *ctx, uint32_t * x); bare_error bare_put_u64(struct bare_writer *ctx, uint64_t x); -bare_error bare_get_u64(struct bare_reader *ctx, uint64_t *x); +bare_error bare_get_u64(struct bare_reader *ctx, uint64_t * x); -bare_error bare_put_int(struct bare_writer *ctx, int64_t x); /* varint */ -bare_error bare_get_int(struct bare_reader *ctx, int64_t *x); /* varint */ +bare_error bare_put_int(struct bare_writer *ctx, int64_t x); /* varint */ +bare_error bare_get_int(struct bare_reader *ctx, int64_t * x); /* varint */ bare_error bare_put_i8(struct bare_writer *ctx, int8_t x); -bare_error bare_get_i8(struct bare_reader *ctx, int8_t *x); +bare_error bare_get_i8(struct bare_reader *ctx, int8_t * x); bare_error bare_put_i16(struct bare_writer *ctx, int16_t x); -bare_error bare_get_i16(struct bare_reader *ctx, int16_t *x); +bare_error bare_get_i16(struct bare_reader *ctx, int16_t * x); bare_error bare_put_i32(struct bare_writer *ctx, int32_t x); -bare_error bare_get_i32(struct bare_reader *ctx, int32_t *x); +bare_error bare_get_i32(struct bare_reader *ctx, int32_t * x); bare_error bare_put_i64(struct bare_writer *ctx, int64_t x); -bare_error bare_get_i64(struct bare_reader *ctx, int64_t *x); +bare_error bare_get_i64(struct bare_reader *ctx, int64_t * x); bare_error bare_put_f32(struct bare_writer *ctx, float x); bare_error bare_get_f32(struct bare_reader *ctx, float *x); @@ -60,13 +60,13 @@ bare_error bare_get_f64(struct bare_reader *ctx, double *x); bare_error bare_put_bool(struct bare_writer *ctx, bool x); bare_error bare_get_bool(struct bare_reader *ctx, bool *x); -bare_error bare_put_fixed_data(struct bare_writer *ctx, const uint8_t *src, uint64_t sz); -bare_error bare_get_fixed_data(struct bare_reader *ctx, uint8_t *dst, uint64_t sz); -bare_error bare_put_data(struct bare_writer *ctx, const uint8_t *src, uint64_t sz); -bare_error bare_get_data(struct bare_reader *ctx, uint8_t *dst, uint64_t sz); +bare_error bare_put_fixed_data(struct bare_writer *ctx, const uint8_t * src, uint64_t sz); +bare_error bare_get_fixed_data(struct bare_reader *ctx, uint8_t * dst, uint64_t sz); +bare_error bare_put_data(struct bare_writer *ctx, const uint8_t * src, uint64_t sz); +bare_error bare_get_data(struct bare_reader *ctx, uint8_t * dst, uint64_t sz); bare_error bare_put_str(struct bare_writer *ctx, const char *src, uint64_t sz); bare_error bare_get_str(struct bare_reader *ctx, char *dst, uint64_t sz); /* Note that the _str implementation here does not check for UTF-8 validity. */ -#endif /* BARE_H */ +#endif /* BARE_H */ |