| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | #include <config.h> | - |
| 22 | | - |
| 23 | #include <sys/types.h> | - |
| 24 | | - |
| 25 | #if defined (HAVE_UNISTD_H) | - |
| 26 | # include <unistd.h> | - |
| 27 | #endif | - |
| 28 | | - |
| 29 | #include <errno.h> | - |
| 30 | | - |
| 31 | #if !defined (errno) | - |
| 32 | extern int errno; | - |
| 33 | #endif | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | | - |
| 38 | int | - |
| 39 | zwrite (fd, buf, nb) | - |
| 40 | int fd; | - |
| 41 | char *buf; | - |
| 42 | size_t nb; | - |
| 43 | { | - |
| 44 | int n, i, nt; | - |
| 45 | | - |
| 46 | for (n = nb, nt = 0;;) | - |
| 47 | { | - |
| 48 | i = write (fd, buf, n); | - |
| 49 | if (i > 0)| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| 0-3 |
| 50 | { | - |
| 51 | n -= i; | - |
| 52 | if (n <= 0)| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| 0-3 |
| 53 | return nb;executed 3 times by 1 test: return nb; | 3 |
| 54 | buf += i; | - |
| 55 | } never executed: end of block | 0 |
| 56 | else if (i == 0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 57 | { | - |
| 58 | if (++nt > 3)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 59 | return (nb - n); never executed: return (nb - n); | 0 |
| 60 | } never executed: end of block | 0 |
| 61 | else if (errno != EINTR)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 62 | return -1; never executed: return -1; | 0 |
| 63 | } never executed: end of block | 0 |
| 64 | } never executed: end of block | 0 |
| | |