From 7978eb4927aba6681ff912fe355e6e6bd84ef526 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 20 Feb 2013 02:49:16 +0000 Subject: Release 10.61.02 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1851 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- buildtools/configure.pl | 3 +++ converter/other/Makefile | 3 +++ converter/other/jpeg2000/Makefile | 2 +- converter/pbm/Makefile | 3 --- converter/ppm/ppmtompeg/Makefile | 2 +- converter/ppm/ppmtompeg/headers/frame.h | 20 +++++++++++--------- converter/ppm/ppmtompeg/headers/general.h | 2 -- converter/ppm/ppmtompeg/headers/huff.h | 5 ++++- converter/ppm/ppmtompeg/headers/jpeg.h | 3 ++- converter/ppm/ppmtompeg/headers/mtypes.h | 15 +++++---------- converter/ppm/ppmtompeg/huff.c | 3 ++- converter/ppm/ppmtompeg/jpeg.c | 18 +++++++++--------- doc/HISTORY | 4 ++++ editor/Makefile | 2 +- lib/libpm.c | 27 ++++++++++++--------------- version.mk | 2 +- 16 files changed, 59 insertions(+), 55 deletions(-) diff --git a/buildtools/configure.pl b/buildtools/configure.pl index fc0a23ce..7a2f5513 100755 --- a/buildtools/configure.pl +++ b/buildtools/configure.pl @@ -2246,6 +2246,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 294eefc4..746db87c 100644 --- a/converter/other/Makefile +++ b/converter/other/Makefile @@ -310,3 +310,6 @@ ifeq ($(HAVE_PNGLIB),Y) cd $(PKGDIR)/bin ; \ $(SYMLINK) pngtopam$(EXE) pngtopnm endif +# In December 2010, sunicontopnm replaced icontopbm + cd $(PKGDIR)/bin ; \ + $(SYMLINK) sunicontopnm icontopbm diff --git a/converter/other/jpeg2000/Makefile b/converter/other/jpeg2000/Makefile index f4fee87f..f2e3b4a1 100644 --- a/converter/other/jpeg2000/Makefile +++ b/converter/other/jpeg2000/Makefile @@ -57,7 +57,7 @@ all: $(BINARIES) include $(SRCDIR)/common.mk -LIBOPTS = $(shell $(LIBOPT) $(NETPBMLIB) $(JASPERLIB_USE)) +LIBOPTS = $(shell $(LIBOPT) $(JASPERLIB_USE) $(NETPBMLIB)) $(BINARIES): %: %.o $(JASPERLIB_DEP) $(NETPBMLIB) $(LIBOPT) $(LD) -o $@ $< \ diff --git a/converter/pbm/Makefile b/converter/pbm/Makefile index 69cda33a..487bd752 100644 --- a/converter/pbm/Makefile +++ b/converter/pbm/Makefile @@ -80,9 +80,6 @@ install.bin.local: $(PKGDIR)/bin # In December 2010 (Actually January 2011), pbmtosunicon replaced pbmtoicon cd $(PKGDIR)/bin ; \ $(SYMLINK) pbmtosunicon pbmtoicon -# In December 2010, sunicontopnm replaced icontopbm - cd $(PKGDIR)/bin ; \ - $(SYMLINK) sunicontopnm icontopbm thisdirclean: localclean .PHONY: localclean diff --git a/converter/ppm/ppmtompeg/Makefile b/converter/ppm/ppmtompeg/Makefile index d3342c9a..49317287 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/converter/ppm/ppmtompeg/headers/frame.h b/converter/ppm/ppmtompeg/headers/frame.h index acd74419..1f460ac2 100644 --- a/converter/ppm/ppmtompeg/headers/frame.h +++ b/converter/ppm/ppmtompeg/headers/frame.h @@ -34,7 +34,7 @@ * HEADER FILES * *==============*/ -#include "general.h" +#include "netpbm/pm_c_util.h" #include "ansi.h" #include "mtypes.h" @@ -54,8 +54,10 @@ typedef struct mpegFrame { int type; char inputFileName[256]; int id; /* the frame number -- starts at 0 */ - boolean inUse; /* TRUE iff this frame is currently being used */ - /* FALSE means any data here can be thrashed */ + bool inUse; + /* this frame is currently being used (if not, any data here can be + thrashed) + */ /* * now, the YCrCb data. All pixel information is stored in unsigned @@ -64,17 +66,17 @@ typedef struct mpegFrame { * * if orig_y is NULL, then orig_cr, orig_cb are undefined */ - uint8 **orig_y, **orig_cr, **orig_cb; + uint8_t **orig_y, **orig_cr, **orig_cb; /* now, the decoded data -- relevant only if * referenceFrame == DECODED_FRAME * * if decoded_y is NULL, then decoded_cr, decoded_cb are undefined */ - uint8 **decoded_y, **decoded_cr, **decoded_cb; + uint8_t **decoded_y, **decoded_cr, **decoded_cb; /* reference data */ - uint8 **ref_y, **ref_cr, **ref_cb; + uint8_t **ref_y, **ref_cr, **ref_cb; /* * these are the Blocks which will ultimately compose MacroBlocks. @@ -86,9 +88,9 @@ typedef struct mpegFrame { /* * this is the half-pixel luminance data (for reference frames) */ - uint8 **halfX, **halfY, **halfBoth; + uint8_t **halfX, **halfY, **halfBoth; - boolean halfComputed; /* TRUE iff half-pixels already computed */ + bool halfComputed; /* TRUE iff half-pixels already computed */ struct mpegFrame *next; /* points to the next B-frame to be encoded, if * stdin is used as the input. @@ -120,7 +122,7 @@ Frame_AllocHalf(MpegFrame * const frameP); void Frame_AllocDecoded(MpegFrame * const frameP, - boolean const makeReference); + bool const makeReference); void Frame_Resize(MpegFrame * const omf, diff --git a/converter/ppm/ppmtompeg/headers/general.h b/converter/ppm/ppmtompeg/headers/general.h index f29c9445..e41e2adb 100644 --- a/converter/ppm/ppmtompeg/headers/general.h +++ b/converter/ppm/ppmtompeg/headers/general.h @@ -167,8 +167,6 @@ typedef signed int int32; #define max(a,b) ((a) > (b) ? (a) : (b)) #undef min #define min(a,b) ((a) < (b) ? (a) : (b)) -#undef abs -#define abs(a) ((a) >= 0 ? (a) : -(a)) #endif diff --git a/converter/ppm/ppmtompeg/headers/huff.h b/converter/ppm/ppmtompeg/headers/huff.h index 47ffb843..a6379248 100644 --- a/converter/ppm/ppmtompeg/headers/huff.h +++ b/converter/ppm/ppmtompeg/headers/huff.h @@ -24,8 +24,11 @@ */ /* - * THIS FILE IS MACHINE GENERATED! DO NOT EDIT! + * THIS FILE WAS ORIGINALLY MACHINE GENERATED */ + +#include "general.h" + #define HUFF_MAXRUN 32 #define HUFF_MAXLEVEL 41 diff --git a/converter/ppm/ppmtompeg/headers/jpeg.h b/converter/ppm/ppmtompeg/headers/jpeg.h index 62c6f930..17aa0808 100644 --- a/converter/ppm/ppmtompeg/headers/jpeg.h +++ b/converter/ppm/ppmtompeg/headers/jpeg.h @@ -1,5 +1,6 @@ +#include #include "ansi.h" - +#include "frame.h" void JMovie2JPEG(const char * const infilename, diff --git a/converter/ppm/ppmtompeg/headers/mtypes.h b/converter/ppm/ppmtompeg/headers/mtypes.h index 0db5a330..a44ce680 100644 --- a/converter/ppm/ppmtompeg/headers/mtypes.h +++ b/converter/ppm/ppmtompeg/headers/mtypes.h @@ -10,12 +10,7 @@ #ifndef MTYPES_INCLUDED #define MTYPES_INCLUDED - -/*==============* - * HEADER FILES * - *==============*/ - -#include "general.h" +#include "netpbm/pm_config.h" #include "dct.h" @@ -48,12 +43,12 @@ typedef struct motion { /* * your basic Block type */ -typedef int16 Block[DCTSIZE][DCTSIZE]; -typedef int16 FlatBlock[DCTSIZE_SQ]; +typedef int16_t Block[DCTSIZE][DCTSIZE]; +typedef int16_t FlatBlock[DCTSIZE_SQ]; typedef struct { - int32 l[2*DCTSIZE][2*DCTSIZE]; + int32_t l[2*DCTSIZE][2*DCTSIZE]; } LumBlock; -typedef int32 ChromBlock[DCTSIZE][DCTSIZE]; +typedef int32_t ChromBlock[DCTSIZE][DCTSIZE]; /*========* * MACROS * diff --git a/converter/ppm/ppmtompeg/huff.c b/converter/ppm/ppmtompeg/huff.c index 821daca1..f2be16ef 100644 --- a/converter/ppm/ppmtompeg/huff.c +++ b/converter/ppm/ppmtompeg/huff.c @@ -24,8 +24,9 @@ */ /* - * THIS FILE IS MACHINE GENERATED! DO NOT EDIT! + * THIS FILE WAS ORIGINALLY MACHINE GENERATED */ +#include "general.h" #include "mtypes.h" #include "huff.h" diff --git a/converter/ppm/ppmtompeg/jpeg.c b/converter/ppm/ppmtompeg/jpeg.c index 990317a2..24c9ae2d 100644 --- a/converter/ppm/ppmtompeg/jpeg.c +++ b/converter/ppm/ppmtompeg/jpeg.c @@ -17,7 +17,6 @@ #define _XOPEN_SOURCE /* Make sure stdio.h contains fileno() */ #include #include -#include "all.h" /* With the lossless jpeg patch applied to the Jpeg library (ftp://ftp.wizards.dupont.com/pub/ImageMagick/delegates/ljpeg-6b.tar.gz), the name of min_DCT_scaled_size changes to min_codec_data_unit, @@ -26,16 +25,17 @@ #define min_codec_data_unit min_DCT_scaled_size #include #undef min_codec_data_unit -#include "mtypes.h" -#include "frames.h" -#include "prototypes.h" -#include "param.h" -#include "readframe.h" + +#include "netpbm/pm_config.h" +#include "netpbm/pm_c_util.h" +#include "netpbm/mallocvar.h" +#include "netpbm/pm.h" + #include "fsize.h" -#include "rgbtoycc.h" +#include "frame.h" + #include "jpeg.h" -#include "mallocvar.h" /* make it happier.... */ #undef DCTSIZE2 @@ -385,7 +385,7 @@ ReadJPEG(MpegFrame * const mf, jpeg_component_info *compptr; int buffer_height; int current_row[3]; - uint8 **orig[3]; + uint8_t **orig[3]; int h_samp[3],v_samp[3]; int max_h_samp,max_v_samp; int temp_h, temp_v; diff --git a/doc/HISTORY b/doc/HISTORY index 3b6ab253..61c2b684 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,10 @@ Netpbm. CHANGE HISTORY -------------- +13.02.20 BJH Release 10.61.02 + + MinGW build: various fixes. + 12.12.31 BJH Release 10.61.01 pamstereogram: change -guidesize default from 10 to 20 diff --git a/editor/Makefile b/editor/Makefile index ec9305aa..f3236536 100644 --- a/editor/Makefile +++ b/editor/Makefile @@ -93,4 +93,4 @@ install.bin.local: $(PKGDIR)/bin # In March 2012, pnmquantall replaced ppmquantall cd $(PKGDIR)/bin ; \ rm -f ppmquantall ; \ - $(SYMLINK) pnmquantall$(EXE) ppmquantall + $(SYMLINK) pnmquantall ppmquantall diff --git a/lib/libpm.c b/lib/libpm.c index 6bc8521c..61a47099 100644 --- a/lib/libpm.c +++ b/lib/libpm.c @@ -708,18 +708,6 @@ extractAfterLastSlash(const char * const fullPath, -#if MSVCRT -static void -splitpath(const char * const fullPath, - char * const retval, - size_t const retvalSize) { - - _splitpath_s(fullPath, 0, 0, 0, 0, retval, retvalSize, 0, 0); -} -#endif - - - char * pm_arg0toprogname(const char arg0[]) { /*---------------------------------------------------------------------------- @@ -736,14 +724,23 @@ pm_arg0toprogname(const char arg0[]) { The return value is in static storage within. It is NUL-terminated, but truncated at 64 characters. -----------------------------------------------------------------------------*/ - static char retval[64+1]; +#define MAX_RETVAL_SIZE 64 #if MSVCRT - splitpath(arg0, retval, sizeof(retval)); + /* Note that there exists _splitpath_s, which takes a size argument, + but it is only in "secure" extensions of MSVCRT that come only with + MSVC; but _splitpath() comes with Windows. MinGW has a header file + for it. + */ + static char retval[_MAX_FNAME]; + _splitpath(fullPath, 0, 0, retval, 0); + if (MAX_RETVAL_SIZE < _MAX_FNAME) + retval[MAX_RETVAL_SIZE] = '\0'; #else + static char retval[MAX_RETVAL_SIZE+1]; extractAfterLastSlash(arg0, retval, sizeof(retval)); #endif - return(retval); + return retval; } diff --git a/version.mk b/version.mk index 45f4b29a..8b8a5a1b 100644 --- a/version.mk +++ b/version.mk @@ -1,4 +1,4 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 61 -NETPBM_POINT_RELEASE = 1 +NETPBM_POINT_RELEASE = 2 -- cgit 1.4.1