annotate seek.h @ 16:70f4df5a7283

add cdb_write, log basic mmap outcomes
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Thu, 27 Feb 2025 18:26:29 +0000
parents 3bfef1f22a97
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 #ifndef SEEK_H
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 #define SEEK_H
10
3bfef1f22a97 trivial changes to get rid of compile-time warnings
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 2
diff changeset
3 #include <sys/types.h>
3bfef1f22a97 trivial changes to get rid of compile-time warnings
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 2
diff changeset
4 #include <unistd.h>
2
45f98bfd1dfb use all 32 bits
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
5 #include "uint32.h"
0
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6
2
45f98bfd1dfb use all 32 bits
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
7 typedef uint32 seek_pos;
0
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 extern seek_pos seek_cur(int);
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 extern int seek_set(int,seek_pos);
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12 extern int seek_end(int);
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14 extern int seek_trunc(int,seek_pos);
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
16 #define seek_begin(fd) (seek_set((fd),(seek_pos) 0))
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
17
2cb46628feec from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
18 #endif