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.

17 lines
394 B
C

22 years ago
#include <assert.h>
#include "iob.h"
#include "buffer.h"
22 years ago
main() {
int64 fd;
io_batch* b;
assert(io_readfile(&fd,"GNUmakefile"));
assert(b=iob_new(10));
assert(iob_addbuf(b,"Huhu",4));
assert(iob_addbuf(b," fnord\n",7));
assert(iob_addfile(b,fd,10,10));
buffer_puts(buffer_2,"iob_send returned ");
buffer_putlong(buffer_2,iob_send(1,b));
buffer_putsflush(buffer_2,".\n");
22 years ago
}