Hide struct io and implementation of struct ioqueue

Move struct io and struct ioqueue from ioqueue.h to ioqueue.c.
Declare incomplete struct ioqueue in ioqueue.h.
This commit is contained in:
Markus Armbruster 2009-04-26 07:43:47 +02:00
parent 6f6c90d406
commit 55c53b9add
2 changed files with 15 additions and 14 deletions

View file

@ -35,21 +35,8 @@
#define IOQUEUE_H
#include <sys/uio.h>
#include "queue.h"
struct io {
struct emp_qelem queue;
int size;
int nbytes;
int offset;
char *data;
};
struct ioqueue {
struct io list;
int bufsize;
int cc;
};
struct ioqueue;
extern struct ioqueue *ioq_create(int size);
extern void ioq_destroy(struct ioqueue *ioq);

View file

@ -46,6 +46,20 @@
#include "misc.h"
#include "queue.h"
struct io {
struct emp_qelem queue;
int size;
int nbytes;
int offset;
char *data;
};
struct ioqueue {
struct io list;
int bufsize;
int cc;
};
static int ioqtocbuf(struct ioqueue *ioq, char *buf, int cc, int stopc);
static int ioqtoiov(struct ioqueue *ioq, struct iovec *iov, int max);
static int ioqtobuf(struct ioqueue *ioq, char *buf, int cc);