nfile
char nfile[1024];
(void) shf_snprintf(nfile, sizeof(nfile), "%s.%d", hname, procpid);
if ((fd = creat(nfile, 0600)) < 0)
unlink(nfile);
unlink(nfile);
if (rename(nfile, hname) < 0)
for (rn = n->nredir.redirect; rn; rn = rn->nfile.next)
for (redir = n ; redir ; redir = redir->nfile.next) {
expandarg(redir->nfile.fname, &fn, EXP_TILDE | EXP_REDIR);
redir->nfile.expfname = fn.list->text;
for (rn = n->nredir.redirect; rn != NULL; rn = rn->nfile.next)
for (rn = cmd->ncmd.redirect; rn; rn = rn->nfile.next)
if (n->nfile.fd != i)
cmdputi(n->nfile.fd);
(void) cmdtxt(n->nfile.fname, 0);
np = stalloc(sizeof(struct nfile));
np->nfile.fd = fd; /* do this again later with updated fd */
if (fd != np->nfile.fd)
if (sizeof (struct nfile) != sizeof (struct nhere))
np->nfile.fd = fd;
rpp = &n2->nfile.next;
rpp = &n2->nfile.next;
rpp = &n->nfile.next;
n->nfile.fname = makeword(startlinno - elided_nl);
if ((redir_sym[n->type - MIN_REDIR][0] == '<' && n->nfile.fd != 0) ||
(redir_sym[n->type - MIN_REDIR][0] == '>' && n->nfile.fd != 1))
outfmt(out, "%d", n->nfile.fd);
outstr(n->nfile.expfname, out);
for (n = redir ; n ; n = n->nfile.next) {
fd = n->nfile.fd;
if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) &&
int fd = redir->nfile.fd;
switch (redir->nfile.type) {
fname = redir->nfile.expfname;
fname = redir->nfile.expfname;
fname = redir->nfile.expfname;
fname = redir->nfile.expfname;
fname = redir->nfile.expfname;
"<>"[redir->nfile.type==NTOFD], redir->ndup.dupfd));
"<>"[redir->nfile.type==NTOFD]));
for ( ; np ; np = np->nfile.next) {
switch (np->nfile.type) {
if (np->nfile.fd != dftfd) {
sprintf(buf, "%d", np->nfile.fd);
if (np->nfile.type == NTOFD || np->nfile.type == NFROMFD) {
if (np->nfile.type == NHERE || np->nfile.type == NXHERE) {
if (np->nfile.type == NHERE)
sharg(np->nfile.fname, fp);
print_verbage(const char *file, const char *nfile, off_t usize, off_t gsize)
if (nfile)
fprintf(stderr, " -- replaced with %s", nfile);
show(const char *nfile, const char *file, int copies)
if (strcmp(nfile, " ") == 0)
nfile = "(standard input)";
ldump(nfile, file, copies);
dump(nfile, file, copies);
dump(const char *nfile, const char *file, int copies)
if (((n = strlen(nfile)) + col + fill) >= SIZCOL-4) {
printf("%s", nfile);
ldump(const char *nfile, const char *file, int copies)
printf("%-2d copies of %-19s", copies, nfile);
printf("%-32s", nfile);
static int nfile(char *);
tfd = nfile(tfname);
fd = nfile(dfname);
int len, maxfile, nfile, ovflw;
KGET(FNL_NFILE, nfile);
(void)printf("%3d/%3d files\n", nfile, maxfile);
nfile = len / sizeof(struct kinfo_file);
(void)printf("%d/%d open files\n", nfile, maxfile);
for (ki = (struct kinfo_file *)offset; nfile--; ki++) {