about summary refs log tree commit diff
path: root/other
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-05-05 16:35:07 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-05-05 16:35:07 +0000
commita660613f86d10eeba1cb1232c29ab056e782d8f0 (patch)
treed0d3a251221fb6596a0666647071f36eb9b4e6cf /other
parent2a8d70d6344a8a2730cc6199c60096e211202280 (diff)
downloadnetpbm-mirror-a660613f86d10eeba1cb1232c29ab056e782d8f0.tar.gz
netpbm-mirror-a660613f86d10eeba1cb1232c29ab056e782d8f0.tar.xz
netpbm-mirror-a660613f86d10eeba1cb1232c29ab056e782d8f0.zip
cleanup - don't use shell to run Pamscale
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2753 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other')
-rw-r--r--other/pamlookup.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/other/pamlookup.c b/other/pamlookup.c
index 4ceb047f..d57546d9 100644
--- a/other/pamlookup.c
+++ b/other/pamlookup.c
@@ -99,7 +99,8 @@ fitLookup(tuple **     const inputLookup,
 /*----------------------------------------------------------------------------
   Scale the lookup table image so that it has dimensions 'cols' x 'rows'.
 -----------------------------------------------------------------------------*/
-    const char * pamscaleCommand;
+    const char * widthArg;
+    const char * heightArg;
     struct pamtuples inPamtuples;
     struct pamtuples outPamtuples;
 
@@ -107,18 +108,21 @@ fitLookup(tuple **     const inputLookup,
     fitLookuppamP->width = cols;
     fitLookuppamP->height = rows;
 
-    pm_asprintf(&pamscaleCommand, "pamscale -width=%u -height=%u", cols, rows);
+    pm_asprintf(&widthArg,  "-width=%u", cols);
+    pm_asprintf(&heightArg, "-height=%u", rows);
 
     inPamtuples.pamP = (struct pam *) &inputLookuppam;
     inPamtuples.tuplesP = (tuple ***) &inputLookup;
     outPamtuples.pamP = fitLookuppamP;
     outPamtuples.tuplesP = fitLookupP;
     
-    pm_system(&pm_feed_from_pamtuples, &inPamtuples,
-              &pm_accept_to_pamtuples, &outPamtuples,
-              pamscaleCommand);
+    pm_system_lp("pamscale",
+                 &pm_feed_from_pamtuples, &inPamtuples,
+                 &pm_accept_to_pamtuples, &outPamtuples,
+                 "pamscale", widthArg, heightArg, NULL);
 
-    pm_strfree(pamscaleCommand);
+    pm_strfree(heightArg);
+    pm_strfree(widthArg);
 }