/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ static char Sccsid[]="@(#)xwrite.c 3.0 4/22/86"; # include "errno.h" /* Interface to write which handles all error conditions. Returns number of bytes written on success, returns fatal(<mesg>) on failure. */ xwrite(fildes,buffer,nbytes) char *buffer; { register int n; if (nbytes>0 && (n=write(fildes,buffer,nbytes))!=nbytes) n = xmsg("","xwrite"); return(n); }