Index: trunk/ppMerge/src/ppMergeConfig.c
===================================================================
--- trunk/ppMerge/src/ppMergeConfig.c	(revision 7067)
+++ trunk/ppMerge/src/ppMergeConfig.c	(revision 7073)
@@ -7,14 +7,13 @@
 
 // Output usage information
-static void usage(const char *programName // Name of the program
+static void usage(const char *programName, // Name of the program
+                  pmConfig *config      // Configuration (contains the arguments list)
     )
 {
     printf("Merge multiple calibration frames into a master frame by stacking.\n\n"
            "Usage:\n"
-           "\t%s OUTPUT.fits [-files FILES] [-list FILE_LIST]\n\n"
-           "where:\n"
-           "FILES       is a glob to be interpreted by the program.\n"
-           "FILE_LIST   is a list of files (including a glob interpreted by the shell).\n"
+           "\t%s OUTPUT.fits INPUT1.fits INPUT2.fits ...\n"
            "\n", programName);
+    psArgumentHelp(config->arguments);
     exit(EXIT_FAILURE);
 }
@@ -22,16 +21,12 @@
 pmConfig *ppMergeConfig(int *argc, char **argv)
 {
-    if (*argc == 1) {
-        usage(argv[0]);
+    pmConfig *config = pmConfigRead(argc, argv);
+    // Load the site-wide configuration information
+    if (! config) {
+        psErrorStackPrint(stderr, "Can't find site configuration!\n");
+        exit(EXIT_FAILURE);
     }
 
-    // Load the site-wide configuration information
-    pmConfig *config = pmConfigRead(argc, argv);
-    if (! config) {
-        psErrorStackPrint(stderr, "Can't find site configuration!\n");
-        usage(argv[0]);
-    }
-
-    // Parse other command-line arguments, save for future use
+    // Command-line arguments
     config->arguments = psMetadataAlloc(); // The arguments, with default values
     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-type", 0, "Type of calibration frame", "");
@@ -41,7 +36,11 @@
     psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-onoff", 0, "Number of on/off pairs", 0);
 
+    if (*argc == 1) {
+        usage(argv[0], config);
+    }
+
     // Parse the arguments
-    if (! psArgumentParse(config->arguments, argc, argv) || *argc != 2) {
-        usage(argv[0]);
+    if (! psArgumentParse(config->arguments, argc, argv) || *argc < 3) {
+        usage(argv[0], config);
     }
 
@@ -56,6 +55,7 @@
     psArray *files = psArrayAlloc(*argc - 2);
     for (int i = 2; i < *argc; i++) {
-        files->data[i] = psStringCopy(argv[i]);
+        files->data[i - 2] = psStringCopy(argv[i]);
     }
+    files->n = *argc - 2;
     psMetadataAddPtr(config->arguments, PS_LIST_TAIL, "INPUT", PS_DATA_ARRAY,
                      "Array of inputs images", files);
