summaryrefslogtreecommitdiff
path: root/src/rb.c
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2013-12-23 19:51:14 +0100
committerOlivier Gayot <duskcoder@gmail.com>2014-01-18 13:44:28 +0100
commit68122955675e2b7a5652760d609b91eec34b80b7 (patch)
tree1d5b6ae1a5f15905b190177bf3b11319ab5be1ed /src/rb.c
parent646515d288da8aec7dc266f7d30047320b271742 (diff)
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.
Diffstat (limited to 'src/rb.c')
-rw-r--r--src/rb.c16
1 files changed, 8 insertions, 8 deletions
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;