-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmdbuf.h
More file actions
31 lines (24 loc) · 672 Bytes
/
Copy pathmdbuf.h
File metadata and controls
31 lines (24 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef MDBUF_H
#define MDBUF_H
/*
* mdbuf.h - a dbuf like memory mapped object functions.
*
* include LICENSE
*/
#include <dbuf.h>
#include <mutil.h>
typedef struct _MDbuf MDbuf;
struct _MDbuf {
DBuf parent;
char *filename; /* the name of the file to open */
char *addr; /* addr returned by mmap */
size_t size; /* size of the data file */
int status; /* op status, 0 = OK */
};
/*
* prototypes
*/
MDbuf *mdbuf_new( const char *filename, int openflags );
void mdbuf_construct( MDbuf *dbuf, const char *filename, int openflags );
void mdbuf_destroy(void *dbuf);
#endif /* MDBUF_H */