BSD 4 release
[unix-history] / usr / src / cmd / uucp / uux.c
index a6bd1b9..66df20a 100644 (file)
@@ -135,12 +135,18 @@ char *argv[];
        }
 
        if (pipein) {
        }
 
        if (pipein) {
+               register int c;
+
                gename(DATAPRE, xsys, 'B', dfile);
                fpd = fopen(dfile, "w");
                ASSERT(fpd != NULL, "CAN'T OPEN %s", dfile);
                chmod(dfile, 0666);
                gename(DATAPRE, xsys, 'B', dfile);
                fpd = fopen(dfile, "w");
                ASSERT(fpd != NULL, "CAN'T OPEN %s", dfile);
                chmod(dfile, 0666);
+               while ((c = getc(stdin)) != EOF)
+                       putc(c, fpd);
+#ifdef notdef
                while (fgets(buf, BUFSIZ, stdin) != NULL)
                        fputs(buf, fpd);
                while (fgets(buf, BUFSIZ, stdin) != NULL)
                        fputs(buf, fpd);
+#endif
                fclose(fpd);
                if (strcmp(local, xsys) != SAME) {
                        GENSEND(fpc, dfile, dfile, User, dfile);
                fclose(fpd);
                if (strcmp(local, xsys) != SAME) {
                        GENSEND(fpc, dfile, dfile, User, dfile);