diff options
author | Thomas White <taw@physics.org> | 2010-09-13 10:54:34 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:57 +0100 |
commit | 4a235243ee6838b2745d9b3e8999d29fa76c394a (patch) | |
tree | 6440b10da74abba99edeaa2dcc72bf440bc39c68 /src/indexamajig.c | |
parent | fcee934f899225e8e65aec86dea5106b7133c1a5 (diff) |
facetron: Add options
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index f63936c5..39905fb4 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -24,8 +24,6 @@ #include <gsl/gsl_errno.h> #include <pthread.h> #include <sys/time.h> -#include <sys/types.h> -#include <sys/stat.h> #include "utils.h" #include "hdf5-file.h" @@ -171,44 +169,6 @@ static void show_help(const char *s) } -static char *check_prefix(char *prefix) -{ - int r; - struct stat statbuf; - char *new; - size_t len; - - /* Is "prefix" a directory? */ - r = stat(prefix, &statbuf); - if ( r != 0 ) { - /* "prefix" probably doesn't exist. This is fine - assume - * the user knows what they're doing, and that "prefix" - * suffixed with the actual filename will produce something - * sensible. */ - return prefix; - } - - if ( !S_ISDIR(statbuf.st_mode) ) { - /* Also fine, as above. */ - return prefix; - } - - /* Does the prefix end in a slash? */ - if ( prefix[strlen(prefix)-1] == '/' ) { - /* This looks sensible. */ - return prefix; - } - - STATUS("Your prefix ('%s') is a directory, but doesn't end" - " with a slash. I'm going to add it for you.\n", prefix); - len = strlen(prefix)+2; - new = malloc(len); - snprintf(new, len, "%s/", prefix); - free(prefix); - return new; -} - - static struct image *get_simage(struct image *template, int alternate) { struct image *image; |