Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!hpda!hpsmtc1!hpisod2!decot From: decot@hpisod2.HP.COM (Dave Decot) Newsgroups: comp.unix.questions Subject: Re: write (fildes, buf, nbytes) -- is "nbytes" int or unsigned? Message-ID: <10650001@hpisod2.HP.COM> Date: Wed, 29-Jul-87 14:28:12 EDT Article-I.D.: hpisod2.10650001 Posted: Wed Jul 29 14:28:12 1987 Date-Received: Sat, 1-Aug-87 15:02:28 EDT References: <868@bsu-cs.UUCP> Organization: Hewlett Packard, Cupertino Lines: 16 > One possible solution: > > size_t write (fildes, buf, nbytes) > int fildes; char *buf; size_t nbytes; > > The value supplied for `nbytes' must be in the range > 0 through (((size_t) -1) - 1), where size_t is an unsigned type > defined in a header file. Up to `nbytes' bytes of data are > written each time write() is called. The return value is the > actual number of bytes written, unless an error occurs, in which > case the value returned is ((size_t) -1). This assumes a two's complement representation of integers. Dave Decot hpda!decot