file: SystemStuff.cxx

/*-- Description: We need low level C functions to communicate through named pipes. These files have some C files that are used by WishIntfc. These need not be modified. -*/ #include "SystemStuff.hxx" /**************************************************************************/ /* writen: try to write nbytes to a descriptor (stevens pg. 279) */ /**************************************************************************/ int writen(int fd,char *ptr,int nbytes) { int nleft,nwritten; nleft = nbytes; while (nleft > 0) { nwritten = write(fd,ptr,nleft); if (nwritten <= 0) return(ERROR); nleft -= nwritten; ptr += nwritten; } return(nbytes - nleft); }


Back to Source File Index


C++ to HTML Conversion by ctoohtml