Searched refs:wfd (Results 1 - 22 of 22) sorted by relevance

/ast/src/cmd/mailx/
H A Dtty.c226 * Output label on wfd and return next char on rfd with no echo.
231 ttyquery(int rfd, int wfd, const char* label) argument
242 write(wfd, label, n);
263 write(wfd, "\r", 1);
265 write(wfd, " ", 1);
266 write(wfd, "\r", 1);
272 * Edit buf on rfd,wfd with label.
277 ttyedit(int rfd, int wfd, const char* label, char* buf, size_t size) argument
287 write(wfd, label, strlen(label));
289 write(wfd, bu
[all...]
/ast/src/cmd/3d/
H A Dcopy.c49 * copy rfd to wfd
54 fs3d_copy(int rfd, int wfd, struct stat* st) argument
81 if (write(wfd, mapbuf, mapsize) != mapsize)
102 if (write(wfd, buf, n) != n)
104 if (n < 0 || lseek(wfd, (off_t)0, 0)) return -1;
H A Dpathreal.c455 int wfd; local
462 wfd = open(apath, O_WRONLY|O_CREAT|O_TRUNC|O_cloexec, st->st_mode & S_IPERM);
464 if (wfd < 0)
468 if (fs3d_copy(rfd, wfd, st))
470 CLOSE(wfd);
/ast/src/cmd/pax/
H A Dcopy.c170 int wfd; local
206 if (!ap->format->getdata || !(*ap->format->getdata)(&state, ap, f, pp->wfd))
217 if (write(pp->wfd, s, n) != n)
245 if ((wfd = openout(ap, f)) < 0)
248 paxdelta(NiL, ap, f, DELTA_TAR|DELTA_FD|DELTA_FREE|DELTA_OUTPUT|DELTA_COUNT, wfd, DELTA_DEL|DELTA_BIO|DELTA_SIZE, ap, f->st->st_size, 0);
254 if ((wfd = openout(ap, f)) < 0)
259 paxdelta(NiL, ap, f, DELTA_SRC|DELTA_BIO|DELTA_SIZE, ap->delta->base, f->delta.base->size, DELTA_TAR|DELTA_FD|DELTA_FREE|DELTA_OUTPUT|DELTA_COUNT, wfd, DELTA_DEL|DELTA_BIO|DELTA_SIZE, ap, c, 0);
261 paxdelta(NiL, ap, f, DELTA_SRC|DELTA_FD|DELTA_SIZE|DELTA_FREE, dfd, f->delta.base->uncompressed, DELTA_TAR|DELTA_FD|DELTA_FREE|DELTA_OUTPUT|DELTA_COUNT, wfd, DELTA_DEL|DELTA_BIO|DELTA_SIZE, ap, c, 0);
264 paxdelta(NiL, ap, f, DELTA_SRC|DELTA_FD|DELTA_OFFSET|DELTA_SIZE, ap->delta->base->io->fd, f->delta.base->offset, f->delta.base->size, DELTA_TAR|DELTA_FD|DELTA_FREE|DELTA_OUTPUT|DELTA_COUNT, wfd, DELTA_DEL|DELTA_BIO|DELTA_SIZE, ap, c, 0);
266 paxdelta(NiL, ap, f, DELTA_SRC|DELTA_FD|DELTA_SIZE|DELTA_FREE, dfd, f->delta.base->uncompressed, DELTA_TAR|DELTA_FD|DELTA_FREE|DELTA_OUTPUT|DELTA_COUNT, wfd, DELTA_DE
357 register int wfd; local
[all...]
H A Dpax-ar.c100 ar_getdata(Pax_t* pax, register Archive_t* ap, register File_t* f, int wfd) argument
109 if (wfd >= 0)
111 if (ardircopy(ar->dir, ar->ent, wfd) < 0)
116 closeout(ap, f, wfd);
H A Dpax-saveset.c194 vmsbackup_getdata(Pax_t* pax, register Archive_t* ap, register File_t* f, int wfd) argument
203 if (wfd < 0)
205 else if (!(wfp = sfnew(NiL, NiL, SF_UNBOUND, wfd, SF_WRITE)))
H A Dfile.c53 int wfd; local
64 if ((wfd = open(state.tmp.file, O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, S_IRUSR)) < 0)
72 close(wfd);
89 if ((ip = sfopen(NiL, f->path, "r")) && (op = sfnew(NiL, NiL, SF_UNBOUND, wfd, SF_WRITE)) && (count = nocomment(ip, op)) < 0)
104 close(wfd);
118 close(wfd);
121 holeinit(wfd);
124 if (holewrite(wfd, state.tmp.buffer, n) != n)
133 holedone(wfd);
139 close(wfd);
1393 int wfd; local
[all...]
H A Ddelta.c368 register int wfd; local
381 if (!d->mark && selectfile(ap, d->info) && (wfd = openout(ap, d->info)) >= 0)
388 holeinit(wfd);
398 if (holewrite(wfd, state.tmp.buffer, n) != n)
405 holedone(wfd);
406 closeout(ap, d->info, wfd);
410 else if (state.ordered) paxdelta(NiL, ap, d->info, DELTA_DEL|DELTA_BIO|DELTA_SIZE, ap->delta->base, d->size, DELTA_TAR|DELTA_FD|DELTA_FREE|DELTA_OUTPUT|DELTA_COUNT|DELTA_LIST, wfd, 0);
411 else paxdelta(NiL, ap, d->info, DELTA_DEL|DELTA_FD|DELTA_OFFSET|DELTA_SIZE, ap->delta->base->io->fd, d->offset, d->size, DELTA_TAR|DELTA_FD|DELTA_FREE|DELTA_OUTPUT|DELTA_COUNT|DELTA_LIST, wfd, 0);
678 int wfd; local
684 if ((wfd
[all...]
H A Dpax-pds.c176 pds_getdata(Pax_t* pax, register Archive_t* ap, register File_t* f, int wfd) argument
H A Dpax-slt.c260 slt_getheader(Pax_t* pax, register Archive_t* ap, register File_t* f, int wfd) argument
364 slt_getdata(Pax_t* pax, register Archive_t* ap, register File_t* f, int wfd) argument
377 if (wfd < 0)
379 else if (!(wfp = sfnew(NiL, NiL, SF_UNBOUND, wfd, SF_WRITE)))
H A Dpax.c1812 n = proc->wfd;
1813 proc->wfd = 1;
/ast/src/lib/libast/misc/
H A Dprocclose.c44 if (p->wfd >= 0 && p->wfd != p->rfd)
45 close(p->wfd);
H A Dprocopen.c469 proc->wfd = -1;
862 proc->wfd = pio[1];
867 proc->wfd = pio[0];
869 proc->wfd = poi[1];
880 if (proc->wfd > 2)
881 fcntl(proc->wfd, F_SETFD, FD_CLOEXEC);
/ast/src/lib/libast/port/
H A Dastcopy.c27 * copy from rfd to wfd (with conditional mmap hacks)
45 * copy n bytes from rfd to wfd
51 astcopy(int rfd, int wfd, off_t n) argument
74 if (write(wfd, mapbuf, mapsize) != mapsize || lseek(rfd, mapsize, 1) == ((off_t)-1)) return(-1);
88 if ((c = read(rfd, buf, (size_t)n)) > 0 && write(wfd, buf, (size_t)c) != c) c = -1;
/ast/src/lib/libcs/
H A Dcsauth.c51 int wfd; local
96 wfd = 1;
98 else wfd = fd;
114 if (cswrite(state, wfd, tmp, n) != n)
191 n = cswrite(state, wfd, tmp, s - tmp);
H A Dcsopen.c335 if (cswrite(state, proc->wfd, tmp, n) != n)
343 if (cswrite(state, proc->wfd, num, 1) != 1)
/ast/src/lib/libast/disc/
H A Dsfdcmore.c77 * output label on wfd and return next char on rfd with no echo
99 int wfd = sffileno(rp); local
104 write(wfd, label, n);
127 write(wfd, "\r", 1);
129 write(wfd, " ", 1);
130 write(wfd, "\r", 1);
/ast/src/cmd/cs/
H A Dcss.c129 if ((n -= ++s - buf) > 0 && cswrite(css->state, state->proc->wfd, s, n) != n)
146 if (cswrite(css->state, state->proc->wfd, s, n) != n)
/ast/src/lib/libast/include/
H A Dproc.h89 int wfd; /* write fd if applicable */ member in struct:__anon273
/ast/src/lib/libast/sfio/
H A Dsfpopen.c172 (sflags&SF_READ) ? proc->rfd : proc->wfd, sflags|((sflags&SF_RDWR)?0:SF_READ))) ||
173 _sfpopen(f, (sflags&SF_READ) ? proc->wfd : -1, proc->pid, pflags) < 0)
/ast/src/lib/libcmd/
H A Dcp.c243 int wfd; local
598 else if ((wfd = open(state->path, (st.st_mode ? (state->wflags & ~O_EXCL) : state->wflags)|O_cloexec, ent->fts_statp->st_mode & state->perm)) < 0)
611 close(wfd);
614 if (!(op = sfnew(NiL, NiL, SF_UNBOUND, wfd, SF_WRITE)))
617 close(wfd);
626 if (sfsync(op) || state->sync && fsync(wfd) || sfclose(op))
637 close(wfd);
/ast/src/cmd/paxlib/calib/
H A Dcalib.c359 calib_getdata(Pax_t* pax, register Paxarchive_t* ap, register Paxfile_t* f, int wfd) argument
396 else if (wfd < 0)
398 else if (!(wfp = sfnew(NiL, NiL, SF_UNBOUND, wfd, SF_WRITE)))
718 if (sfsync(wfp) || ar->camap && camap_done(ar->cam, f->name, wfd) < 0)

Completed in 42 milliseconds