From cc3802cd8231a9cefb8ad926ce99cc44262dfea6 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 12 Apr 2009 20:19:44 +0000 Subject: Fix unset tuple type git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@879 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- generator/pamstereogram.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'generator') 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); -- cgit 1.4.1