about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-18 18:29:13 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-18 18:29:13 +0000
commit2fc96d4928baccbdf7d52eca57b967f4c5355d8e (patch)
treeee9076375b75ec179576a3a39c4b0bda56771048
parentb31e75a79a6f096f3462292fd48494035f0be0fe (diff)
downloadnetpbm-mirror-2fc96d4928baccbdf7d52eca57b967f4c5355d8e.tar.gz
netpbm-mirror-2fc96d4928baccbdf7d52eca57b967f4c5355d8e.tar.xz
netpbm-mirror-2fc96d4928baccbdf7d52eca57b967f4c5355d8e.zip
Release 10.35.08
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@90 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--Makefile.version2
-rw-r--r--converter/ppm/ppmtompeg/headers/frames.h1
-rw-r--r--doc/HISTORY9
-rw-r--r--editor/pamperspective.c11
-rw-r--r--generator/pamstereogram.c9
-rw-r--r--lib/libppmd.c8
-rw-r--r--lib/libsystem.c4
-rw-r--r--other/pnmcolormap.c7
-rw-r--r--pm_config.in.h22
9 files changed, 66 insertions, 7 deletions
diff --git a/Makefile.version b/Makefile.version
index 3058b964..4aa1369a 100644
--- a/Makefile.version
+++ b/Makefile.version
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 35
-NETPBM_POINT_RELEASE = 07
+NETPBM_POINT_RELEASE = 08
diff --git a/converter/ppm/ppmtompeg/headers/frames.h b/converter/ppm/ppmtompeg/headers/frames.h
index 558ebf81..14304c48 100644
--- a/converter/ppm/ppmtompeg/headers/frames.h
+++ b/converter/ppm/ppmtompeg/headers/frames.h
@@ -12,6 +12,7 @@
  * HEADER FILES *
  *==============*/
 
+#include "pm_config.h"  /* For __inline__ */
 #include "ansi.h"
 #include "mtypes.h"
 #include "mheaders.h"
diff --git a/doc/HISTORY b/doc/HISTORY
index 40c81079..d8284f97 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,15 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+06.10.18 BJH  Release 10.35.08
+
+              Fix pamperspective: read all of input.
+
+              Fix libnetpbm pm_system(): don't hang if shell command quits
+              before taking all the input.
+
+              Fix redefinitions of functions that Irix compiler can't handle.
+
 06.10.01 BJH  Release 10.35.07
 
               Fix some prototypes that don't literally match definitions
diff --git a/editor/pamperspective.c b/editor/pamperspective.c
index fdf446c7..7bcc74fb 100644
--- a/editor/pamperspective.c
+++ b/editor/pamperspective.c
@@ -1143,6 +1143,17 @@ static void free_buffer (buffer *const b)
 {
   int i;
 
+  /* We have to read through the end of the input image even if we
+     didn't use all the rows, because if the input is a pipe, the
+     guy writing into the pipe may require all the data to go
+     through.
+  */
+  
+  while (b->last_logical < b->inpam->height-1) {
+      pnm_readpamrow(b->inpam, b->rows[0]);
+      ++b->last_logical;
+  }
+
   for (i=0; i<b->num_rows; i++)
     pnm_freepamrow (b->rows[i]);
   free (b->rows);
diff --git a/generator/pamstereogram.c b/generator/pamstereogram.c
index e9e58677..71c541df 100644
--- a/generator/pamstereogram.c
+++ b/generator/pamstereogram.c
@@ -49,6 +49,7 @@
 #include <time.h>
 #include <assert.h>
 
+#include "pm_config.h"
 #include "pam.h"
 #include "shhopt.h"
 #include "mallocvar.h"
@@ -299,7 +300,9 @@ struct randomState {
 };
 
 
+#ifndef LITERAL_FN_DEF_MATCH
 static coord2Color randomColor;
+#endif
 
 static tuple
 randomColor(outGenerator * const outGenP,
@@ -336,7 +339,9 @@ randomColor(outGenerator * const outGenP,
 
 
 
+#ifndef LITERAL_FN_DEF_MATCH
 static outGenStateTerm termRandomColor;
+#endif
 
 static void
 termRandomColor(outGenerator * const outGenP) {
@@ -402,7 +407,9 @@ struct patternPixelState {
 
 
 
+#ifndef LITERAL_FN_DEF_MATCH
 static coord2Color patternPixel;
+#endif
 
 static tuple
 patternPixel(outGenerator * const outGenP,
@@ -431,7 +438,9 @@ patternPixel(outGenerator * const outGenP,
 
 
 
+#ifndef LITERAL_FN_DEF_MATCH
 static outGenStateTerm termPatternPixel;
+#endif
 
 static void
 termPatternPixel(outGenerator * const outGenP) {
diff --git a/lib/libppmd.c b/lib/libppmd.c
index 6c764ca1..ac8b6dee 100644
--- a/lib/libppmd.c
+++ b/lib/libppmd.c
@@ -18,15 +18,13 @@
 #include <assert.h>
 #include <stdlib.h>
 
+#include "pm_config.h"
 #include "pm_c_util.h"
 #include "mallocvar.h"
 #include "ppm.h"
 #include "ppmdfont.h"
 #include "ppmdraw.h"
 
-typedef int qsort_compare(const void *, const void *);
-    /* A compare function to pass to stdlib.h's qsort() */
-
 
 #define DDA_SCALE 8192
 
@@ -779,7 +777,9 @@ ppmd_fill_drawproc(pixel**      const pixels,
 
 
 
-static qsort_compare yx_compare;
+#ifndef LITERAL_FN_DEF_MATCH
+static qsort_comparison_fn yx_compare;
+#endif
 
 static int
 yx_compare(const void * const c1Arg,
diff --git a/lib/libsystem.c b/lib/libsystem.c
index e0d62178..560f0a9c 100644
--- a/lib/libsystem.c
+++ b/lib/libsystem.c
@@ -242,6 +242,10 @@ pm_system(void stdinFeeder(int, void *),
         spawnProcessor(shellCommand, shellStdinFd, 
                        &shellStdoutFd, &processorPid);
 
+        /* The shell process has cloned our 'shellStdinFd'; we have no
+           more use for our copy.
+        */
+        close(shellStdinFd);
         /* Dispose of the stdout from that shell */
         (*stdoutAccepter)(shellStdoutFd, accepterParm);
         close(shellStdoutFd);
diff --git a/other/pnmcolormap.c b/other/pnmcolormap.c
index c4776001..1be54ef8 100644
--- a/other/pnmcolormap.c
+++ b/other/pnmcolormap.c
@@ -25,6 +25,7 @@
 
 #include <math.h>
 
+#include "pm_config.h"
 #include "pam.h"
 #include "pammap.h"
 #include "shhopt.h"
@@ -166,10 +167,10 @@ parseCommandLine (int argc, char ** argv,
 }
 
 
-typedef int qsort_comparison_fn(const void *, const void *);
-    /* A collation function to be used as argument to qsort() */
 
+#ifndef LITERAL_FN_DEF_MATCH
 static qsort_comparison_fn compareplane;
+#endif
 
 static unsigned int compareplanePlane;
     /* This is a parameter to compareplane().  We use this global variable
@@ -189,7 +190,9 @@ compareplane(const void * const arg1,
 
 
 
+#ifndef LITERAL_FN_DEF_MATCH
 static qsort_comparison_fn sumcompare;
+#endif
 
 static int
 sumcompare(const void * const b1, const void * const b2) {
diff --git a/pm_config.in.h b/pm_config.in.h
index 9fc55351..1956f5d3 100644
--- a/pm_config.in.h
+++ b/pm_config.in.h
@@ -222,6 +222,26 @@ extern int write();
   #endif
 #endif
 
+/* At least one compiler can't handle two declarations of the same function
+   that aren't literally identical.  E.g. "static foo_fn_t foo1;" conflicts
+   with "static void foo1(int);" even if type 'foo_fn_t' is defined as
+   void(int).  (The compiler we saw do this is SGI IDO cc (for IRIX 4.3)).
+
+   LITERAL_FN_DEF_MATCH says that the compiler might have this problem,
+   so one must be conservative in redeclaring functions.
+*/
+#if defined(__GNUC__)
+  #define LITERAL_FN_DEF_MATCH 0
+#else
+  #if (defined(__sgi))
+    #define LITERAL_FN_DEF_MATCH 1
+  #else   
+    #define LITERAL_FN_DEF_MATCH 0
+  #endif
+#endif
+
+
+
 /* CONFIGURE: Some systems seem to need more than standard program linkage
    to get a data (as opposed to function) item out of a library.
 
@@ -276,3 +296,5 @@ typedef long int pm_filepos;
   #define HAVE_MKSTEMP 1
 #endif
 
+typedef int qsort_comparison_fn(const void *, const void *);
+    /* A compare function to pass to <stdlib.h>'s qsort() */