Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/sort the g/c in rev 1.12 was too aggressive - put ba...



details:   https://anonhg.NetBSD.org/src/rev/5def681a87b1
branches:  trunk
changeset: 502092:5def681a87b1
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Jan 11 15:10:46 2001 +0000

description:
the g/c in rev 1.12 was too aggressive - put back code
to change file '-' to '/dev/stdin'

diffstat:

 usr.bin/sort/sort.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r e3720727fdc4 -r 5def681a87b1 usr.bin/sort/sort.c
--- a/usr.bin/sort/sort.c       Thu Jan 11 14:56:07 2001 +0000
+++ b/usr.bin/sort/sort.c       Thu Jan 11 15:10:46 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sort.c,v 1.13 2001/01/11 14:05:24 jdolecek Exp $       */
+/*     $NetBSD: sort.c,v 1.14 2001/01/11 15:10:46 jdolecek Exp $       */
 
 /*-
  * Copyright (c) 1993
@@ -51,7 +51,7 @@
 #endif /* not lint */
 
 #ifndef lint
-__RCSID("$NetBSD: sort.c,v 1.13 2001/01/11 14:05:24 jdolecek Exp $");
+__RCSID("$NetBSD: sort.c,v 1.14 2001/01/11 15:10:46 jdolecek Exp $");
 __SCCSID("@(#)sort.c   8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -196,6 +196,11 @@
                                    argv[i]);
                        else
                                stdinflag = 1;
+
+                       /* change to /dev/stdin if '-' */
+                       if (argv[i][0] == '-')
+                               argv[i] = _PATH_STDIN;
+
                } else if ((ch = access(argv[i], R_OK)))
                        err(2, "%s", argv[i]);
        }



Home | Main Index | Thread Index | Old Index