/openbsd-current/regress/sys/kern/pty/ |
H A D | ptyhog.c | 49 size_t i, nwritten = 0, nread= 0; local 76 n = read(sfd, buf + nread, sizeof(buf) - nread); 79 errx(1, "timed out @ %zd", nread); 80 err(1, "read @ %zd", nread); 82 nread += n; 83 } while (nread != sizeof(buf));
|
/openbsd-current/regress/lib/libc/fread/ |
H A D | fread.c | 80 size_t nread, total = 0, off = 0; local 114 while ((nread = fread(buf, 1, sizeof(buf), fp)) != 0) { 115 if (nread > sizeof(buf)) { 117 iomode2str(iomode), sizeof(buf), nread); 120 if (strncmp(buf, test_string + off, nread) != 0) { 122 iomode2str(iomode), (int)nread, test_string + off, 123 (int)nread, buf); 126 total += nread; 127 off += nread;
|
/openbsd-current/libexec/lockspool/ |
H A D | lockspool.c | 52 ssize_t nread; local 97 nread = read(STDIN_FILENO, &c, 1); 98 } while (nread == 1 || (nread == -1 && errno == EINTR)); 99 } while (nread == -1 && errno == EAGAIN);
|
/openbsd-current/games/caesar/ |
H A D | caesar.c | 68 int ch, i, nread; local 100 nread = 0; 101 while ((nread < LINELENGTH) && ((ch = getchar()) != EOF)) { 102 inbuf[nread++] = ch; 126 for (i = 0; i < nread; ++i) {
|
/openbsd-current/sys/lib/libsa/ |
H A D | cd9660.c | 128 size_t buf_size, nread, psize, dsize; local 142 ISO_DEFAULT_BLOCK_SIZE, buf, &nread); 145 if (nread != ISO_DEFAULT_BLOCK_SIZE) { 171 buf_size, buf, &nread); 174 if (nread != buf_size) { 222 buf, &nread); 225 if (nread != ISO_DEFAULT_BLOCK_SIZE) { 291 size_t nread, off; local 304 ISO_DEFAULT_BLOCK_SIZE, dp, &nread); 307 if (nread ! [all...] |
/openbsd-current/usr.sbin/snmpd/ |
H A D | ax.c | 105 ssize_t nread; local 111 if ((nread = read(ax->ax_fd, ax->ax_rbuf + ax->ax_rblen, 116 if (nread == -1) 118 ax->ax_rblen += nread; 151 nread = read(ax->ax_fd, ax->ax_rbuf + ax->ax_rblen, 153 if (nread == 0) 155 if (nread <= 0) 157 ax->ax_rblen += nread; 194 nread = ax_pdutoostring(&header, &(pdu->ap_context), u8, 196 if (nread 1366 ssize_t nread; local 1403 ssize_t nread; local 1433 ssize_t nread, rread = 4; local [all...] |
/openbsd-current/usr.bin/sdiff/ |
H A D | edit.c | 85 size_t nread; local 172 for (nread = sizeof(buf); nread == sizeof(buf);) { 175 nread = fread(buf, sizeof(*buf), sizeof(buf), file); 177 if (nread != sizeof(buf) && 187 if (!nread) 191 nwritten = fwrite(buf, sizeof(*buf), nread, outfp); 192 if (nwritten != nread) {
|
/openbsd-current/regress/bin/ksh/edit/ |
H A D | edit.c | 50 size_t nin, nprompt, nread, nwrite; local 98 nprompt = nread = nwrite = ret = 0; 124 if (nread == sizeof(out)) 127 n = read(ptyfd, out + nread, sizeof(out) - 1 - nread); 130 nread += n; 131 out[nread] = '\0'; 157 printf("%.*s", (int)nread, out);
|
/openbsd-current/gnu/usr.bin/binutils/binutils/ |
H A D | rename.c | 51 int fromfd, tofd, nread; local 70 while ((nread = read (fromfd, buf, sizeof buf)) > 0) 72 if (write (tofd, buf, nread) != nread) 84 if (nread < 0)
|
/openbsd-current/gnu/usr.bin/binutils-2.17/binutils/ |
H A D | rename.c | 52 int fromfd, tofd, nread; local 71 while ((nread = read (fromfd, buf, sizeof buf)) > 0) 73 if (write (tofd, buf, nread) != nread) 85 if (nread < 0)
|
/openbsd-current/gnu/usr.bin/binutils/gdb/rdi-share/ |
H A D | serdrv.c | 300 int nread; local 310 nread = BytesInRXBufferSerial(); 312 if (nread > MAXREADSIZE - rbindex) 313 nread = MAXREADSIZE - rbindex; 315 if ((read_errno = ReadSerial(readbuf+rbindex, nread, &dummy)) == COM_READFAIL) 323 progressInfo.nRead += nread; 328 nread = Unix_ReadSerial(readbuf+rbindex, MAXREADSIZE-rbindex, block); 332 if ((nread > 0) || (rbindex > 0)) { 335 printf("[%d@%d] ", nread, rbindex); 338 if (nread> [all...] |
H A D | serpardr.c | 338 int nread; local 351 nread = BytesInRXBufferSerial(); 353 if (nread > MAXREADSIZE - rbindex) 354 nread = MAXREADSIZE - rbindex; 355 read_errno = ReadSerial(readbuf+rbindex, nread, &dummy); 358 progressInfo.nRead += nread; 363 nread = Unix_ReadSerial(readbuf+rbindex, MAXREADSIZE-rbindex, block); 367 if ((nread > 0) || (rbindex > 0)) 370 printf("[%d@%d] ", nread, rbindex); 373 if (nread > [all...] |
/openbsd-current/usr.bin/cvs/ |
H A D | remote.c | 133 size_t nread, nleft, toread; local 145 nread = fread(data, sizeof(char), toread, in); 146 if (nread == 0) 149 if (atomicio(vwrite, fd, data, nread) != nread) 150 fatal("failed to write %zu bytes", nread); 153 atomicio(vwrite, cvs_client_outlog_fd, data, nread) 154 != nread) 157 nleft -= nread;
|
/openbsd-current/lib/libc/stdio/ |
H A D | vfscanf.c | 110 int nread; /* number of characters consumed from fp */ local 127 nread = 0; 136 nread++, fp->_r--, fp->_p++; 156 nread++; 277 *va_arg(ap, signed char *) = nread; 279 *va_arg(ap, short *) = nread; 281 *va_arg(ap, long *) = nread; 283 *va_arg(ap, ssize_t *) = nread; 285 *va_arg(ap, ptrdiff_t *) = nread; 287 *va_arg(ap, long long *) = nread; [all...] |
H A D | vfwscanf.c | 113 int nread; /* number of characters consumed from fp */ local 136 nread = 0; 170 nread++; 303 *va_arg(ap, signed char *) = nread; 305 *va_arg(ap, short *) = nread; 307 *va_arg(ap, long *) = nread; 309 *va_arg(ap, ssize_t *) = nread; 311 *va_arg(ap, ptrdiff_t *) = nread; 313 *va_arg(ap, long long *) = nread; 315 *va_arg(ap, intmax_t *) = nread; [all...] |
/openbsd-current/lib/libagentx/ |
H A D | ax.c | 107 ssize_t nread; local 114 if ((nread = read(ax->ax_fd, ax->ax_rbuf + ax->ax_rblen, 119 if (nread == -1) 121 ax->ax_rblen += nread; 154 nread = read(ax->ax_fd, ax->ax_rbuf + ax->ax_rblen, 156 if (nread == 0) 158 if (nread <= 0) 160 ax->ax_rblen += nread; 197 nread = ax_pdutoostring(&header, &(pdu->ap_context), u8, 199 if (nread 1244 ssize_t nread; local 1281 ssize_t nread; local 1311 ssize_t nread, rread = 4; local [all...] |
/openbsd-current/regress/sys/fifofs/ |
H A D | fifotest.c | 85 ssize_t nread; local 131 if ((nread = read(fd, buf, sizeof(buf))) <= 0) { 132 printf("read error: %s\n", (nread == 0) ? "EOF" : strerror(errno)); 135 buf[nread] = '\0'; 190 ssize_t nread; local 269 if ((nread = read(fd, buf, sizeof(buf))) < 0) { 273 buf[nread] = '\0'; 274 printf("\treceived %s%s%s from FIFO\n", nread ? "'" : "", 275 nread ? buf : "EOF", nread [all...] |
/openbsd-current/usr.bin/vi/ex/ |
H A D | ex_filter.c | 46 recno_t nread; local 208 if (ex_readfp(sp, "filter", ofp, fm, &nread, 1)) 210 sp->rptlines[L_ADDED] += nread; 213 rp->lno = nread; 215 rp->lno += nread; 299 if (ex_readfp(sp, "filter", ofp, tm, &nread, 1)) 301 sp->rptlines[L_ADDED] += nread;
|
/openbsd-current/gnu/usr.bin/cvs/src/ |
H A D | zlib.c | 175 int zstatus, sofar, status, nread; local 226 BUFFER_DATA_SIZE, &nread); 233 if (nread == 0) 240 bd->size = nread; 367 int status, nread; local 370 status = compress_buffer_input (cb, buf, 0, sizeof buf, &nread); 556 int nread; local 597 nread = read (fd, inbuf, sizeof inbuf); 598 if (nread < 0) 603 else if (nread [all...] |
/openbsd-current/gnu/usr.bin/binutils/bfd/ |
H A D | cisco-core.c | 93 int nread; 104 nread = bfd_bread (buf, (bfd_size_type) 4, abfd); 105 if (nread != 4) 120 nread = bfd_bread (&crashinfo, (bfd_size_type) sizeof (crashinfo), abfd); 121 if (nread != sizeof (crashinfo)) 278 nread = statbuf.st_size - asect->filepos; 279 asect->_raw_size = (nread < 1024) ? nread : 1024; 91 int nread; local
|
H A D | bfdio.c | 102 size_t nread; local 124 nread = real_read (ptr, 1, (size_t) size, bfd_cache_lookup (abfd)); 125 if (nread != (size_t) -1) 126 abfd->where += nread; 135 if (nread != size) 143 return nread;
|
/openbsd-current/gnu/usr.bin/binutils-2.17/bfd/ |
H A D | cisco-core.c | 93 int nread; 104 nread = bfd_bread (buf, (bfd_size_type) 4, abfd); 105 if (nread != 4) 120 nread = bfd_bread (&crashinfo, (bfd_size_type) sizeof (crashinfo), abfd); 121 if (nread != sizeof (crashinfo)) 278 nread = statbuf.st_size - asect->filepos; 279 asect->size = (nread < 1024) ? nread : 1024; 91 int nread; local
|
H A D | bfdio.c | 117 size_t nread; local 140 nread = abfd->iovec->bread (abfd, ptr, size); 142 nread = 0; 143 if (nread != (size_t) -1) 144 abfd->where += nread; 146 return nread;
|
H A D | cache.c | 271 file_ptr nread; local 291 nread = read (fileno (f), buf, nbytes); 295 if (nread == (file_ptr)-1) 301 nread = fread (buf, 1, nbytes, f); 305 if (nread < nbytes && ferror (f)) 311 return nread;
|
/openbsd-current/usr.bin/hexdump/ |
H A D | display.c | 228 int need, nread; local 241 for (need = blocksize, nread = 0;;) { 251 !memcmp(curp, savp, nread)) { 256 memset((char *)curp + nread, 0, need); 257 eaddress = address + nread; 260 n = fread((char *)curp + nread, sizeof(u_char), 283 nread = 0; 286 nread += n;
|