# HG changeset patch # User Matt Johnston # Date 1143293744 0 # Node ID b27fcd28f9dc8da3e98e1c4bd42ea1223c6bc790 # Parent 973fccb59ea4f71e4a32df3ab90cfba0c4dbc863 printf not fprintf for scp stuff diff -r 973fccb59ea4 -r b27fcd28f9dc scp.c --- a/scp.c Sat Mar 25 12:59:58 2006 +0000 +++ b/scp.c Sat Mar 25 13:35:44 2006 +0000 @@ -125,10 +125,10 @@ fatal("do_local_cmd: no arguments"); if (verbose_mode) { - fprintf(stderr, "Executing:"); + printf( "Executing:"); for (i = 0; i < a->num; i++) - fprintf(stderr, " %s", a->list[i]); - fprintf(stderr, "\n"); + printf( " %s", a->list[i]); + printf( "\n"); } if ((pid = fork()) == -1) fatal("do_local_cmd: fork: %s", strerror(errno)); @@ -858,7 +858,7 @@ } while (cp < &buf[sizeof(buf) - 1] && ch != '\n'); *cp = 0; if (verbose_mode) - fprintf(stderr, "Sink: %s", buf); + printf( "Sink: %s", buf); if (buf[0] == '\01' || buf[0] == '\02') { if (iamremote == 0) @@ -1146,12 +1146,12 @@ ++errs; if (fp == NULL && !(fp = fdopen(remout, "w"))) return; - (void) fprintf(fp, "%c", 0x01); - (void) fprintf(fp, "scp: "); + (void) printf( "%c", 0x01); + (void) printf( "scp: "); va_start(ap, fmt); - (void) vfprintf(fp, fmt, ap); + (void) vprintf( fmt, ap); va_end(ap); - (void) fprintf(fp, "\n"); + (void) printf( "\n"); (void) fflush(fp); if (!iamremote) { diff -r 973fccb59ea4 -r b27fcd28f9dc scpmisc.c --- a/scpmisc.c Sat Mar 25 12:59:58 2006 +0000 +++ b/scpmisc.c Sat Mar 25 13:35:44 2006 +0000 @@ -220,7 +220,7 @@ { va_list args; va_start(args, fmt); - vfprintf(stderr, fmt, args); + vprintf( fmt, args); va_end(args); exit(255); } @@ -231,7 +231,7 @@ int nullfd, dupfd; if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { - fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno)); + printf( "Couldn't open /dev/null: %s", strerror(errno)); exit(1); } while (++dupfd <= 2) { @@ -239,7 +239,7 @@ if (fcntl(dupfd, F_GETFL, 0) >= 0) continue; if (dup2(nullfd, dupfd) == -1) { - fprintf(stderr, "dup2: %s", strerror(errno)); + printf( "dup2: %s", strerror(errno)); exit(1); } }