about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-09-03 17:24:29 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-09-03 17:24:29 +0000
commit6a66ff83d67ba0ec0d0d7282ab7622cca914bf4d (patch)
tree6d5fa63d8d09d0752044498506a1c661f053f847 /converter
parentd86b4780b8b92d68ca0e2d43c90deb57adebd8ae (diff)
downloadnetpbm-mirror-6a66ff83d67ba0ec0d0d7282ab7622cca914bf4d.tar.gz
netpbm-mirror-6a66ff83d67ba0ec0d0d7282ab7622cca914bf4d.tar.xz
netpbm-mirror-6a66ff83d67ba0ec0d0d7282ab7622cca914bf4d.zip
Release 10.39.05
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@398 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/other/Makefile6
-rw-r--r--converter/other/pnmtopalm/pnmtopalm.c2
-rw-r--r--converter/pbm/pbmtonokia.c15
3 files changed, 21 insertions, 2 deletions
diff --git a/converter/other/Makefile b/converter/other/Makefile
index 09a3e298..3b6d8288 100644
--- a/converter/other/Makefile
+++ b/converter/other/Makefile
@@ -86,9 +86,13 @@ PORTBINARIES =  bmptopnm fitstopnm \
 		pbmtopgm pfmtopam \
 	        pgmtopbm pgmtoppm ppmtopgm pnmtoddif \
 		pnmtopclxl \
-		pnmtosgi pnmtosir pamtotga pnmtoxwd pstopnm \
+		pnmtosgi pnmtosir pamtotga pnmtoxwd \
 		rlatopam sgitopnm sirtopnm xwdtopnm zeisstopnm
 
+ifneq ($(DONT_HAVE_PROCESS_MGMT),Y)
+  PORTBINARIES += pstopnm
+endif
+
 BINARIES = $(PORTBINARIES) pnmtorast rasttopnm
 
 ifeq ($(HAVE_PNGLIB),Y)
diff --git a/converter/other/pnmtopalm/pnmtopalm.c b/converter/other/pnmtopalm/pnmtopalm.c
index 3b9eec8f..f5f6e44a 100644
--- a/converter/other/pnmtopalm/pnmtopalm.c
+++ b/converter/other/pnmtopalm/pnmtopalm.c
@@ -365,7 +365,7 @@ writeCommonHeader(unsigned int         const cols,
         pm_error("Too many columns for Palm Bitmap: %u", cols);
     pm_writebigshort(stdout, cols);    /* width */
     if (rows > USHRT_MAX)
-        pm_error("Too many columns for Palm Bitmap: %u", rows);
+        pm_error("Too many rows for Palm Bitmap: %u", rows);
     pm_writebigshort(stdout, rows);    /* height */
     if (rowbytes > USHRT_MAX)
         pm_error("Too many bytes per row for Palm Bitmap: %u", rowbytes);
diff --git a/converter/pbm/pbmtonokia.c b/converter/pbm/pbmtonokia.c
index 3c47eac3..58d0ec5b 100644
--- a/converter/pbm/pbmtonokia.c
+++ b/converter/pbm/pbmtonokia.c
@@ -153,6 +153,20 @@ freeCmdline(struct cmdlineInfo const cmdline) {
 
 
 static void
+checkSize(int cols, int rows){
+
+    if (cols > 255)
+        pm_error("This program cannot handle files with more than 255 "
+                 "columns");
+    if (rows > 255)
+        pm_error("This program cannot handle files with more than 255 "
+                 "rows");
+}
+
+
+
+
+static void
 convertToHexNol(bit **       const image,
                 unsigned int const cols,
                 unsigned int const rows,
@@ -455,6 +469,7 @@ main(int    argc,
     ifP = pm_openr(cmdline.inputFileName);
     bits = pbm_readpbm(ifP, &cols, &rows);
     pm_close(ifP);
+    checkSize(cols, rows);
 
     switch (cmdline.outputFormat) {
     case FMT_HEX_NGG: