Files
mars-libowfat/buffer/buffer_init_read.c
leitner b7b8a0efc1 gcc 15 and C23 force some union trickery on buffer.h :-(
add a few buffer_init*_forread variants to pretend we have type safety
  make sure buffer_init_staticcontents handles flushing attempts
2025-04-22 09:32:03 +00:00

10 lines
198 B
C

#include <unistd.h>
#include <libowfat/buffer.h>
int buffer_init_read(buffer* b, int fd, char* y,size_t ylen) {
if (fd==-1) return -1;
buffer_init_forread(b, read, fd, y, ylen);
return 0;
}