File: buffer.c

package info (click to toggle)
dq 20251001-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,376 kB
  • sloc: ansic: 13,644; python: 651; makefile: 382; sh: 336
file content (11 lines) | stat: -rw-r--r-- 222 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#include "buffer.h"

void buffer_init(buffer *s, long long (*op)(int, char *, long long), int fd, char *buf, long long len) {

    s->x  = buf;
    s->fd = fd;
    s->op = op;
    s->p  = 0;
    s->n  = len;
    return;
}