c8b59394234c914d89f5b80387eae776fef4ad09
[unix-history] / usr / src / local / sccscmds / sccscmds.ok / util / write.c
# 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(<mesg>) 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);
}