Home
last modified time | relevance | path

Searched refs:nread (Results 1 – 25 of 36) sorted by relevance

12

/original-bsd/usr.bin/tcopy/
H A Dtcopy.c54 ssize_t lastnread, nread; local
128 if (nread >= 0)
133 } else if (nread != lastnread) {
143 if (nread != 0)
145 filen, nread);
150 if (nread > 0) {
156 nw = write(outp, buff, nread);
157 if (nw != nread) {
168 nw, nread);
173 size += nread;
[all …]
/original-bsd/old/np100/
H A Dnpdump.c34 int nread; /* Value returned from read() call */ local
82 if ((nread = read(ed,ibuf,1024)) > 0) {
84 totalread += nread;
86 nwritten = write(fd,ibuf,nread);
88 if (nwritten != nread) {
/original-bsd/games/caesar/
H A Dcaesar.c51 register int ch, dot, i, nread, winnerdot; local
71 if ((nread = read(STDIN_FILENO, inbuf, LINELENGTH)) < 0) {
75 for (i = nread; i--;) {
102 for (i = 0; i < nread; ++i) {
106 if (nread < LINELENGTH)
108 if ((nread = read(STDIN_FILENO, inbuf, LINELENGTH)) < 0) {
/original-bsd/lib/libc/db/btree/
H A Dlrucache.c119 lruget(lru, pgno, nread) in lruget() argument
122 int *nread;
137 *nread = l->lru_psize;
142 if ((buffer = lrugetpg(l, pgno, nread, lruget)) == (char *) NULL)
150 *nread = read(l->lru_fd, buffer, l->lru_psize);
180 lrugetnew(lru, pgno, nread) in lrugetnew() argument
183 int *nread;
187 *nread = 0;
188 return (lrugetpg(l, pgno, nread, lrugetnew));
H A Dlrutils.c46 lrugetpg(l, pgno, nread, f) in lrugetpg() argument
49 int *nread;
96 return ((*f)((LRU) l, pgno, nread));
/original-bsd/lib/libc/stdio/
H A Dvfscanf.c95 nread = 0;
108 nread++, fp->_r--, fp->_p++;
129 nread++;
267 nread++;
308 nread += sum;
315 nread += r;
358 nread += n;
374 nread += n;
386 nread += p - p0;
524 nread += p - buf;
[all …]
/original-bsd/usr.bin/tip/aculib/
H A Dventel.c186 int already = 0, nread; in vensync() local
210 if (ioctl(fd, FIONREAD, (caddr_t)&nread) < 0) { in vensync()
214 while (nread > 0) { in vensync()
215 read(fd, buf, min(nread, 60)); in vensync()
216 if ((buf[nread - 1] & 0177) == '$') in vensync()
218 nread -= min(nread, 60); in vensync()
/original-bsd/old/berknet/
H A Dreceive.c25 while((i = nread(buf,20)) == BROKENREAD);
39 while((i = nread(buf,10)) == BROKENREAD);
48 while((n = nread(buf,i)) == BROKENREAD);
H A Dspeedr.c25 while(nread(&n,2) == BROKENREAD);
32 while((i=nread(buf,n)) == BROKENREAD);
H A Dnetdaemon.c333 n = nread(hbuf,10); in netrcv()
838 n = nread(b,n);
846 if((n=nread(buf,3)) == BROKENREAD)return(0); in mgetc()
864 if((n=nread(&c,1)) == BROKENREAD){
871 if((n=nread(&c,1)) == BROKENREAD){
882 if(nread(&c,1) == BROKENREAD){
898 if((n=nread(&c,1)) == BROKENREAD){
905 if(nread(&c,1) == BROKENREAD){
/original-bsd/usr.bin/hexdump/
H A Ddisplay.c206 int need, nread; in get() local
218 for (need = blocksize, nread = 0;;) { in get()
227 if (vflag != ALL && !bcmp(curp, savp, nread)) { in get()
232 bzero((char *)curp + nread, need); in get()
233 eaddress = address + nread; in get()
236 n = fread((char *)curp + nread, sizeof(u_char), in get()
260 nread = 0; in get()
263 nread += n; in get()
/original-bsd/bin/mv/
H A Dmv.c169 register int nread, from_fd, to_fd; local
185 while ((nread = read(from_fd, bp, blen)) > 0)
186 if (write(to_fd, bp, nread) != nread) {
190 if (nread < 0) {
/original-bsd/old/as.vax/
H A Dasscan2.c23 int nread; in fillinbuffer() local
27 nread = 0; in fillinbuffer()
31 got = read(stdin->_file, inbuffer + nread, goal); in fillinbuffer()
36 nread += got; in fillinbuffer()
47 if (nread == 0){ in fillinbuffer()
49 nread = 1; in fillinbuffer()
51 Ginbufcnt = nread - 1; in fillinbuffer()
H A Dassyms.c714 int left, nread; local
716 for (left = STRLEN(sp); left > 0; left -= nread){
717 nread = fread(rbuf, sizeof(char),
719 if (nread == 0)
721 bwrite(rbuf, nread, symfile);
/original-bsd/old/as.tahoe/
H A Dasscan2.c20 int nread; in fillinbuffer() local
24 nread = 0; in fillinbuffer()
28 got = read(stdin->_file, inbuffer + nread, goal); in fillinbuffer()
33 nread += got; in fillinbuffer()
44 if (nread == 0){ in fillinbuffer()
46 nread = 1; in fillinbuffer()
48 Ginbufcnt = nread - 1; in fillinbuffer()
H A Dassyms.c742 int left, nread; local
744 for (left = STRLEN(sp); left > 0; left -= nread){
745 nread = fread(rbuf, sizeof(char),
747 if (nread == 0)
749 bwrite(rbuf, nread, symfile);
/original-bsd/lib/libedit/
H A Dread.c278 el_gets(el, nread) in el_gets() argument
280 int *nread;
300 if (nread)
301 *nread = 0;
408 if (nread)
409 *nread = num;
/original-bsd/sbin/mount_portal/
H A Dconf.c237 int nread = 0; local
249 path *p = palloc(cline, nread+1);
252 nread++;
260 if (nread)
/original-bsd/usr.bin/uucp/uucico/
H A Dtio.c172 register int len, nread; local
199 nread = Nbytes;
200 if (nread == 0)
203 len = trdblk(bufr, nread, fn);
/original-bsd/contrib/sort/
H A Dappend.c156 int nread; local
160 while ((nread = fread(buffer, 1, 4096, b)) > 0)
161 EWRITE(buffer, 1, nread, a);
/original-bsd/usr.bin/error/
H A Dtouch.c558 reg int nread; local
566 while((nread = fread(edbuf, 1, sizeof(edbuf), o_touchedfile)) != NULL){
567 if (nread != fwrite(edbuf, 1, nread, n_touchedfile)){
624 int nread; local
626 while((nread = fread(edbuf, 1, sizeof(edbuf), tmpfile)) != NULL){
627 if (mustwrite(edbuf, nread, preciousfile) == 0)
/original-bsd/contrib/emacs-18.57/etc/
H A Dmovemail.c81 int nread; local
204 nread = read (indesc, buf, sizeof buf);
205 if (nread != write (outdesc, buf, nread))
212 if (nread < sizeof buf)
/original-bsd/usr.bin/calendar/
H A Dcalendar.c304 int nread, pdes[2], status; local
339 while ((nread = read(fileno(fp), buf, sizeof(buf))) > 0)
340 (void)write(pdes[1], buf, nread);
/original-bsd/contrib/emacs-18.57/src/
H A Dtermcap.c570 register int nread; local
603 if (!(nread = read (fd, buf + bufp->full, bufp->size - bufp->full)))
605 bufp->full += nread;
/original-bsd/sbin/dump/
H A Dtape.c715 register int nread; local
728 if ((nread = atomic(read, cmd, (char *)&nextslave, sizeof nextslave))
736 while ((nread = atomic(read, cmd, (char *)slp->req, reqsiz)) == reqsiz) {
813 if (nread != 0)

12