Index: trunk/ppImage/src/ppImageConfig.c
===================================================================
--- trunk/ppImage/src/ppImageConfig.c	(revision 6318)
+++ trunk/ppImage/src/ppImageConfig.c	(revision 6747)
@@ -1,14 +1,11 @@
 #include <stdio.h>
 #include "pslib.h"
-#include "pmConfig.h"
-#include "ppConfig.h"
+#include "psmodules.h"
 #include "ppImage.h"
 
-bool ppImageConfig(ppConfig *config, int argc, char **argv)
+pmConfig *ppImageConfig(int argc, char **argv)
 {
-    // XXX - this should be split into a function to parse argc,argv
-    //       and a second to read the config files.
-    //       all argc,argv should be interpretted before work is done.
-    if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) {
+    pmConfig *config = pmConfigRead(&argc, argv);
+    if (! config) {
         psErrorStackPrint(stderr, "Can't find site configuration!\n");
         exit(EXIT_FAILURE);
@@ -17,5 +14,4 @@
     // Parse other command-line arguments
     config->arguments = psMetadataAlloc(); // The arguments, with default values
-
     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-key", 0, "exposure ID", "");
     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-bias", 0, "Name of the bias image", "");
@@ -43,4 +39,4 @@
 #endif
 
-    return true;
+    return config;
 }
