3 * This program simply feeds its standard input to the networker. It is
4 * used primarily to hook up to UUCP feeds of Citadel data.
10 * -z Input is compressed, run uncompress on it before processing
11 * -s Don't run netproc now, just accept the input into spoolin
14 #define UNCOMPRESS "/usr/bin/gunzip"
24 void get_config(void);
27 int main(int argc, char **argv)
30 char flnm[128],tname[128];
32 char compressed_input = 0;
36 sprintf(flnm,"./network/spoolin/rcit.%ld", (long)getpid());
37 strcpy(tname, tmpnam(NULL));
39 for (a=1; a<argc; ++a) {
40 if (!strcmp(argv[a],"-z")) compressed_input = 1;
41 if (!strcmp(argv[a],"-s")) spool_only = 1;
45 if (compressed_input) minput=popen(UNCOMPRESS,"r");
46 if (minput==NULL) fprintf(stderr,"rnews: can't open input!!!!\n");
49 while ((a=getc(minput))>=0) putc(a,mout);
54 if (compressed_input) pclose(minput);
55 if (!spool_only) execlp("./netproc", "netproc", "-i", NULL);