#ifndef KRINGBUF_H
#define KRINGBUF_H

#include <stddef.h>

#define PTY_BUFFER_SIZE 1024

typedef struct {
    char data[PTY_BUFFER_SIZE];
    size_t head;
    size_t tail;
} ring_buf_t;

void ring_buf_init(ring_buf_t* rb);
int ring_buf_is_empty(ring_buf_t* rb);
int ring_buf_is_full(ring_buf_t* rb);
int ring_buf_write(ring_buf_t *buf, char c);
int ring_buf_read(ring_buf_t *buf, char *c);

#endif