projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4dc7a4c
)
add vfprintf from Sys V.2;/usr/src/lib/libc/port/print/vfprintf.c
author
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Wed, 30 Mar 1988 04:46:42 +0000
(20:46 -0800)
committer
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Wed, 30 Mar 1988 04:46:42 +0000
(20:46 -0800)
SCCS-vsn: old/cpio/cpio.c 5.4
usr/src/old/cpio/cpio.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/old/cpio/cpio.c
b/usr/src/old/cpio/cpio.c
index
c18c606
..
eac1fac
100644
(file)
--- a/
usr/src/old/cpio/cpio.c
+++ b/
usr/src/old/cpio/cpio.c
@@
-1485,3
+1485,28
@@
register unsigned count;
return savedto;
}
return savedto;
}
+
+extern int _doprnt();
+
+/*VARARGS2*/
+int
+vfprintf(iop, format, ap)
+FILE *iop;
+char *format;
+va_list ap;
+{
+ register int count;
+
+ if (!(iop->_flag | _IOWRT)) {
+ /* if no write flag */
+ if (iop->_flag | _IORW) {
+ /* if ok, cause read-write */
+ iop->_flag |= _IOWRT;
+ } else {
+ /* else error */
+ return EOF;
+ }
+ }
+ count = _doprnt(format, ap, iop);
+ return(ferror(iop)? EOF: count);
+}