From c5b69ed7dadf8de4b1d19cc7617172a0390c1586 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Mon, 3 Sep 2007 17:25:21 +0000 Subject: Release 10.35.31 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@399 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- Makefile.version | 2 +- converter/other/pnmtopalm/pnmtopalm.c | 2 +- doc/HISTORY | 6 ++++++ other/pamstack.c | 16 ++++++++++++---- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Makefile.version b/Makefile.version index 896e81ee..cdc1570b 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 35 -NETPBM_POINT_RELEASE = 30 +NETPBM_POINT_RELEASE = 31 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/doc/HISTORY b/doc/HISTORY index 18423ea8..28e31175 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,12 @@ Netpbm. CHANGE HISTORY -------------- +08.09.03 BJH Release 10.35.31 + + pamstack: accept Standard Input properly. + + pnmtopalm: fix typo in error message. + 07.07.30 BJH Release 10.35.30 pnmtops: fix crash when program attempts to write 12 bits per diff --git a/other/pamstack.c b/other/pamstack.c index 4f8d9945..d9691f74 100644 --- a/other/pamstack.c +++ b/other/pamstack.c @@ -15,6 +15,7 @@ #include #include "mallocvar.h" +#include "nstring.h" #include "shhopt.h" #include "pam.h" @@ -72,16 +73,23 @@ parseCommandLine(int argc, char ** argv, cmdlineP->nInput = 0; /* initial value */ { - int argn; - for (argn = 1; argn < argc; argn++) { + unsigned int argn; + bool stdinUsed; + for (argn = 1, stdinUsed = false; argn < argc; ++argn) { if (cmdlineP->nInput >= MAX_INPUTS) - pm_error("You may not specify more than %d input images.", + pm_error("You may not specify more than %u input images.", MAX_INPUTS); cmdlineP->inputFileName[cmdlineP->nInput++] = argv[argn]; + if (streq(argv[argn], "-")) { + if (stdinUsed) + pm_error("You cannot specify Standard Input ('-') " + "for more than one input file"); + stdinUsed = true; + } } } if (cmdlineP->nInput < 1) - pm_error("You must specify at least one input PAM image."); + cmdlineP->inputFileName[cmdlineP->nInput++] = "-"; } -- cgit 1.4.1