-/**/
+/*
+ * writebuffer.c
+ *
+ * Copyright (C) 1997,1998 Ian Jackson <ian@chiark.greenend.org.uk>
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2,
+ * or (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this file; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
#include <sys/time.h>
#include <sys/types.h>
if (fcntl(fd,F_SETFL,r) == -1) { perror("fcntl setfl"); exit(1); }
}
-int main(void) {
+int main(int argc, const char *const *argv) {
static unsigned char buf[BUFFER];
+ if (argv[1]) {
+ fputs("readbuffer: no arguments allowed\n", stderr);
+ exit(-1);
+ }
+
unsigned char *wp, *rp;
int used,r,writing,seeneof;
fd_set readfds;