Index: trunk/ippTasks/pantasks.pro
===================================================================
--- trunk/ippTasks/pantasks.pro	(revision 12241)
+++ trunk/ippTasks/pantasks.pro	(revision 12697)
@@ -155,25 +155,22 @@
 end
 
-macro set_standard_args
-  # XXX be careful: $ARGS cannot be resolved as ""
-  # XXX currently, sprintf is the only good way of creating 
-  # an empty variable
-  if ($?WORKDIR == 0) 
-    echo error in pantasks: WORKDIR not set
+macro add_standard_args
+  if ($0 != 2)
+    echo "Must pass in the command of interest, and this function will supplement"
     stop
   end
-  if ($?DBNAME == 0) 
-    echo error in pantasks: DBNAME not set
-    stop
-  end
-  if ("$DBNAME" != "DEFAULT")
-    $ARGS = --workdir $WORKDIR --dbname $DBNAME
-  else
-    $ARGS = --workdir $WORKDIR
+
+  local command
+  $command = $$1
+
+  if ($?DBNAME && "$DBNAME" != "DEFAULT")
+    $command = $command --dbname $DBNAME
   end
   if ($?NOOP != 0)
-    $ARGS = $ARGS --no-op
-  end
-end
+    $command = $command --no-op
+  end
+  $$1 = $command
+end
+
 
 macro process_exit
