Files
cworker/clib/rcache.h
2023-08-31 03:26:16 +02:00

27 lines
418 B
C

/*
*
* Copyright 2023 Oleg Borodin <borodin@unix7.org>
*
*/
#ifndef RCACHE_H_QWERTY
#define RCACHE_H_QWERTY
#include <stdint.h>
#include <unistd.h>
typedef struct {
size_t rpos;
size_t wpos;
size_t capa;
uint8_t* data;
int fd;
} rcache_t;
rcache_t* rcache_init(rcache_t* cache, int fd);
char rcache_getc(rcache_t* cache);
void rcache_destroy(rcache_t* cache);
#endif