3 * common declarations for readbuffer/writebuffer
5 * readbuffer and writebuffer are:
6 * Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
8 * readbuffer is part of chiark backup, a system for backing up GNU/Linux and
9 * other UN*X-compatible machines, as used on chiark.greenend.org.uk.
11 * Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
12 * Copyright (C) 1999 Peter Maydell <pmaydell@chiark.greenend.org.uk>
14 * This is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 3,
17 * or (at your option) any later version.
19 * This is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public
25 * License along with this file; if not, consult the Free Software
26 * Foundation's website at www.fsf.org, or the GNU Project website at
35 #include <sys/types.h>
45 #include <sys/socket.h>
46 #include <netinet/in.h>
47 #include <arpa/inet.h>
54 int min(int a, int b);
55 void callselect(void);
56 void startup(const char *const *argv);
57 void startupcore(void);
58 void *xmalloc(size_t sz);
59 void nonblock(int fd, int yesno);
61 extern const char *progname; /* must be defined by main .c file */
63 extern unsigned char *buf, *wp, *rp;
64 extern int used, seeneof, maxselfd;
65 extern size_t buffersize;
66 extern fd_set readfds;
67 extern fd_set writefds;
70 void wrbufcore_startup(void);
71 void wrbufcore_prepselect(int rdfd, int wrfd);
72 void wrbufcore_afterselect(int rdfd, int wrfd);
73 void fdsetset(int fd, fd_set *set);
74 void wrbuf_report(const char *m);