aboutsummaryrefslogtreecommitdiff
path: root/src/cell_tool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cell_tool.c')
-rw-r--r--src/cell_tool.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cell_tool.c b/src/cell_tool.c
index beb03597..8453c9f7 100644
--- a/src/cell_tool.c
+++ b/src/cell_tool.c
@@ -378,10 +378,25 @@ int main(int argc, char *argv[])
}
+ /* If there's a parameter left over, we assume it's the unit cell */
+ if ( (argc > optind) && (cell_file == NULL) ) {
+ cell_file = strdup(argv[optind++]);
+ }
+
+ /* If there's STILL a parameter left over, complain*/
+ if ( argc > optind ) {
+ ERROR("Excess command-line arguments:\n");
+ do {
+ ERROR("'%s'\n", argv[optind++]);
+ } while ( argc > optind );
+ return 1;
+ }
+
if ( cell_file == NULL ) {
ERROR("You must give a filename for the unit cell PDB file.\n");
return 1;
}
+ STATUS("Input unit cell: %s\n", cell_file);
cell = load_cell_from_file(cell_file);
if ( cell == NULL ) {
ERROR("Failed to load cell from '%s'\n", cell_file);