show.c (99110) | show.c (99634) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 26 unchanged lines hidden (view full) --- 35 */ 36 37#ifndef lint 38#if 0 39static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95"; 40#endif 41#endif /* not lint */ 42#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 26 unchanged lines hidden (view full) --- 35 */ 36 37#ifndef lint 38#if 0 39static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95"; 40#endif 41#endif /* not lint */ 42#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/bin/sh/show.c 99110 2002-06-30 05:15:05Z obrien $"); | 43__FBSDID("$FreeBSD: head/bin/sh/show.c 99634 2002-07-09 03:26:47Z tjr $"); |
44 45#include <stdio.h> 46#include <stdarg.h> 47#include <errno.h> 48 49#include "shell.h" 50#include "parser.h" 51#include "nodes.h" --- 95 unchanged lines hidden (view full) --- 147 case NFROMTO: s = "<>"; dftfd = 0; break; 148 case NFROMFD: s = "<&"; dftfd = 0; break; 149 default: s = "*error*"; dftfd = 0; break; 150 } 151 if (np->nfile.fd != dftfd) 152 fprintf(fp, "%d", np->nfile.fd); 153 fputs(s, fp); 154 if (np->nfile.type == NTOFD || np->nfile.type == NFROMFD) { | 44 45#include <stdio.h> 46#include <stdarg.h> 47#include <errno.h> 48 49#include "shell.h" 50#include "parser.h" 51#include "nodes.h" --- 95 unchanged lines hidden (view full) --- 147 case NFROMTO: s = "<>"; dftfd = 0; break; 148 case NFROMFD: s = "<&"; dftfd = 0; break; 149 default: s = "*error*"; dftfd = 0; break; 150 } 151 if (np->nfile.fd != dftfd) 152 fprintf(fp, "%d", np->nfile.fd); 153 fputs(s, fp); 154 if (np->nfile.type == NTOFD || np->nfile.type == NFROMFD) { |
155 fprintf(fp, "%d", np->ndup.dupfd); | 155 if (np->ndup.dupfd >= 0) 156 fprintf(fp, "%d", np->ndup.dupfd); 157 else 158 fprintf(fp, "-"); |
156 } else { 157 sharg(np->nfile.fname, fp); 158 } 159 first = 0; 160 } 161} 162 163 --- 243 unchanged lines hidden --- | 159 } else { 160 sharg(np->nfile.fname, fp); 161 } 162 first = 0; 163 } 164} 165 166 --- 243 unchanged lines hidden --- |