Mercurial > hg > cdb
annotate buffer_0.c @ 10:3bfef1f22a97
trivial changes to get rid of compile-time warnings
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Fri, 31 Jan 2025 15:26:11 +0000 |
| parents | 2cb46628feec |
| children |
| 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 #include "readwrite.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 #include "buffer.h" |
|
2cb46628feec
from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
3 |
|
10
3bfef1f22a97
trivial changes to get rid of compile-time warnings
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
4 ssize_t buffer_0_read(fd,buf,len) int fd; char *buf; int len; |
|
0
2cb46628feec
from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
5 { |
|
2cb46628feec
from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
6 if (buffer_flush(buffer_1) == -1) return -1; |
|
2cb46628feec
from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
7 return read(fd,buf,len); |
|
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 |
|
2cb46628feec
from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
10 char buffer_0_space[BUFFER_INSIZE]; |
|
2cb46628feec
from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
11 static buffer it = BUFFER_INIT(buffer_0_read,0,buffer_0_space,sizeof buffer_0_space); |
|
2cb46628feec
from cdb-0.75 per http://cr.yp.to/cdb.html,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
12 buffer *buffer_0 = ⁢ |
