about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-10-19 18:21:30 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-10-19 18:21:30 +0000
commitfb3bd337b17f76f749711bb53f09113d78c5e211 (patch)
treebb1bae6646671a6e587b34a73e1a0d6c1dec23bf /converter
parent28f5a2c0f43188b8862f52ff0314f63415e64e3b (diff)
downloadnetpbm-mirror-fb3bd337b17f76f749711bb53f09113d78c5e211.tar.gz
netpbm-mirror-fb3bd337b17f76f749711bb53f09113d78c5e211.tar.xz
netpbm-mirror-fb3bd337b17f76f749711bb53f09113d78c5e211.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4765 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/other/pnmtops.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c
index 3ca158b5..d2577dd6 100644
--- a/converter/other/pnmtops.c
+++ b/converter/other/pnmtops.c
@@ -58,6 +58,10 @@
 
 
 
+unsigned int const psScaleFactor = 72;
+
+
+
 static void
 setSignals() {
 /*----------------------------------------------------------------------------
@@ -291,21 +295,21 @@ parseCommandLine(int argc, const char ** argv,
     cmdlineP->canturn =  !noturn;
     cmdlineP->showpage = !noshowpage;
 
-    validateCompDimension(width, 72, "-width value");
-    validateCompDimension(height, 72, "-height value");
+    validateCompDimension(width,  psScaleFactor, "-width value");
+    validateCompDimension(height, psScaleFactor, "-height value");
 
-    cmdlineP->width  = width * 72;
-    cmdlineP->height = height * 72;
+    cmdlineP->width  = width  * psScaleFactor;
+    cmdlineP->height = height * psScaleFactor;
 
     if (imagewidthSpec) {
-        validateCompDimension(imagewidth, 72, "-imagewidth value");
-        cmdlineP->imagewidth = imagewidth * 72;
+        validateCompDimension(imagewidth, psScaleFactor, "-imagewidth value");
+        cmdlineP->imagewidth = imagewidth * psScaleFactor;
     }
     else
         cmdlineP->imagewidth = 0;
     if (imageheightSpec) {
-        validateCompDimension(imagewidth, 72, "-imageheight value");
-        cmdlineP->imageheight = imageheight * 72;
+        validateCompDimension(imagewidth, psScaleFactor, "-imageheight value");
+        cmdlineP->imageheight = imageheight * psScaleFactor;
     }
     else
         cmdlineP->imageheight = 0;