File: buffer_0small.c

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (12 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#include <unistd.h>
#include "buffer.h"

static ssize_t b0read(int fd,char* buf, size_t len) {
  if (buffer_flush(buffer_1small)<0) return -1;
  return read(fd,buf,len);
}

char buffer_0small_space[128];
static buffer it = BUFFER_INIT_READ(b0read,0,buffer_0small_space,sizeof buffer_0small_space);
buffer *buffer_0small = &it;