Searched refs:nread (Results 1 - 25 of 97) sorted by relevance

1234

/freebsd-current/tools/build/cross-build/
H A Dfgetln_fallback.c52 ssize_t nread; local
66 nread = getline(&fb->buf, &fb->len, stream);
70 /* Note: the getdelim/getline API ensures nread != 0. */
71 if (nread == -1) {
75 *len = (size_t)nread;
/freebsd-current/usr.bin/caesar/
H A Dcaesar.c67 int ch, dot, i, nread, winnerdot = 0; local
86 if ((nread = read(STDIN_FILENO, inbuf, (size_t)LINELENGTH)) < 0) {
90 for (i = nread; i--;) {
119 for (i = 0; i < nread; ++i) {
123 if (nread < LINELENGTH)
125 if ((nread = read(STDIN_FILENO, inbuf, (size_t)LINELENGTH)) < 0) {
/freebsd-current/lib/libc/stdio/
H A Dfgetwc.c71 * wide streams, this should always be fp->_mbstate. On return, *nread
75 __fgetwc_mbs(FILE *fp, mbstate_t *mbs, int *nread, locale_t locale) argument
81 *nread = 0;
94 (*nread)++;
99 *nread += nconv;
H A Dvfscanf.c154 int n, nread; local
160 (wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF) {
163 n += nread;
215 int n, nread; local
220 while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
222 n += nread;
226 while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
229 n += nread;
276 int n, nread; local
281 while ((wi = __fgetwc_mbs(fp, &mbs, &nread, local
497 int nread; /* number of characters consumed from fp */ local
[all...]
H A Dvfwscanf.c232 int nread; local
235 nread = 0;
244 nread++;
250 return (nread);
257 int nread; local
259 nread = 0;
263 nread++;
270 nread++;
276 return (nread);
475 int nread; /* numbe local
[all...]
/freebsd-current/sys/kern/
H A Dsubr_scanf.c115 int nread; /* number of characters consumed from fp */ local
129 nread = 0;
138 nread++, inr--, inp++;
158 nread++;
260 *va_arg(ap, char *) = nread;
262 *va_arg(ap, short *) = nread;
264 *va_arg(ap, long *) = nread;
266 *va_arg(ap, quad_t *) = nread;
268 *va_arg(ap, intmax_t *) = nread;
270 *va_arg(ap, size_t *) = nread;
[all...]
/freebsd-current/usr.sbin/watch/
H A Dwatch.c283 int ch, res, rv, nread; local
356 if ((res = ioctl(std_in, FIONREAD, &nread)) != 0)
358 if (nread > READB_LEN)
359 nread = READB_LEN;
360 rv = read(std_in, chb, nread);
361 if (rv == -1 || rv != nread)
377 rv = write(snp_io, chb, nread);
378 if (rv == -1 || rv != nread) {
393 if ((res = ioctl(snp_io, FIONREAD, &nread)) != 0)
396 switch (nread) {
[all...]
/freebsd-current/usr.bin/tcopy/
H A Dtcopy.c66 int lastnread, nread, nw, inp, outp; local
145 if ((nread = read(inp, buff, maxblk)) == -1) {
147 nread = read(inp, buff, maxblk);
148 if (nread >= 0)
152 } else if (nread != lastnread) {
154 if (lastrec == 0 && nread == 0)
162 if (nread != 0)
164 filen, nread);
169 if (nread > 0) {
175 nw = write(outp, buff, nread);
[all...]
/freebsd-current/usr.bin/sdiff/
H A Dedit.c87 size_t nread; local
174 for (nread = sizeof(buf); nread == sizeof(buf);) {
177 nread = fread(buf, sizeof(*buf), sizeof(buf), file);
179 if (nread != sizeof(buf) &&
189 if (!nread)
193 nwritten = fwrite(buf, sizeof(*buf), nread, outfp);
194 if (nwritten != nread) {
/freebsd-current/contrib/diff/lib/
H A Dcmpbuf.c93 ssize_t nread = read (fd, bp, bytes_to_read); local
94 if (nread <= 0)
96 if (nread == 0)
117 bp += nread;
/freebsd-current/stand/libsa/
H A Dsplitfs.c192 ssize_t nread; local
199 nread = read(sf->curfd, buf, size - totread);
202 if (nread == -1)
205 sf->tot_pos += nread;
206 sf->file_pos += nread;
207 totread += nread;
208 buf = (char *)buf + nread;
234 int nread; local
270 nread = 0;
271 for (; seek_by > 0; seek_by -= nread) {
[all...]
/freebsd-current/usr.sbin/mfiutil/
H A Dmfi_flash.c91 size_t nread; local
148 nread = read(flash, buf, FLASH_BUF_SIZE);
149 if (nread <= 0 || nread % 1024 != 0) {
158 mfi_dcmd_command(fd, MFI_DCMD_FLASH_FW_DOWNLOAD, buf, nread,
167 sb.st_size -= nread;
168 offset += nread;
/freebsd-current/usr.bin/tip/libacu/
H A Dventel.c213 int already = 0, nread; local
237 if (ioctl(fd, FIONREAD, (caddr_t)&nread) < 0) {
241 while (nread > 0) {
242 read(fd, buf, min(nread, 60));
243 if ((buf[nread - 1] & 0177) == '$')
245 nread -= min(nread, 60);
/freebsd-current/usr.bin/hexdump/
H A Ddisplay.c235 int need, nread; local
251 for (need = blocksize, nread = 0;;) {
268 bcmp(curp, savp, nread) == 0) {
275 bzero((char *)curp + nread, need);
276 eaddress = address + nread;
279 n = fread((char *)curp + nread, sizeof(u_char),
309 nread = 0;
312 nread += n;
319 size_t n, nread; local
324 nread
[all...]
/freebsd-current/contrib/sendmail/libsm/
H A Dvfscanf.c123 int nread; /* number of characters consumed from fp */ local
161 nread = 0;
178 nread++, fp->f_r--, fp->f_p++;
201 nread++;
310 *SM_VA_ARG(ap, short *) = nread;
312 *SM_VA_ARG(ap, long *) = nread;
314 *SM_VA_ARG(ap, int *) = nread;
345 nread++;
391 nread += sum;
402 nread
[all...]
/freebsd-current/contrib/libedit/
H A Dread.c453 noedit_wgets(EditLine *el, int *nread) argument
472 *nread = (int)(lp->lastchar - lp->buffer);
473 return *nread ? lp->buffer : NULL;
477 el_wgets(EditLine *el, int *nread) argument
485 if (nread == NULL)
486 nread = &nrb;
487 *nread = 0;
492 return noedit_wgets(el, nread);
503 *nread = 0;
517 return noedit_wgets(el, nread);
[all...]
/freebsd-current/contrib/wpa/src/wps/
H A Dwps_er_ssdp.c25 int nread; local
33 nread = recvfrom(sd, buf, sizeof(buf) - 1, 0,
35 if (nread <= 0)
37 buf[nread] = '\0';
45 (u8 *) buf, nread);
H A Dhttpread.c370 int nread; local
380 nread = read(h->sd, readbuf, sizeof(readbuf));
381 if (nread < 0) {
385 wpa_hexdump_ascii(MSG_MSGDUMP, "httpread - read", readbuf, nread);
386 if (nread == 0) {
425 if (nread == 0)
433 nread--;
480 if (nread == 0)
487 if (h->body_alloc_nbytes < (h->body_nbytes + nread + 1)) {
601 if (nread <
[all...]
/freebsd-current/tools/test/stress2/misc/
H A Doverlap.sh108 ssize_t nread;
116 while ((nread = pread(fdes, buf, siz, 0)) == 0)
120 if (nread < siz)
121 err(1, "pread @ count %d, nread %zd", count, nread);
128 } while ((nread = pread(fdes, buf, siz, 0)) != -1);
/freebsd-current/contrib/nvi/ex/
H A Dex_filter.c43 recno_t nread; local
174 if (ex_readfp(sp, "filter", ofp, fm, &nread, 1))
176 sp->rptlines[L_ADDED] += nread;
179 rp->lno = nread;
181 rp->lno += nread;
250 if (ex_readfp(sp, "filter", ofp, tm, &nread, 1))
252 sp->rptlines[L_ADDED] += nread;
/freebsd-current/bin/sh/
H A Dmiscbltin.c94 ssize_t nread; local
97 nread = read(fdc->fd, fdc->buf, fdc->buflen);
98 if (nread > 0) {
100 fdc->ep = fdc->buf + nread;
102 return (nread);
168 ssize_t nread; local
241 nread = fdgetc(&fdctx, &c);
242 if (nread == -1) {
253 } else if (nread != 1) {
/freebsd-current/contrib/libevent/test/
H A Dregress_zlib.c136 int nread, nwrite; local
160 nread = v_in[0].iov_len - p->avail_in;
163 evbuffer_drain(src, nread);
190 int nread, nwrite; local
214 nread = v_in[0].iov_len - p->avail_in;
217 evbuffer_drain(src, nread);
/freebsd-current/contrib/ntp/sntp/libevent/test/
H A Dregress_zlib.c136 int nread, nwrite; local
160 nread = v_in[0].iov_len - p->avail_in;
163 evbuffer_drain(src, nread);
190 int nread, nwrite; local
214 nread = v_in[0].iov_len - p->avail_in;
217 evbuffer_drain(src, nread);
/freebsd-current/contrib/expat/xmlwf/
H A Dxmlfile.c193 int nread; local
202 nread = read(fd, buf, g_read_size_bytes);
203 if (nread < 0) {
209 if (XML_ParseBuffer(parser, nread, nread == 0) == XML_STATUS_ERROR) {
215 if (nread == 0) {
/freebsd-current/usr.sbin/nvmfd/
H A Ddevices.c216 ssize_t nread; local
221 nread = pread(fd, dst, len, offset);
222 if (nread == -1 && errno == EINTR)
224 if (nread <= 0)
226 dst += nread;
227 len -= nread;
228 offset += nread;

Completed in 186 milliseconds

1234