Index: trunk/pswarp/src/pswarpArguments.c
===================================================================
--- trunk/pswarp/src/pswarpArguments.c	(revision 27227)
+++ trunk/pswarp/src/pswarpArguments.c	(revision 31159)
@@ -42,4 +42,10 @@
     }
 
+    // generic arguments (version, dumpconfig)
+    PS_ARGUMENTS_GENERIC( pswarp, config, argc, argv );
+
+    // thread arguments
+    PS_ARGUMENTS_THREADS( pswarp, config, argc, argv )
+
     // save the following additional recipe values based on command-line options
     // these options override the PSWARP recipe values loaded from recipe files
@@ -76,24 +82,5 @@
     }
 
-    // Number of threads
-    if ((N = psArgumentGet(argc, argv, "-threads"))) {
-        psArgumentRemove(N, &argc, argv);
-        int nThreads = atoi(argv[N]);
-        psMetadataAddS32(config->arguments, PS_LIST_TAIL, "NTHREADS", 0, "number of warp threads", nThreads);
-        psArgumentRemove(N, &argc, argv);
-
-        // create the thread pool with number of desired threads, supplying our thread launcher function
-        // XXX need to determine the number of threads from the config data
-        psThreadPoolInit (nThreads);
-    }
     pswarpSetThreads();
-
-    if ((N = psArgumentGet(argc, argv, "-dumpconfig"))) {
-        psArgumentRemove(N, &argc, argv);
-        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "DUMP_CONFIG", PS_META_REPLACE,
-                         "Filename for configuration dump", argv[N]);
-        psArgumentRemove(N, &argc, argv);
-    }
-
 
     pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT", "-file", "-list");
