aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-11-26 05:14:57 -0800
committerThomas White <taw@physics.org>2014-05-08 17:52:02 +0200
commit1bc44dd21dc49a3920431cfee4495a28a45df622 (patch)
tree951831597e5a1503f4e83eaf4a363bac41528056 /src/indexamajig.c
parent2400441598cd7876949f6b1ed52c14b6e469368c (diff)
Strip out the "prepare_filename" rubbish
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index ab148a0b..c41b1487 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -177,7 +177,6 @@ int main(int argc, char *argv[])
char *outfile = NULL;
FILE *fh;
int ofd;
- char *rval = NULL;
int config_checkprefix = 1;
int config_basename = 0;
int integrate_saturated = 0;
@@ -189,9 +188,6 @@ int main(int argc, char *argv[])
char *speaks = NULL;
char *toler = NULL;
int n_proc = 1;
- char *prepare_line;
- char prepare_filename[1024];
- char *use_this_one_instead;
struct index_args iargs;
char *intrad = NULL;
char *int_str = NULL;
@@ -630,28 +626,10 @@ int main(int argc, char *argv[])
}
free(outfile);
- /* Get first filename and use it to set up the indexing */
- prepare_line = malloc(1024);
- rval = fgets(prepare_line, 1023, fh);
- if ( rval == NULL ) {
- ERROR("Failed to get filename to prepare indexing.\n");
- return 1;
- }
- use_this_one_instead = strdup(prepare_line);
- chomp(prepare_line);
- if ( config_basename ) {
- char *tmp;
- tmp = safe_basename(prepare_line);
- free(prepare_line);
- prepare_line = tmp;
- }
- snprintf(prepare_filename, 1023, "%s%s", prefix, prepare_line);
- free(prepare_line);
-
/* Prepare the indexer */
if ( indm != NULL ) {
- ipriv = prepare_indexing(indm, iargs.cell, prepare_filename,
- iargs.det, iargs.beam, iargs.tols);
+ ipriv = prepare_indexing(indm, iargs.cell, iargs.det,
+ iargs.beam, iargs.tols);
if ( ipriv == NULL ) {
ERROR("Failed to prepare indexing.\n");
return 1;
@@ -666,7 +644,7 @@ int main(int argc, char *argv[])
iargs.ipriv = ipriv;
create_sandbox(&iargs, n_proc, prefix, config_basename, fh,
- use_this_one_instead, ofd, argc, argv, tempdir);
+ ofd, argc, argv, tempdir);
free(prefix);
free(tempdir);