changeset 1286:4342fd888f8f

Added support for bzipped files (thanks to Steve Robbins).
author neelin <neelin>
date Wed, 13 Sep 2000 14:12:35 +0000
parents 26dcce6f5b86
children 82f6f8cdcfd6
files progs/minc_modify_header/minc_modify_header.c progs/minc_modify_header/minc_modify_header.man1
diffstat 2 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/progs/minc_modify_header/minc_modify_header.c
+++ b/progs/minc_modify_header/minc_modify_header.c
@@ -10,7 +10,10 @@
 @CREATED    : March 31, 1995 (Peter Neelin)
 @MODIFIED   : 
  * $Log: minc_modify_header.c,v $
- * Revision 6.1  1999-10-19 14:45:17  neelin
+ * Revision 6.2  2000-09-13 14:12:35  neelin
+ * Added support for bzipped files (thanks to Steve Robbins).
+ *
+ * Revision 6.1  1999/10/19 14:45:17  neelin
  * Fixed Log subsitutions for CVS
  *
  * Revision 6.0  1997/09/12 13:24:07  neelin
@@ -47,7 +50,7 @@
 ---------------------------------------------------------------------------- */
 
 #ifndef lint
-static char rcsid[]="$Header: /private-cvsroot/minc/progs/minc_modify_header/minc_modify_header.c,v 6.1 1999-10-19 14:45:17 neelin Exp $";
+static char rcsid[]="$Header: /private-cvsroot/minc/progs/minc_modify_header/minc_modify_header.c,v 6.2 2000-09-13 14:12:35 neelin Exp $";
 #endif
 
 #include <stdlib.h>
@@ -61,6 +64,8 @@
 
 /* Constants */
 #define MINC_EXTENSION ".mnc"
+#define BZIP_EXTENSION ".bz"
+#define BZIP2_EXTENSION ".bz2"
 #define GZIP_EXTENSION ".gz"
 #define COMPRESS_EXTENSION ".Z"
 #define PACK_EXTENSION ".z"
@@ -144,6 +149,10 @@
    else {
       tempfile = strstr(string, GZIP_EXTENSION);
       if (tempfile == NULL)
+         tempfile = strstr(string, BZIP_EXTENSION);
+      if (tempfile == NULL)
+         tempfile = strstr(string, BZIP2_EXTENSION);
+      if (tempfile == NULL)
          tempfile = strstr(string, COMPRESS_EXTENSION);
       if (tempfile == NULL)
          tempfile = strstr(string, PACK_EXTENSION);
--- a/progs/minc_modify_header/minc_modify_header.man1
+++ b/progs/minc_modify_header/minc_modify_header.man1
@@ -8,7 +8,7 @@
 .\" software for any purpose.  It is provided "as is" without
 .\" express or implied warranty.
 .\"
-.\" $Header: /private-cvsroot/minc/progs/minc_modify_header/minc_modify_header.man1,v 6.0 1997-09-12 13:24:07 neelin Rel $
+.\" $Header: /private-cvsroot/minc/progs/minc_modify_header/minc_modify_header.man1,v 6.1 2000-09-13 14:12:36 neelin Exp $
 .\"
 .TH MINC_MODIFY_HEADER 1
 
@@ -31,8 +31,9 @@
 
 If the file is compressed, then it is first decompressed into a file
 whose name is either the same as that of the original file up to the
-".mnc" extension or the same minus the compression extension (".gz",
-".Z", ".z" or ".zip"). The new file will not be re-compressed.
+".mnc" extension or the same minus the compression extension 
+(".bz", ".bz2", ".gz", ".Z", ".z" or ".zip"). 
+The new file will not be re-compressed.
 
 Care is taken to completely overwrite any existing attribute when
 inserting a new attribute so that information is guaranteed to be