about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-03-29 21:17:12 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-03-29 21:17:12 +0000
commit0650b25ed6a0123e58c76616fef606fd3f8ad799 (patch)
tree76f2051a92fc6e93c06d2d4af44bf3f1178c0454
parentc85e6aae67d557791c2e15992d2df2839a5d0bf6 (diff)
downloadnetpbm-mirror-0650b25ed6a0123e58c76616fef606fd3f8ad799.tar.gz
netpbm-mirror-0650b25ed6a0123e58c76616fef606fd3f8ad799.tar.xz
netpbm-mirror-0650b25ed6a0123e58c76616fef606fd3f8ad799.zip
Release 10.47.49
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2165 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--GNUmakefile2
-rw-r--r--analyzer/Makefile4
-rw-r--r--analyzer/pgmtexture.c2
-rwxr-xr-xbuildtools/configure.pl3
-rw-r--r--converter/other/Makefile16
-rw-r--r--converter/ppm/hpcdtoppm/Makefile2
-rw-r--r--converter/ppm/ppmtompeg/Makefile2
-rw-r--r--doc/HISTORY22
-rw-r--r--editor/Makefile28
-rwxr-xr-xeditor/pnmmargin2
-rw-r--r--editor/specialty/Makefile4
-rw-r--r--editor/specialty/pamdeinterlace.c8
-rw-r--r--editor/specialty/ppmrelief.c18
-rw-r--r--generator/pamgauss.c2
-rw-r--r--other/Makefile12
-rw-r--r--version.mk2
16 files changed, 84 insertions, 45 deletions
diff --git a/GNUmakefile b/GNUmakefile
index ae5893d7..2ad0dfe0 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -222,6 +222,8 @@ init_package:
 	$(INSTALL) -c -m 664 $(SRCDIR)/buildtools/README.pkg $(PKGDIR)/README
 	$(INSTALL) -c -m 664 $(SRCDIR)/buildtools/config_template \
 	  $(PKGDIR)/config_template
+	$(INSTALL) -c -m 664 $(SRCDIR)/buildtools/pkgconfig_template \
+	  $(PKGDIR)/pkgconfig_template
 
 advise_installnetpbm:
 	@echo
diff --git a/analyzer/Makefile b/analyzer/Makefile
index 9a9a5e10..ed180917 100644
--- a/analyzer/Makefile
+++ b/analyzer/Makefile
@@ -40,9 +40,9 @@ install.bin: install.bin.local
 install.bin.local: $(PKGDIR)/bin
 # Remember that $(SYMLINK) might just be a copy command.
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pamslice$(EXE) pgmslice
+	$(SYMLINK) pamslice$(EXE) pgmslice$(EXE)
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pamfile$(EXE) pnmfile
+	$(SYMLINK) pamfile$(EXE) pnmfile$(EXE)
 
 FORCE:
 
diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c
index 6a9f5a4f..e9a03af5 100644
--- a/analyzer/pgmtexture.c
+++ b/analyzer/pgmtexture.c
@@ -814,7 +814,7 @@ int
 main (int argc, char *argv[]) {
     FILE *ifp;
     register gray **grays;
-    int tone[PGM_MAXMAXVAL], R0, R45, R90, angle, d = 1, x, y;
+    int tone[PGM_MAXMAXVAL+1], R0, R45, R90, angle, d = 1, x, y;
     int argn, rows, cols, row, col;
     int itone, jtone, tones;
     float **P_matrix0, **P_matrix45, **P_matrix90, **P_matrix135;
diff --git a/buildtools/configure.pl b/buildtools/configure.pl
index edd7b865..21f11bf3 100755
--- a/buildtools/configure.pl
+++ b/buildtools/configure.pl
@@ -2157,6 +2157,9 @@ if ($platform eq "GNU") {
     push(@config_mk, 'DLLVER=$(NETPBM_MAJOR_RELEASE)', "\n");
     push(@config_mk, "LDSHLIB = " . 
          '-shared -Wl,--image-base=0x10000000 -Wl,--enable-auto-import', "\n");
+    if ($subplatform ne "cygwin") {
+        push(@config_mk, "MSVCRT = Y\n");
+    }
 } elsif ($platform eq "BEOS") {
     push(@config_mk, "LDSHLIB = -nostart\n");
 } elsif ($platform eq "OPENBSD") {
diff --git a/converter/other/Makefile b/converter/other/Makefile
index 8277b127..ff87c8b8 100644
--- a/converter/other/Makefile
+++ b/converter/other/Makefile
@@ -222,26 +222,26 @@ install.bin.local: $(PKGDIR)/bin
 	$(SYMLINK) pnmtoplainpnm pnmnoraw
 # backward compatibility: program used to be gemtopbm
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) gemtopnm$(EXE) gemtopbm
+	$(SYMLINK) gemtopnm$(EXE) gemtopbm$(EXE)
 # In October 2001, pnmtojpeg replaced ppmtojpeg
 ifneq ($(JPEGLIB),NONE)
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pnmtojpeg$(EXE) ppmtojpeg
+	$(SYMLINK) pnmtojpeg$(EXE) ppmtojpeg$(EXE)
 endif
 # In March 2002, bmptopnm replaced bmptoppm
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) bmptopnm$(EXE) bmptoppm
+	$(SYMLINK) bmptopnm$(EXE) bmptoppm$(EXE)
 # In May 2002, pamtouil replaced ppmtouil
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pamtouil$(EXE) ppmtouil
+	$(SYMLINK) pamtouil$(EXE) ppmtouil$(EXE)
 # In March 2005, we realized that pamtopnm obviates pnmtopnm
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pamtopnm$(EXE) pnmtopnm
+	$(SYMLINK) pamtopnm$(EXE) pnmtopnm$(EXE)
 # In October 2005, pamtofits replaced pnmtofits
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pamtofits$(EXE) pnmtofits
+	$(SYMLINK) pamtofits$(EXE) pnmtofits$(EXE)
 ifneq ($(TIFF_PREREQ_MISSING),Y)
 # In October 2005, pamtotiff replaced pnmtotiff
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pamtotiff$(EXE) pnmtotiff
-endif
\ No newline at end of file
+	$(SYMLINK) pamtotiff$(EXE) pnmtotiff$(EXE)
+endif
diff --git a/converter/ppm/hpcdtoppm/Makefile b/converter/ppm/hpcdtoppm/Makefile
index 91aefc5b..ddf79ee5 100644
--- a/converter/ppm/hpcdtoppm/Makefile
+++ b/converter/ppm/hpcdtoppm/Makefile
@@ -19,7 +19,7 @@ install: install.bin.local
 install.bin.local: $(PKGDIR)/bin
 # In June 2002, pcdovtoppm replaced pcdindex
 	cd $(PKGDIR)/bin ; \
-	$(SYMLINK) pcdindex$(EXE) pcdovtoppm
+	$(SYMLINK) pcdindex$(EXE) pcdovtoppm$(EXE)
 
 
 FORCE:
diff --git a/converter/ppm/ppmtompeg/Makefile b/converter/ppm/ppmtompeg/Makefile
index d3342c9a..a1004fdd 100644
--- a/converter/ppm/ppmtompeg/Makefile
+++ b/converter/ppm/ppmtompeg/Makefile
@@ -56,7 +56,7 @@ ifeq ($(OMIT_NETWORK),y)
 else
   MP_OTHER_OBJS += parallel.o psocket.o
 endif
-ifeq ($(WIN32),y)
+ifeq ($(MSVCRT),Y)
   MP_OTHER_OBJS += gethostname_win32.o
 else
   MP_OTHER_OBJS += gethostname.o
diff --git a/doc/HISTORY b/doc/HISTORY
index e627a5e6..6b7baa2c 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,28 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+14.03.29 BJH  Release 10.47.49
+
+              ppmrelief: fix out-of-bound values in output.  Always broken.
+              Thanks Prophet of the Way <afu@wta.att.ne.jp>.
+
+              ppmrelief: fix crash when input image is too small.  Always
+              broken.  Thanks Prophet of the Way <afu@wta.att.ne.jp>.
+
+              pgmtexture: fix buffer overflow.  Always broken.  (Program
+              was added in primordial Netpbm in 1991).
+
+              pamdeinterlace: fix incorrect output with -takeodd and image has
+              only one row.  Always broken (pamdeinterlace was introduced in
+              Netpbm 9.21 (January 2001)).  Thanks Prophet of the Way
+              <afu@wta.att.ne.jp>.
+
+              Windows build: fix Ppmtompeg build failure in non-Cygwin build
+              due to missing sys/utsname.h.  (But other things still fail).
+
+              Windows build: fix missing .exe on copies of programs under
+              their old names.
+
 13.12.15 BJH  Release 10.47.48
 
               pbmtoepsi: fix handling of all-white image.  Always broken.
diff --git a/editor/Makefile b/editor/Makefile
index bc0f5913..d5d7633f 100644
--- a/editor/Makefile
+++ b/editor/Makefile
@@ -63,30 +63,30 @@ install.bin.local: $(PKGDIR)/bin
 # Remember that $(SYMLINK) might just be a copy command.
 # backward compatibility: program used to be pnminterp
 	cd $(PKGDIR)/bin ; \
-	rm -f pnminterp; \
-	$(SYMLINK) pamstretch$(EXE) pnminterp
+	rm -f pnminterp$(EXE); \
+	$(SYMLINK) pamstretch$(EXE) pnminterp$(EXE)
 # In March 2002, pnmnorm replaced ppmnorm and pgmnorm
 	cd $(PKGDIR)/bin ; \
-	rm -f ppmnorm ; \
-	$(SYMLINK) pnmnorm$(EXE) ppmnorm 
+	rm -f ppmnorm$(EXE) ; \
+	$(SYMLINK) pnmnorm$(EXE) ppmnorm$(EXE)
 	cd $(PKGDIR)/bin ; \
-	rm -f pgmnorm ; \
-	$(SYMLINK) pnmnorm$(EXE) pgmnorm
+	rm -f pgmnorm$(EXE) ; \
+	$(SYMLINK) pnmnorm$(EXE) pgmnorm$(EXE)
 # In March 2003, pamedge replaced pgmedge
 	cd $(PKGDIR)/bin ; \
-	rm -f pgmedge ; \
-	$(SYMLINK) pamedge$(EXE) pgmedge
+	rm -f pgmedge$(EXE) ; \
+	$(SYMLINK) pamedge$(EXE) pgmedge$(EXE)
 # In October 2004, pamenlarge replaced pnmenlarge
 	cd $(PKGDIR)/bin ; \
-	rm -f pnmenlarge ; \
-	$(SYMLINK) pamenlarge$(EXE) pnmenlarge
+	rm -f pnmenlarge$(EXE) ; \
+	$(SYMLINK) pamenlarge$(EXE) pnmenlarge$(EXE)
 # In March 2009, pamcut replaced pnmcut (but pamcut is much older -- pnmcut
 # was obsoleted by pamcut long before this).
 	cd $(PKGDIR)/bin ; \
-	rm -f pnmcut ; \
-	$(SYMLINK) pamcut$(EXE) pnmcut
+	rm -f pnmcut$(EXE) ; \
+	$(SYMLINK) pamcut$(EXE) pnmcut$(EXE)
 # In March 2009, pamscale replaced pnmscale (but pamscale is much older --
 # pnmscale was obsoleted by pamscale long before this).
 	cd $(PKGDIR)/bin ; \
-	rm -f pnmscale ; \
-	$(SYMLINK) pamscale$(EXE) pnmscale
+	rm -f pnmscale$(EXE) ; \
+	$(SYMLINK) pamscale$(EXE) pnmscale$(EXE)
diff --git a/editor/pnmmargin b/editor/pnmmargin
index 51ebebe5..b31deefd 100755
--- a/editor/pnmmargin
+++ b/editor/pnmmargin
@@ -76,7 +76,7 @@ fi
 
 cat $@ > $tmp1
 
-if [ $size == 0 ] ; then
+if [ $size -eq 0 ] ; then
     # Zero margin; just copy input to output
     pamtopnm $plainopt $tmp1;
 else
diff --git a/editor/specialty/Makefile b/editor/specialty/Makefile
index eda54882..76befbb4 100644
--- a/editor/specialty/Makefile
+++ b/editor/specialty/Makefile
@@ -51,5 +51,5 @@ install.bin.local: $(PKGDIR)/bin
 # Remember that $(SYMLINK) might just be a copy command.
 # pamoil replaced pgmoil in June 2001.
 	cd $(PKGDIR)/bin ; \
-	rm -f pgmoil ; \
-	$(SYMLINK) pamoil$(EXE) pgmoil
+	rm -f pgmoil$(EXE) ; \
+	$(SYMLINK) pamoil$(EXE) pgmoil$(EXE)
diff --git a/editor/specialty/pamdeinterlace.c b/editor/specialty/pamdeinterlace.c
index f158fbac..7c6b123c 100644
--- a/editor/specialty/pamdeinterlace.c
+++ b/editor/specialty/pamdeinterlace.c
@@ -32,7 +32,7 @@ parseCommandLine(int argc, char ** argv,
    was passed to us as the argv array.
 -----------------------------------------------------------------------------*/
     optStruct3 opt;  /* set by OPTENT3 */
-    optEntry *option_def;
+    optEntry * option_def;
     unsigned int option_def_index;
 
     unsigned int takeeven, takeodd;
@@ -50,6 +50,8 @@ parseCommandLine(int argc, char ** argv,
     optParseOptions3(&argc, argv, opt, sizeof(opt), 0);
         /* Uses and sets argc, argv, and some of *cmdlineP and others. */
 
+    free(option_def);
+
     if (takeeven && takeodd)
         pm_error("You cannot specify both -takeeven and -takeodd options.");
 
@@ -90,6 +92,10 @@ main(int argc, char *argv[]) {
     
     pnm_readpaminit(ifP, &inpam, PAM_STRUCT_SIZE(tuple_type));
 
+    if (inpam.height < 2 && cmdline.rowsToTake == ODD)
+        pm_error("You requested to take the odd rows, but there aren't "
+                 "any odd rows in the image - it has only one row - Row 0");
+
     tuplerow = pnm_allocpamrow(&inpam);
 
     outpam = inpam;    /* Initial value -- most fields should be same */
diff --git a/editor/specialty/ppmrelief.c b/editor/specialty/ppmrelief.c
index 5e0669c3..1c408aec 100644
--- a/editor/specialty/ppmrelief.c
+++ b/editor/specialty/ppmrelief.c
@@ -11,6 +11,7 @@
 */
 
 #include <stdio.h>
+#include "pm_c_util.h"
 #include "ppm.h"
 
 int
@@ -38,6 +39,11 @@ main(int argc, char * argv[]) {
         pm_usage( usage );
     
     ppm_readppminit( ifp, &cols, &rows, &maxval, &format );
+
+    if (cols < 3 || rows < 3 )
+        pm_error("Input image too small: %u x %u.  Must be at least 3x3",
+                  cols, rows);
+
     mv2 = maxval / 2;
 
     /* Allocate space for 3 input rows, plus an output row. */
@@ -67,12 +73,12 @@ main(int argc, char * argv[]) {
         ppm_readppmrow( ifp, inputbuf[rowa], cols, maxval, format );
         
         for ( col = 0; col < cols - 2; ++col ) {
-            r = PPM_GETR( inputbuf[rowa][col] ) +
-                ( mv2 - PPM_GETR( inputbuf[rowb][col + 2] ) );
-            g = PPM_GETG( inputbuf[rowa][col] ) +
-                ( mv2 - PPM_GETG( inputbuf[rowb][col + 2] ) );
-            b = PPM_GETB( inputbuf[rowa][col] ) +
-                ( mv2 - PPM_GETB( inputbuf[rowb][col + 2] ) );
+            r = MAX(0, MIN(maxval, PPM_GETR( inputbuf[rowa][col] ) +
+                           ( mv2 - PPM_GETR( inputbuf[rowb][col + 2] ) )));
+            g = MAX(0, MIN(maxval, PPM_GETG( inputbuf[rowa][col] ) +
+                           ( mv2 - PPM_GETG( inputbuf[rowb][col + 2] ) )));
+            b = MAX(0, MIN(maxval, PPM_GETB( inputbuf[rowa][col] ) +
+                           ( mv2 - PPM_GETB( inputbuf[rowb][col + 2] ) )));
             PPM_ASSIGN( outputrow[col + 1], r, g, b );
         }
         ppm_writeppmrow( stdout, outputrow, cols, maxval, 0 );
diff --git a/generator/pamgauss.c b/generator/pamgauss.c
index 4dd932c4..2b715467 100644
--- a/generator/pamgauss.c
+++ b/generator/pamgauss.c
@@ -90,7 +90,7 @@ parseCommandLine(int argc, char ** argv,
     if (argc-1 < 2)
         pm_error("Need two arguments: width and height.");
     else if (argc-1 > 2)
-        pm_error("Only two argumeents allowed: with and height.  "
+        pm_error("Only two arguments allowed: width and height.  "
                  "You specified %d", argc-1);
     else {
         cmdlineP->width = atoi(argv[1]);
diff --git a/other/Makefile b/other/Makefile
index a6748347..f7333c64 100644
--- a/other/Makefile
+++ b/other/Makefile
@@ -61,15 +61,15 @@ install.bin.local: $(PKGDIR)/bin
 # Remember that $(SYMLINK) might just be a copy command.
 # In July 2002, pamarith replaced pnmarith
 	cd $(PKGDIR)/bin ; \
-	  rm -f pnmarith ; \
-	  $(SYMLINK) pamarith$(EXE) pnmarith
+	  rm -f pnmarith$(EXE) ; \
+	  $(SYMLINK) pamarith$(EXE) pnmarith$(EXE)
 # In December 2005, pamsplit replaced pnmsplit
 	cd $(PKGDIR)/bin ; \
-	  rm -f pnmsplit ; \
-	  $(SYMLINK) pamsplit$(EXE) pnmsplit
+	  rm -f pnmsplit$(EXE) ; \
+	  $(SYMLINK) pamsplit$(EXE) pnmsplit$(EXE)
 # In February 2006, pamdepth replaced pnmdepth
 	cd $(PKGDIR)/bin ; \
-	  rm -f pnmdepth ; \
-	  $(SYMLINK) pamdepth$(EXE) pnmdepth
+	  rm -f pnmdepth$(EXE) ; \
+	  $(SYMLINK) pamdepth$(EXE) pnmdepth$(EXE)
 
 FORCE:
diff --git a/version.mk b/version.mk
index cc9af0bc..815340cc 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 47
-NETPBM_POINT_RELEASE = 48
+NETPBM_POINT_RELEASE = 49