1*36476Ssam # include "errno.h" 2*36476Ssam # include "../hdr/macros.h" 3*36476Ssam SCCSID(@(#)write 2.1); 4*36476Ssam 5*36476Ssam /* 6*36476Ssam Interface to write(II) (called syswrite) which handles 7*36476Ssam all error conditions. 8*36476Ssam Returns number of bytes written on success, 9*36476Ssam returns fatal(<mesg>) on failure. 10*36476Ssam */ 11*36476Ssam 12*36476Ssam write(fildes,buffer,nbytes) 13*36476Ssam char *buffer; 14*36476Ssam { 15*36476Ssam register int n; 16*36476Ssam 17*36476Ssam if (nbytes>0 && (n=syswrite(fildes,buffer,nbytes))!=nbytes) 18*36476Ssam n = xmsg("","write"); 19*36476Ssam return(n); 20*36476Ssam } 21