diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2009-12-10 03:08:53 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2009-12-10 03:08:53 +0000 |
commit | 9f0ff62ea7e084be7167a2bd4f177bf9dfbfaaf2 (patch) | |
tree | 8bc8cd807329b5fdd80e3b92f75de670728668af | |
parent | 43939e66b1d4eeb2f3799c124f3598756755005a (diff) | |
download | netpbm-mirror-9f0ff62ea7e084be7167a2bd4f177bf9dfbfaaf2.tar.gz netpbm-mirror-9f0ff62ea7e084be7167a2bd4f177bf9dfbfaaf2.tar.xz netpbm-mirror-9f0ff62ea7e084be7167a2bd4f177bf9dfbfaaf2.zip |
Release 10.47.05
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@1045 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/other/fiasco/codec/decoder.c | 24 | ||||
-rw-r--r-- | converter/other/fiasco/config.h | 4 | ||||
-rw-r--r-- | converter/other/fiasco/lib/dither.c | 9 | ||||
-rw-r--r-- | converter/other/fiasco/lib/rpf.c | 7 | ||||
-rw-r--r-- | converter/other/pamtosvg/vector.c | 1 | ||||
-rw-r--r-- | converter/other/pamtouil.c | 2 | ||||
-rw-r--r-- | doc/HISTORY | 13 | ||||
-rwxr-xr-x | generator/ppmrainbow | 14 | ||||
-rw-r--r-- | version.mk | 2 |
9 files changed, 48 insertions, 28 deletions
diff --git a/converter/other/fiasco/codec/decoder.c b/converter/other/fiasco/codec/decoder.c index 9474c1e7..c3982617 100644 --- a/converter/other/fiasco/codec/decoder.c +++ b/converter/other/fiasco/codec/decoder.c @@ -1271,28 +1271,28 @@ compute_state_images (unsigned max_level, word_t **simg, { int tmp; /* temp. value of adjacent pixels */ #ifdef HAVE_SIGNED_SHIFT -# ifndef WORDS_BIGENDIAN +# if BYTE_ORDER == LITTLE_ENDIAN tmp = (((weight * (int) src [1]) >> 10) << 17) | (((weight * (int) src [0]) >> 9) & 0xfffe); -# else /* not WORDS_BIGENDIAN */ +# else tmp = (((weight * (int) src [0]) >> 10) << 17) | (((weight * (int) src [1]) >> 9) & 0xfffe); -# endif /* not WORDS_BIGENDIAN */ +# endif #else /* not HAVE_SIGNED_SHIFT */ -# ifndef WORDS_BIGENDIAN +# if BYTE_ORDER == LITTLE_ENDIAN tmp = (((weight * (int) src [1]) / 1024) * 131072) | (((weight * (int) src [0])/ 512) & 0xfffe); -# else /* not WORDS_BIGENDIAN */ +# else tmp = (((weight * (int) src [0]) / 1024) * 131072) | (((weight * (int) src [1]) / 512) & 0xfffe); # endif /* not WORDS_BIGENDIAN */ -#endif /* not HAVE_SIGNED_SHIFT */ +#endif src += 2; *idst++ = tmp & 0xfffefffe; } @@ -1415,28 +1415,28 @@ compute_state_images (unsigned max_level, word_t **simg, { int tmp; /* temp. value of adjacent pixels */ #ifdef HAVE_SIGNED_SHIFT -# ifndef WORDS_BIGENDIAN +# if BYTE_ORDER == LITTLE_ENDIAN tmp = (((weight * (int) src [1]) >> 10) << 17) | (((weight * (int) src [0]) >> 9) & 0xfffe); -# else /* not WORDS_BIGENDIAN */ +# else tmp = (((weight * (int)src [0]) >> 10) << 17) | (((weight * (int)src [1]) >> 9) & 0xfffe); -# endif /* not WORDS_BIGENDIAN */ +# endif #else /* not HAVE_SIGNED_SHIFT */ -# ifndef WORDS_BIGENDIAN +# if BYTE_ORDER == LITTLE_ENDIAN tmp = (((weight * (int) src [1]) / 1024) * 131072) | (((weight * (int) src [0])/ 512) & 0xfffe); -# else /* not WORDS_BIGENDIAN */ +# else tmp = (((weight * (int) src [0]) / 1024) * 131072) | (((weight * (int) src [1])/ 512) & 0xfffe); # endif /* not WORDS_BIGENDIAN */ -#endif /* not HAVE_SIGNED_SHIFT */ +#endif src += 2; *idst = (*idst + tmp) & 0xfffefffe; idst++; diff --git a/converter/other/fiasco/config.h b/converter/other/fiasco/config.h index d6b15a84..64b905f8 100644 --- a/converter/other/fiasco/config.h +++ b/converter/other/fiasco/config.h @@ -21,10 +21,6 @@ /* Define if you can safely include both <sys/time.h> and <time.h>. */ #define TIME_WITH_SYS_TIME 1 -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - /* Define if the X Window System is missing or not being used. */ #define X_DISPLAY_MISSING 1 diff --git a/converter/other/fiasco/lib/dither.c b/converter/other/fiasco/lib/dither.c index c7f9ebab..a39afa3c 100644 --- a/converter/other/fiasco/lib/dither.c +++ b/converter/other/fiasco/lib/dither.c @@ -35,6 +35,7 @@ * $State: Exp $ */ +#include "pm_config.h" #include "config.h" #if HAVE_STRING_H @@ -665,15 +666,15 @@ display_16_bit (const struct fiasco_renderer *this, unsigned char *ximage, for (n = image->width * image->height / 2; n; n--, src += 2) #ifdef HAVE_SIGNED_SHIFT -# ifndef WORDS_BIGENDIAN +# if BYTE_ORDER == LITTLE_ENDIAN *dst++ = (y_table [src [1] >> 4] << 16) | y_table [src [0] >> 4]; -# else /* not WORDS_BIGENDIAN */ +# else *dst++ = (y_table [src [0] >> 4] << 16) | y_table [src [1] >> 4]; # endif #else /* not HAVE_SIGNED_SHIFT */ -# ifndef WORDS_BIGENDIAN +# if BYTE_ORDER == LITTLE_ENDIAN *dst++ = (y_table [src [1] / 16] << 16) | y_table [src [0] / 16]; -# else /* not WORDS_BIGENDIAN */ +# else *dst++ = (y_table [src [0] / 16] << 16) | y_table [src [1] / 16]; # endif #endif /* not HAVE_SIGNED_SHIFT */ diff --git a/converter/other/fiasco/lib/rpf.c b/converter/other/fiasco/lib/rpf.c index ac7d48ca..84c1f9b6 100644 --- a/converter/other/fiasco/lib/rpf.c +++ b/converter/other/fiasco/lib/rpf.c @@ -16,6 +16,7 @@ * $State: Exp $ */ +#include "pm_config.h" #include "config.h" #include "types.h" @@ -30,7 +31,7 @@ * or all following code is void! */ -#ifdef WORDS_BIGENDIAN +#if BYTE_ORDER == BIG_ENDIAN /* * Big-Endian Architecture (e.g. SUN, Motorola) * Memory representation of integer 0x00112233 is 00,11,22,33 @@ -38,7 +39,7 @@ enum real_bytes {BYTE_0, BYTE_1, BYTE_2, BYTE_3}; -#else /* not WORDS_BIGENDIAN */ +#else /* * Little-Endian Architecture (e.g. Intel, VAX, Alpha) * Memory representation of integer 0x00112233 is 33,22,11,00 @@ -46,7 +47,7 @@ enum real_bytes {BYTE_0, BYTE_1, BYTE_2, BYTE_3}; enum real_bytes {BYTE_3, BYTE_2, BYTE_1, BYTE_0}; -#endif /* not WORDS_BIGENDIAN */ +#endif const int RPF_ZERO = -1; diff --git a/converter/other/pamtosvg/vector.c b/converter/other/pamtosvg/vector.c index e25c1068..fe1b965c 100644 --- a/converter/other/pamtosvg/vector.c +++ b/converter/other/pamtosvg/vector.c @@ -39,6 +39,7 @@ vector_to_point(vector_type const v) { coord.x = v.dx; coord.y = v.dy; + coord.z = v.dz return coord; } diff --git a/converter/other/pamtouil.c b/converter/other/pamtouil.c index 209ebf16..1a53be0f 100644 --- a/converter/other/pamtouil.c +++ b/converter/other/pamtouil.c @@ -97,7 +97,7 @@ parseCommandLine(int argc, char ** argv, /* Remove trailing "_icon" */ barPos = strrchr(cmdlineP->outname, '_'); - if (streq(barPos, "_icon")) + if (barPos && streq(barPos, "_icon")) *barPos = '\0'; } else { if (streq(cmdlineP->inputFilespec, "-")) diff --git a/doc/HISTORY b/doc/HISTORY index 41d36953..e9f0dda0 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,19 @@ Netpbm. CHANGE HISTORY -------------- +09.12.10 BJH Release 10.47.05 + + ppmrainbow: Make new directory for temporary files. + Prevents interference by other user who shares the main + temporary file directory. + + pamtouil: fix crash when -name option doesn't contain an + underscore. + + pamtosvg: fix some bug with unset Z coordinate. + + pnmtofiasco, fiascotopnm: fix bug on bigendian machine. + 09.09.18 BJH Release 10.47.04 pambayer: fix unconditional crash/failure when you aren't using diff --git a/generator/ppmrainbow b/generator/ppmrainbow index f98536cd..96e304ac 100755 --- a/generator/ppmrainbow +++ b/generator/ppmrainbow @@ -47,7 +47,10 @@ if (!$norepeat) { push @colorlist, $ARGV[0]; } -my $tmpprefix = $tmpdir . "/$myname.$$."; +my $ourtmp = "$tmpdir/ppmrainbow$$"; +mkdir($ourtmp, 0777) or + die("Unable to create directory for temporary files '$ourtmp"); + my $widthRemaining; my $n; @@ -58,7 +61,7 @@ $widthRemaining = $Twid; @outlist = (); while (@colorlist >= 2) { - my $outfile = sprintf("%s%03u.ppm", $tmpprefix, $n); + my $outfile = sprintf("%s/file.%03u.ppm", $ourtmp, $n); push(@outlist, $outfile); my $w = int(($widthRemaining-1)/(@colorlist-1))+1; @@ -78,5 +81,10 @@ while (@colorlist >= 2) { exit 0; END { - unlink @outlist if @outlist; + if (@outlist) { + unlink(@outlist); + } + if (defined($ourtmp)) { + rmdir($ourtmp); + } } diff --git a/version.mk b/version.mk index f1196705..43aae3c6 100644 --- a/version.mk +++ b/version.mk @@ -1,4 +1,4 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 47 -NETPBM_POINT_RELEASE = 4 +NETPBM_POINT_RELEASE = 5 |