Lines Matching refs:outfd
101 int i, nsegs, isdata = 0, infd, outfd;
106 outfd = creat (new_name, 0666);
107 if (outfd < 0) fatal_unexec ("creating %s", new_name);
153 WRITE (outfd, u_xexecp, sizeof (struct xexec),
155 WRITE (outfd, u_xextp, sizeof (struct xext),
158 SEEK (outfd, segpos, "seek error on %s", new_name);
162 copyrec (infd, outfd, sizeof (struct xseg), a_name, new_name);
170 WRITE (outfd, u_xsegp, sizeof (struct xseg),
181 WRITE (outfd, u_xsegp, sizeof (struct xseg),
186 SEEK (outfd, textpos, "seek error on %s", new_name);
187 copyrec (infd, outfd, textlen, a_name, new_name);
189 SEEK (outfd, datapos, "seek error on %s", new_name);
190 WRITE (outfd, data_org, datalen,
204 SEEK (outfd, u_xsegp->xs_filpos + datadiff, "seek error on %s", new_name);
205 copyrec (infd, outfd, u_xsegp->xs_psize, a_name, new_name);
208 close (outfd);
213 copyrec (infd, outfd, len, in_name, out_name)
214 int infd, outfd, len;
226 WRITE (outfd, buf, chunk, "error writing %s", out_name);