about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-04-12 20:19:44 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-04-12 20:19:44 +0000
commitcc3802cd8231a9cefb8ad926ce99cc44262dfea6 (patch)
treea705f5f8ba260cdd0c7ee6612854c034c439ea7a
parent8872493591f463afe2f13d5eefe1ae8d24f570dc (diff)
downloadnetpbm-mirror-cc3802cd8231a9cefb8ad926ce99cc44262dfea6.tar.gz
netpbm-mirror-cc3802cd8231a9cefb8ad926ce99cc44262dfea6.tar.xz
netpbm-mirror-cc3802cd8231a9cefb8ad926ce99cc44262dfea6.zip
Fix unset tuple type
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@879 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--doc/HISTORY5
-rw-r--r--generator/pamstereogram.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index b9e3671c..f8612760 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,8 +6,13 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.47.00
 
+              Add pamsistoaglyph.  Thanks Scott Pakin.
+
               Remove nstring.h from exported interfaces.
 
+              pamstereogram: fix tuple type in output file (and crash
+              with -verbose) with -patfile .
+
               Fix: remove inclusion of pm_c_util.h from sshopt.h, which is
               an exported interface header file, whereas pm_c_util.h is not.
 
diff --git a/generator/pamstereogram.c b/generator/pamstereogram.c
index d1673df5..cd56de99 100644
--- a/generator/pamstereogram.c
+++ b/generator/pamstereogram.c
@@ -456,12 +456,17 @@ termPatternPixel(outGenerator * const outGenP) {
 static void
 initPatternPixel(outGenerator *     const outGenP,
                  struct cmdlineInfo const cmdline) {
-
+/*----------------------------------------------------------------------------
+   Initialize parts of output generator *outGenP that are based on the
+   supplied pattern file, assuming there is one.
+-----------------------------------------------------------------------------*/
     struct patternPixelState * stateP;
     FILE * patternFileP;
 
     MALLOCVAR_NOFAIL(stateP);
-        
+
+    assert(cmdline.patFilespec);
+    
     patternFileP = pm_openr(cmdline.patFilespec);
 
     stateP->patTuples =
@@ -481,6 +486,7 @@ initPatternPixel(outGenerator *     const outGenP,
     outGenP->pam.plainformat = stateP->patPam.plainformat;
     outGenP->pam.depth       = stateP->patPam.depth;
     outGenP->pam.maxval      = stateP->patPam.maxval;
+    strcpy(outGenP->pam.tuple_type, stateP->patPam.tuple_type);
 
     if (cmdline.verbose)
         reportImageParameters("Pattern file", &stateP->patPam);