diff options
author | wosch <wosch@FreeBSD.org> | 1996-03-08 06:58:08 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-03-08 06:58:08 +0000 |
commit | b149de385358aae454e84aaa2ae0182793af8c2b (patch) | |
tree | 0181aa2ba8a9c3b8c895b9eb57d4f15b2bfb8a56 /bin/cp/cp.c | |
parent | 4ce0328b770359966fa9f49ac04f6ee8f1c9d235 (diff) | |
download | FreeBSD-src-b149de385358aae454e84aaa2ae0182793af8c2b.zip FreeBSD-src-b149de385358aae454e84aaa2ae0182793af8c2b.tar.gz |
Option -f implemented (remove + create)
option -f and -i are exclusive
respond `Y' is equal to `y'
fix usage string
remove isatty(3) check
Reviewed by: pst
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r-- | bin/cp/cp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 456b0f2..83f8a9c 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cp.c,v 1.8 1996/02/19 00:43:42 wosch Exp $ + * $Id: cp.c,v 1.9 1996/02/19 05:56:33 pst Exp $ */ #ifndef lint @@ -86,7 +86,7 @@ static char sccsid[] = "@(#)cp.c 8.2 (Berkeley) 4/1/94"; PATH_T to = { to.p_path, "" }; uid_t myuid; -int Rflag, iflag, pflag, rflag; +int Rflag, iflag, pflag, rflag, fflag; int myumask; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; @@ -123,10 +123,12 @@ main(argc, argv) Rflag = 1; break; case 'f': + fflag = 1; iflag = 0; break; case 'i': - iflag = isatty(fileno(stdin)); + iflag = 1; + fflag = 0; break; case 'p': pflag = 1; |