[med-svn] r9794 - trunk/packages/minc/trunk/debian/patches
Steven Michael Robbins
smr at alioth.debian.org
Sun Feb 26 07:06:39 UTC 2012
Author: smr
Date: 2012-02-26 07:06:39 +0000 (Sun, 26 Feb 2012)
New Revision: 9794
Removed:
trunk/packages/minc/trunk/debian/patches/03_mincview.diff
trunk/packages/minc/trunk/debian/patches/decompress-whole-file.diff
trunk/packages/minc/trunk/debian/patches/read_file_names-refactor.patch
Modified:
trunk/packages/minc/trunk/debian/patches/series
Log:
Update patch set for new upstream release 2.1.10.
Deleted: trunk/packages/minc/trunk/debian/patches/03_mincview.diff
===================================================================
--- trunk/packages/minc/trunk/debian/patches/03_mincview.diff 2012-02-25 22:02:06 UTC (rev 9793)
+++ trunk/packages/minc/trunk/debian/patches/03_mincview.diff 2012-02-26 07:06:39 UTC (rev 9794)
@@ -1,14 +0,0 @@
---- a/progs/mincview/mincview.old 2007-03-29 00:08:53.000000000 -0500
-+++ b/progs/mincview/mincview 2008-01-02 21:10:36.000000000 -0600
-@@ -6,9 +6,8 @@
- # Displays images with patient left on left side of the screen.
-
- # Constants
--set xv_visual = `xdpyinfo | awk '($1=="class:"){visual=$2};(($1=="depth:") && (visual=="TrueColor") && ($2==24)) {found=1}; END {if (found) print "-visual TrueColor"}'`
--set VIEWER = "xv" # Any pnm display program that handles a list of files
--set VIEWER_OPTIONS = "-geometry 512x512 -fixed -cmap -raw $xv_visual"
-+set VIEWER = "display" # Any pnm display program that handles a list of files
-+set VIEWER_OPTIONS = "-geometry 512x512"
- set PGM_CODE = "P5"
- set PPM_CODE = "P6"
- set usage = "Usage: $0 <filename.mnc> [<slice number>]"
Deleted: trunk/packages/minc/trunk/debian/patches/decompress-whole-file.diff
===================================================================
--- trunk/packages/minc/trunk/debian/patches/decompress-whole-file.diff 2012-02-25 22:02:06 UTC (rev 9793)
+++ trunk/packages/minc/trunk/debian/patches/decompress-whole-file.diff 2012-02-26 07:06:39 UTC (rev 9794)
@@ -1,22 +0,0 @@
-Description: Decompress entire externally-compressed file
- MINC 1 files were often compressed using gzip or similar. There is code in
- the library that decompresses only the initial portion of the file when only
- the header is required (e.g. for "mincinfo"). This code is broken for MINC 2
- files, so we work around this by forcing a decompression of the entire file.
-Author: Steve Robbins <smr at debian.org>
-Bug: 585676
-Forwarded: http://www.bic.mni.mcgill.ca/pipermail/minc-development/2011-December/000938.html
-
-
---- a/libsrc/netcdf_convenience.c.orig 2011-12-18 17:17:20.222227060 -0600
-+++ b/libsrc/netcdf_convenience.c 2011-12-18 17:45:40.734965898 -0600
-@@ -264,7 +264,8 @@
- #else /* Unix */
-
-
-- if (!header_only) { /* Decompress the whole file */
-+ /* Force whole file decompression always. */
-+ if (1) { /* Decompress the whole file */
-
- (void) sprintf(whole_command, "exec %s %s > %s 2> /dev/null",
- command, infile, outfile);
Deleted: trunk/packages/minc/trunk/debian/patches/read_file_names-refactor.patch
===================================================================
--- trunk/packages/minc/trunk/debian/patches/read_file_names-refactor.patch 2012-02-25 22:02:06 UTC (rev 9793)
+++ trunk/packages/minc/trunk/debian/patches/read_file_names-refactor.patch 2012-02-26 07:06:39 UTC (rev 9794)
@@ -1,590 +0,0 @@
-Description: Work around missing PATH_MAX definition
- Refactor code of read_file_names() into libminc2,
- fix so that it does not depend on PATH_MAX.
-Author: Steve Robbins <smr at debian.org>
-Bug: n/a
-Forwarded: no
-
---- minc-2.1.00.orig/Makefile.am
-+++ minc-2.1.00/Makefile.am
-@@ -67,6 +67,7 @@
- # not part of the installation.
- #
- noinst_HEADERS = \
-+ libsrc/read_file_names.h \
- libsrc/minc_basic.h \
- libsrc/minc_config.h \
- libsrc/minc_error.h \
-@@ -425,6 +426,7 @@
- libminc2_la_LDFLAGS = -version-info 2:3:1
- libminc2_la_SOURCES = \
- libsrc/ParseArgv.c \
-+ libsrc/read_file_names.c \
- libsrc/dim_conversion.c \
- libsrc/image_conversion.c \
- libsrc/minc_convenience.c \
---- /dev/null
-+++ minc-2.1.00/libsrc/read_file_names.c
-@@ -0,0 +1,99 @@
-+#if HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include "read_file_names.h"
-+
-+#define FILE_NAME_ALLOC_SIZE 10
-+#define FILE_PATH_MAX 2046
-+
-+
-+
-+/* ----------------------------- MNI Header -----------------------------------
-+ at NAME : read_file_names
-+ at INPUT : filelist - name of file from which to read names
-+ at OUTPUT : num_files - number of files read in
-+ at RETURNS : Pointer to a NULL-terminated array of file names
-+ at DESCRIPTION: Reads in a list of file names from file filelist or stdin if
-+ "-" is specified. Returns NULL if an error occurs. If
-+ no error occurs, then a pointer to an empty array is
-+ returned and num_files is zero.
-+ at METHOD :
-+ at GLOBALS :
-+ at CALLS :
-+ at CREATED : March 8, 1995 (Peter Neelin)
-+ at MODIFIED :
-+---------------------------------------------------------------------------- */
-+char **read_file_names(char *filelist, int *num_files)
-+{
-+ char **files;
-+ int array_size;
-+ int nfiles;
-+ FILE *fp;
-+ char line[FILE_PATH_MAX+1];
-+ int length;
-+
-+ /* Open the file */
-+ if (strcmp(filelist, "-") == 0) {
-+ fp = stdin;
-+ }
-+ else {
-+ fp = fopen(filelist, "r");
-+ if (fp == NULL) {
-+ (void) fprintf(stderr, "Error opening file \"%s\"\n", filelist);
-+ return NULL;
-+ }
-+ }
-+
-+ /* Allocate an initial array and NULL-terminate it */
-+ array_size = FILE_NAME_ALLOC_SIZE;
-+ files = malloc(sizeof(*files) * array_size);
-+ if (files == NULL) {
-+ (void) fprintf(stderr, "Error allocating memory\n");
-+ return NULL;
-+ }
-+ nfiles = 0;
-+ files[nfiles] = NULL;
-+
-+ /* Read in file names */
-+ while (fgets(line, sizeof(line)/sizeof(line[0]), fp) != NULL) {
-+
-+ /* Remove a trailing newline and check that there is a name */
-+ length = strlen(line);
-+ if ((length > 0) && (line[length-1] == '\n')) {
-+ line[length-1] = '\0';
-+ length--;
-+ }
-+ if (length == 0) continue;
-+
-+ /* Make room for names if needed */
-+ while (nfiles >= array_size-1) {
-+ array_size += FILE_NAME_ALLOC_SIZE;
-+ files = realloc(files, sizeof(*files) * array_size);
-+ if (files == NULL) {
-+ (void) fprintf(stderr, "Error allocating memory\n");
-+ return NULL;
-+ }
-+ }
-+
-+ /* Save the name, making sure that the list is NULL-terminated */
-+ files[nfiles] = strdup(line);
-+ if (files[nfiles] == NULL) {
-+ (void) fprintf(stderr, "Error allocating memory\n");
-+ return NULL;
-+ }
-+ nfiles++;
-+ files[nfiles] = NULL;
-+ }
-+
-+ /* Close the file */
-+ (void) fclose(fp);
-+
-+ /* Return the number of files */
-+ *num_files = nfiles;
-+
-+ return files;
-+}
---- /dev/null
-+++ minc-2.1.00/libsrc/read_file_names.h
-@@ -0,0 +1,18 @@
-+
-+
-+/* ----------------------------- MNI Header -----------------------------------
-+ at NAME : read_file_names
-+ at INPUT : filelist - name of file from which to read names
-+ at OUTPUT : num_files - number of files read in
-+ at RETURNS : Pointer to a NULL-terminated array of file names
-+ at DESCRIPTION: Reads in a list of file names from file filelist or stdin if
-+ "-" is specified. Returns NULL if an error occurs. If
-+ no error occurs, then a pointer to an empty array is
-+ returned and num_files is zero.
-+ at METHOD :
-+ at GLOBALS :
-+ at CALLS :
-+ at CREATED : March 8, 1995 (Peter Neelin)
-+ at MODIFIED :
-+---------------------------------------------------------------------------- */
-+char **read_file_names(char *filelist, int *num_files);
---- minc-2.1.00.orig/progs/minccalc/minccalc.c
-+++ minc-2.1.00/progs/minccalc/minccalc.c
-@@ -121,6 +121,7 @@
- #include <voxel_loop.h>
- #include <time_stamp.h>
- #include "node.h"
-+#include "read_file_names.h"
-
- /* Constants */
-
-@@ -143,7 +144,6 @@
- int input_vector_length, double *input_data[],
- int output_num_buffers, int output_vector_length,
- double *output_data[], Loop_Info *loop_info);
--static char **read_file_names(char *filelist, int *num_files);
- static char *read_expression_file(char *filename);
- static int get_list_option(char *dst, char *key, int argc, char **argv);
-
-@@ -516,93 +516,6 @@
- }
-
- /* ----------------------------- MNI Header -----------------------------------
-- at NAME : read_file_names
-- at INPUT : filelist - name of file from which to read names
-- at OUTPUT : num_files - number of files read in
-- at RETURNS : Pointer to a NULL-terminated array of file names
-- at DESCRIPTION: Reads in a list of file names from file filelist or stdin if
-- "-" is specified. Returns NULL if an error occurs. If
-- no error occurs, then a pointer to an empty array is
-- returned and num_files is zero.
-- at METHOD :
-- at GLOBALS :
-- at CALLS :
-- at CREATED : March 8, 1995 (Peter Neelin)
-- at MODIFIED :
------------------------------------------------------------------------------ */
--static char **read_file_names(char *filelist, int *num_files)
--{
--#define FILE_NAME_ALLOC_SIZE 10
-- char **files;
-- int array_size;
-- int nfiles;
-- FILE *fp;
-- char line[PATH_MAX+1];
-- int length;
--
-- /* Open the file */
-- if (strcmp(filelist, "-") == 0) {
-- fp = stdin;
-- }
-- else {
-- fp = fopen(filelist, "r");
-- if (fp == NULL) {
-- (void) fprintf(stderr, "Error opening file \"%s\"\n", filelist);
-- return NULL;
-- }
-- }
--
-- /* Allocate an initial array and NULL-terminate it */
-- array_size = FILE_NAME_ALLOC_SIZE;
-- files = malloc(sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles = 0;
-- files[nfiles] = NULL;
--
-- /* Read in file names */
-- while (fgets(line, sizeof(line)/sizeof(line[0]), fp) != NULL) {
--
-- /* Remove a trailing newline and check that there is a name */
-- length = strlen(line);
-- if ((length > 0) && (line[length-1] == '\n')) {
-- line[length-1] = '\0';
-- length--;
-- }
-- if (length == 0) continue;
--
-- /* Make room for names if needed */
-- while (nfiles >= array_size-1) {
-- array_size += FILE_NAME_ALLOC_SIZE;
-- files = realloc(files, sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- }
--
-- /* Save the name, making sure that the list is NULL-terminated */
-- files[nfiles] = strdup(line);
-- if (files[nfiles] == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles++;
-- files[nfiles] = NULL;
-- }
--
-- /* Close the file */
-- (void) fclose(fp);
--
-- /* Return the number of files */
-- *num_files = nfiles;
--
-- return files;
--}
--
--/* ----------------------------- MNI Header -----------------------------------
- @NAME : read_expression_file
- @INPUT : filename - Name of file from which to read expression
- @OUTPUT : (none)
---- minc-2.1.00.orig/progs/mincaverage/mincaverage.c
-+++ minc-2.1.00/progs/mincaverage/mincaverage.c
-@@ -105,6 +105,7 @@
- #include <ParseArgv.h>
- #include <time_stamp.h>
- #include <voxel_loop.h>
-+#include "read_file_names.h"
-
- /* Constants */
-
-@@ -165,7 +166,6 @@
- double *output_data[],
- Loop_Info *loop_info);
- static int get_double_list(char *dst, char *key, char *nextarg);
--static char **read_file_names(char *filelist, int *num_files);
-
- /* Argument variables */
- static int clobber = FALSE;
-@@ -1010,91 +1010,3 @@
-
- return TRUE;
- }
--
--/* ----------------------------- MNI Header -----------------------------------
-- at NAME : read_file_names
-- at INPUT : filelist - name of file from which to read names
-- at OUTPUT : num_files - number of files read in
-- at RETURNS : Pointer to a NULL-terminated array of file names
-- at DESCRIPTION: Reads in a list of file names from file filelist or stdin if
-- "-" is specified. Returns NULL if an error occurs. If
-- no error occurs, then a pointer to an empty array is
-- returned and num_files is zero.
-- at METHOD :
-- at GLOBALS :
-- at CALLS :
-- at CREATED : March 8, 1995 (Peter Neelin)
-- at MODIFIED :
------------------------------------------------------------------------------ */
--static char **read_file_names(char *filelist, int *num_files)
--{
--#define FILE_NAME_ALLOC_SIZE 10
-- char **files;
-- int array_size;
-- int nfiles;
-- FILE *fp;
-- char line[PATH_MAX+1];
-- int length;
--
-- /* Open the file */
-- if (strcmp(filelist, "-") == 0) {
-- fp = stdin;
-- }
-- else {
-- fp = fopen(filelist, "r");
-- if (fp == NULL) {
-- (void) fprintf(stderr, "Error opening file \"%s\"\n", filelist);
-- return NULL;
-- }
-- }
--
-- /* Allocate an initial array and NULL-terminate it */
-- array_size = FILE_NAME_ALLOC_SIZE;
-- files = malloc(sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles = 0;
-- files[nfiles] = NULL;
--
-- /* Read in file names */
-- while (fgets(line, sizeof(line)/sizeof(line[0]), fp) != NULL) {
--
-- /* Remove a trailing newline and check that there is a name */
-- length = strlen(line);
-- if ((length > 0) && (line[length-1] == '\n')) {
-- line[length-1] = '\0';
-- length--;
-- }
-- if (length == 0) continue;
--
-- /* Make room for names if needed */
-- while (nfiles >= array_size-1) {
-- array_size += FILE_NAME_ALLOC_SIZE;
-- files = realloc(files, sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- }
--
-- /* Save the name, making sure that the list is NULL-terminated */
-- files[nfiles] = strdup(line);
-- if (files[nfiles] == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles++;
-- files[nfiles] = NULL;
-- }
--
-- /* Close the file */
-- (void) fclose(fp);
--
-- /* Return the number of files */
-- *num_files = nfiles;
--
-- return files;
--}
--
---- minc-2.1.00.orig/progs/mincconcat/mincconcat.c
-+++ minc-2.1.00/progs/mincconcat/mincconcat.c
-@@ -129,6 +129,7 @@
- #include <ParseArgv.h>
- #include <time_stamp.h>
- #include <voxel_loop.h>
-+#include "read_file_names.h"
-
- /* Constants */
- #ifndef TRUE
-@@ -213,7 +214,6 @@
- static int sort_function(const void *value1, const void *value2);
- static void create_concat_file(int inmincid, Concat_Info *concat_info);
- static void update_history(int mincid, char *arg_string);
--static char **read_file_names(char *filelist, int *num_files);
-
- /* Globals */
- static int Sort_ascending = TRUE;
-@@ -1457,91 +1457,3 @@
- free(string);
-
- }
--
--/* ----------------------------- MNI Header -----------------------------------
-- at NAME : read_file_names
-- at INPUT : filelist - name of file from which to read names
-- at OUTPUT : num_files - number of files read in
-- at RETURNS : Pointer to a NULL-terminated array of file names
-- at DESCRIPTION: Reads in a list of file names from file filelist or stdin if
-- "-" is specified. Returns NULL if an error occurs. If
-- no error occurs, then a pointer to an empty array is
-- returned and num_files is zero.
-- at METHOD :
-- at GLOBALS :
-- at CALLS :
-- at CREATED : March 8, 1995 (Peter Neelin)
-- at MODIFIED :
------------------------------------------------------------------------------ */
--static char **read_file_names(char *filelist, int *num_files)
--{
--#define FILE_NAME_ALLOC_SIZE 10
-- char **files;
-- int array_size;
-- int nfiles;
-- FILE *fp;
-- char line[PATH_MAX+1];
-- int length;
--
-- /* Open the file */
-- if (strcmp(filelist, "-") == 0) {
-- fp = stdin;
-- }
-- else {
-- fp = fopen(filelist, "r");
-- if (fp == NULL) {
-- (void) fprintf(stderr, "Error opening file \"%s\"\n", filelist);
-- return NULL;
-- }
-- }
--
-- /* Allocate an initial array and NULL-terminate it */
-- array_size = FILE_NAME_ALLOC_SIZE;
-- files = malloc(sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles = 0;
-- files[nfiles] = NULL;
--
-- /* Read in file names */
-- while (fgets(line, sizeof(line)/sizeof(line[0]), fp) != NULL) {
--
-- /* Remove a trailing newline and check that there is a name */
-- length = strlen(line);
-- if ((length > 0) && (line[length-1] == '\n')) {
-- line[length-1] = '\0';
-- length--;
-- }
-- if (length == 0) continue;
--
-- /* Make room for names if needed */
-- while (nfiles >= array_size-1) {
-- array_size += FILE_NAME_ALLOC_SIZE;
-- files = realloc(files, sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- }
--
-- /* Save the name, making sure that the list is NULL-terminated */
-- files[nfiles] = strdup(line);
-- if (files[nfiles] == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles++;
-- files[nfiles] = NULL;
-- }
--
-- /* Close the file */
-- (void) fclose(fp);
--
-- /* Return the number of files */
-- *num_files = nfiles;
--
-- return files;
--}
--
---- minc-2.1.00.orig/progs/mincmath/mincmath.c
-+++ minc-2.1.00/progs/mincmath/mincmath.c
-@@ -123,6 +123,7 @@
- #include <ParseArgv.h>
- #include <time_stamp.h>
- #include <voxel_loop.h>
-+#include "read_file_names.h"
-
- /* Constants */
-
-@@ -219,7 +220,6 @@
- int output_num_buffers, int output_vector_length,
- double *output_data[],
- Loop_Info *loop_info);
--static char **read_file_names(char *filelist, int *num_files);
-
- /* Argument variables */
- static int clobber = FALSE;
-@@ -929,91 +929,3 @@
-
- return;
- }
--
--/* ----------------------------- MNI Header -----------------------------------
-- at NAME : read_file_names
-- at INPUT : filelist - name of file from which to read names
-- at OUTPUT : num_files - number of files read in
-- at RETURNS : Pointer to a NULL-terminated array of file names
-- at DESCRIPTION: Reads in a list of file names from file filelist or stdin if
-- "-" is specified. Returns NULL if an error occurs. If
-- no error occurs, then a pointer to an empty array is
-- returned and num_files is zero.
-- at METHOD :
-- at GLOBALS :
-- at CALLS :
-- at CREATED : March 8, 1995 (Peter Neelin)
-- at MODIFIED :
------------------------------------------------------------------------------ */
--static char **read_file_names(char *filelist, int *num_files)
--{
--#define FILE_NAME_ALLOC_SIZE 10
-- char **files;
-- int array_size;
-- int nfiles;
-- FILE *fp;
-- char line[PATH_MAX+1];
-- int length;
--
-- /* Open the file */
-- if (strcmp(filelist, "-") == 0) {
-- fp = stdin;
-- }
-- else {
-- fp = fopen(filelist, "r");
-- if (fp == NULL) {
-- (void) fprintf(stderr, "Error opening file \"%s\"\n", filelist);
-- return NULL;
-- }
-- }
--
-- /* Allocate an initial array and NULL-terminate it */
-- array_size = FILE_NAME_ALLOC_SIZE;
-- files = malloc(sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles = 0;
-- files[nfiles] = NULL;
--
-- /* Read in file names */
-- while (fgets(line, sizeof(line)/sizeof(line[0]), fp) != NULL) {
--
-- /* Remove a trailing newline and check that there is a name */
-- length = strlen(line);
-- if ((length > 0) && (line[length-1] == '\n')) {
-- line[length-1] = '\0';
-- length--;
-- }
-- if (length == 0) continue;
--
-- /* Make room for names if needed */
-- while (nfiles >= array_size-1) {
-- array_size += FILE_NAME_ALLOC_SIZE;
-- files = realloc(files, sizeof(*files) * array_size);
-- if (files == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- }
--
-- /* Save the name, making sure that the list is NULL-terminated */
-- files[nfiles] = strdup(line);
-- if (files[nfiles] == NULL) {
-- (void) fprintf(stderr, "Error allocating memory\n");
-- return NULL;
-- }
-- nfiles++;
-- files[nfiles] = NULL;
-- }
--
-- /* Close the file */
-- (void) fclose(fp);
--
-- /* Return the number of files */
-- *num_files = nfiles;
--
-- return files;
--}
--
Modified: trunk/packages/minc/trunk/debian/patches/series
===================================================================
--- trunk/packages/minc/trunk/debian/patches/series 2012-02-25 22:02:06 UTC (rev 9793)
+++ trunk/packages/minc/trunk/debian/patches/series 2012-02-26 07:06:39 UTC (rev 9794)
@@ -1,4 +1 @@
01_mincedit-sensible-viewer.diff
-03_mincview.diff
-decompress-whole-file.diff
-read_file_names-refactor.patch
More information about the debian-med-commit
mailing list