home *** CD-ROM | disk | FTP | other *** search
-
-
-
- WRITE(3) MINTLIB LIBRARY FUNCTIONS WRITE(3)
-
-
- N✓NA✓AM✓ME✓E
- write - write on a file
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <unistd.h>
-
- int write(int fildes, const void *buf, unsigned nbyte);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- fildes is a file descriptor obtained from a creat, open,
- dup, fcntl, or pipe system call.
-
- write attempts to write nbyte bytes from the buffer
- pointed to by buf to the file associated with fildes.
-
- When fildes indicates a device, writing always takes place
- at the current position. When fildes indicates a file, the
- actual writing of data proceeds from the position in the
- file indicated by the file pointer. Upon return from
- write, the file pointer is incremented by the number of
- bytes actually written. If the O_APPEND flag of the file
- status flags is set, the file pointer will be set to the
- end of the file prior to writing.
-
-
- R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
- Upon successful completion the number of bytes actually
- written is returned. Otherwise, -1 is returned and errno
- is set to indicate the error.
-
- N✓NO✓OT✓TE✓E
- The underlying call, Fwrite, takes a long nbyte parameter
- and returns a long result. This means that, when 16-bit
- integers are used, Fwrite can write over 64 Kb at a time
- while write cannot.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- c✓cr✓re✓ea✓at✓t(✓(3✓3)✓),✓, d✓du✓up✓p(✓(3✓3)✓),✓, f✓fc✓cn✓nt✓tl✓l(✓(3✓3)✓),✓, l✓ls✓se✓ee✓ek✓k(✓(3✓3)✓),✓, o✓op✓pe✓en✓n(✓(3✓3)✓),✓, p✓pi✓ip✓pe✓e(✓(3✓3)✓),✓,
- F✓Fw✓wr✓ri✓it✓te✓e(✓(2✓2)✓)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-