Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.bin/bzip2 Pull up revisions 1.3 and 1.4:
details: https://anonhg.NetBSD.org/src/rev/0c46b325e0fd
branches: netbsd-1-4
changeset: 468126:0c46b325e0fd
user: tron <tron%NetBSD.org@localhost>
date: Thu Apr 08 18:37:54 1999 +0000
description:
Pull up revisions 1.3 and 1.4:
Allow softlinks for "bzip2 -c -d" or "bzcat".
diffstat:
usr.bin/bzip2/bzip2.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r 336d309815eb -r 0c46b325e0fd usr.bin/bzip2/bzip2.c
--- a/usr.bin/bzip2/bzip2.c Thu Apr 08 17:08:46 1999 +0000
+++ b/usr.bin/bzip2/bzip2.c Thu Apr 08 18:37:54 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzip2.c,v 1.2 1998/09/14 02:37:24 ross Exp $ */
+/* $NetBSD: bzip2.c,v 1.2.2.1 1999/04/08 18:37:54 tron Exp $ */
/*-----------------------------------------------------------*/
/*--- A block-sorting, lossless compressor bzip2.c ---*/
@@ -767,14 +767,16 @@
/*--
if in doubt, return True
--*/
-Bool notAStandardFile ( Char* name )
+Bool notAStandardFile ( Char* name , IntNative allowSymbolicLinks )
{
IntNative i;
struct MY_STAT statBuf;
- i = MY_LSTAT ( name, &statBuf );
+ i = allowSymbolicLinks ? MY_STAT ( name, &statBuf ) :
+ MY_LSTAT ( name, &statBuf );
if (i != 0) return True;
if (MY_S_IFREG(statBuf.st_mode)) return False;
+
return True;
}
@@ -878,7 +880,7 @@
progName, inName );
return;
}
- if ( srcMode != SM_I2O && notAStandardFile ( inName )) {
+ if ( srcMode != SM_I2O && notAStandardFile ( inName, False )) {
fprintf ( stderr, "%s: Input file %s is not a normal file, skipping.\n",
progName, inName );
return;
@@ -1003,7 +1005,7 @@
progName, inName );
return;
}
- if ( srcMode != SM_I2O && notAStandardFile ( inName )) {
+ if ( srcMode != SM_I2O && notAStandardFile ( inName, srcMode == SM_F2O )) {
fprintf ( stderr, "%s: Input file %s is not a normal file, skipping.\n",
progName, inName );
return;
@@ -1133,7 +1135,7 @@
progName, inName );
return;
}
- if ( srcMode != SM_I2O && notAStandardFile ( inName )) {
+ if ( srcMode != SM_I2O && notAStandardFile ( inName, True )) {
fprintf ( stderr, "%s: Input file %s is not a normal file, skipping.\n",
progName, inName );
return;
Home |
Main Index |
Thread Index |
Old Index