aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-03-29 18:11:56 +0200
committerThomas White <taw@physics.org>2010-03-29 18:11:56 +0200
commitfc441bafd638cb8913b9b71833c1a9f84b70f4f0 (patch)
tree2df8cd65ccc74f1eea7e6b8ecb1feb5c7ed6dfbf
parent86c55dc5590ed44e61d4fa95eec2273cdf13623f (diff)
compare_hkl: Allow no -o parameter
-rw-r--r--src/compare_hkl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index 50ca6282..63daf318 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -92,11 +92,6 @@ int main(int argc, char *argv[])
}
- if ( outfile == NULL ) {
- ERROR("You must specify the output filename with -o\n");
- return 1;
- }
-
cell = load_cell_from_pdb("molecule.pdb");
ref1 = read_reflections(afile, NULL);
if ( ref1 == NULL ) {
@@ -127,7 +122,9 @@ int main(int argc, char *argv[])
}
}
- write_reflections(outfile, NULL, out, 1, cell);
+ if ( outfile != NULL ) {
+ write_reflections(outfile, NULL, out, 1, cell);
+ }
return 0;
}