From: Sam Leffler Date: Fri, 23 Dec 1988 05:04:38 +0000 (-0800) Subject: date and time created 88/12/22 13:04:38 by sam X-Git-Tag: BSD-4_3_Net_1-Snapshot-Development~16 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/5e5f884d42521293b6595ddfc564119df274682a?hp=d6984224ab72a64dcf05e06eec0cdb4d7a1c6023 date and time created 88/12/22 13:04:38 by sam SCCS-vsn: local/sccscmds/sccscmds.2/util/write.c 1.1 SCCS-vsn: local/sccscmds/sccscmds.ok/util/write.c 1.1 --- diff --git a/usr/src/local/sccscmds/sccscmds.2/util/write.c b/usr/src/local/sccscmds/sccscmds.2/util/write.c new file mode 100644 index 0000000000..c8b5939423 --- /dev/null +++ b/usr/src/local/sccscmds/sccscmds.2/util/write.c @@ -0,0 +1,20 @@ +# include "errno.h" +# include "../hdr/macros.h" +SCCSID(@(#)write 2.1); + +/* + Interface to write(II) (called syswrite) which handles + all error conditions. + Returns number of bytes written on success, + returns fatal() on failure. +*/ + +write(fildes,buffer,nbytes) +char *buffer; +{ + register int n; + + if (nbytes>0 && (n=syswrite(fildes,buffer,nbytes))!=nbytes) + n = xmsg("","write"); + return(n); +} diff --git a/usr/src/local/sccscmds/sccscmds.ok/util/write.c b/usr/src/local/sccscmds/sccscmds.ok/util/write.c new file mode 100644 index 0000000000..c8b5939423 --- /dev/null +++ b/usr/src/local/sccscmds/sccscmds.ok/util/write.c @@ -0,0 +1,20 @@ +# include "errno.h" +# include "../hdr/macros.h" +SCCSID(@(#)write 2.1); + +/* + Interface to write(II) (called syswrite) which handles + all error conditions. + Returns number of bytes written on success, + returns fatal() on failure. +*/ + +write(fildes,buffer,nbytes) +char *buffer; +{ + register int n; + + if (nbytes>0 && (n=syswrite(fildes,buffer,nbytes))!=nbytes) + n = xmsg("","write"); + return(n); +}