You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <buffer.h>
|
|
#include <mmap.h>
|
|
|
|
static ssize_t op() {
|
|
return 0;
|
|
}
|
|
|
|
int buffer_mmapread(buffer* b,const char* filename) {
|
|
if (!(b->x=mmap_read(filename,&b->n))) return -1;
|
|
b->p=0; b->a=b->n;
|
|
b->fd=-1;
|
|
b->op=op;
|
|
b->deinit=buffer_munmap;
|
|
return 0;
|
|
}
|