-/* $OpenBSD: patch.c,v 1.48 2009/10/27 23:59:41 deraadt Exp $ */
+/* $OpenBSD: patch.c,v 1.49 2010/07/24 01:10:12 ray Exp $ */
/*
* patch - a program to apply diffs to original files
/* buffer holding the name of the rejected patch file. */
static char rejname[NAME_MAX + 1];
-/* buffer for stderr */
-static char serrbuf[BUFSIZ];
-
/* how many input lines have been irretractibly output */
static LINENUM last_frozen_line = 0;
const char *tmpdir;
char *v;
- setbuf(stderr, serrbuf);
+ setlinebuf(stdout);
+ setlinebuf(stderr);
for (i = 0; i < MAXFILEC; i++)
filearg[i] = NULL;
-/* $OpenBSD: util.c,v 1.34 2010/01/08 13:27:59 oga Exp $ */
+/* $OpenBSD: util.c,v 1.35 2010/07/24 01:10:12 ray Exp $ */
/*
* patch - a program to apply diffs to original files
va_list ap;
va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
+ vfprintf(stdout, fmt, ap);
va_end(ap);
- fflush(stderr);
+ fflush(stdout);
}
/*