From 68122955675e2b7a5652760d609b91eec34b80b7 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 23 Dec 2013 19:51:14 +0100 Subject: rb: t_rb has been renamed to rb_t t_rb will be kept in the source files for backward compatibility. However, it will not have to be used anymore. --- src/rb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/rb.c') diff --git a/src/rb.c b/src/rb.c index a04d0cf..d8a801c 100644 --- a/src/rb.c +++ b/src/rb.c @@ -6,7 +6,7 @@ #define MAX(_x1, _x2) (((_x1) > (_x2)) ? (_x1) : (_x2)) #define MIN(_x1, _x2) (((_x1) < (_x2)) ? (_x1) : (_x2)) -int rb_init(t_rb *rb) +int rb_init(rb_t *rb) { rb->off_r = 0; rb->off_w = 0; @@ -15,11 +15,11 @@ int rb_init(t_rb *rb) return 0; } -t_rb *rb_new(void) +rb_t *rb_new(void) { - t_rb *rb; + rb_t *rb; - if ((rb = malloc(sizeof(t_rb))) == NULL) { + if ((rb = malloc(sizeof(rb_t))) == NULL) { return NULL; } @@ -28,13 +28,13 @@ t_rb *rb_new(void) return rb; } -void rb_delete(t_rb **rb) +void rb_delete(rb_t **rb) { free(*rb); *rb = NULL; } -t_rb *rb_put(t_rb *rb, const void *src, size_t n) +rb_t *rb_put(rb_t *rb, const void *src, size_t n) { size_t size; @@ -83,7 +83,7 @@ t_rb *rb_put(t_rb *rb, const void *src, size_t n) return rb; } -size_t rb_get(t_rb *rb, void *dest, size_t n) +size_t rb_get(rb_t *rb, void *dest, size_t n) { size_t size = rb_peek(rb, dest, n); @@ -98,7 +98,7 @@ size_t rb_get(t_rb *rb, void *dest, size_t n) return size; } -size_t rb_peek(const t_rb *rb, void *dest, size_t n) +size_t rb_peek(const rb_t *rb, void *dest, size_t n) { uint16_t offset; size_t size; -- cgit v1.2.3