diff options
Diffstat (limited to 'converter')
49 files changed, 82 insertions, 27 deletions
diff --git a/converter/other/Makefile b/converter/other/Makefile index 6a3d14ed..b01f66ae 100644 --- a/converter/other/Makefile +++ b/converter/other/Makefile @@ -7,12 +7,12 @@ VPATH=.:$(SRCDIR)/$(SUBDIR) include $(BUILDDIR)/config.mk -TEST_PKGCONFIG_LIBXML2 = if pkg-config libxml-2.0; then echo exists; fi +TEST_PKGCONFIG_LIBXML2 = if $(PKG_CONFIG) libxml-2.0; then echo exists; fi ifneq ($(shell $(TEST_PKGCONFIG_LIBXML2)),) # pkg-config libxml2 works on this system - XML2_LIBS = $(shell pkg-config libxml-2.0 --libs) - XML2_CFLAGS = $(shell pkg-config libxml-2.0 --cflags) + XML2_LIBS = $(shell $(PKG_CONFIG) libxml-2.0 --libs) + XML2_CFLAGS = $(shell $(PKG_CONFIG) libxml-2.0 --cflags) else ifeq ($(shell xml2-config --version),) XML2_LIBS=NONE @@ -34,12 +34,12 @@ ifneq ($(TIFFLIB),NONE) endif endif -TEST_PKGCONFIG_LIBPNG = if pkg-config libpng$(PNGVER); then echo exists; fi +TEST_PKGCONFIG_LIBPNG = if $(PKG_CONFIG) libpng$(PNGVER); then echo exists; fi ifneq ($(shell $(TEST_PKGCONFIG_LIBPNG)),) # pkg-config libpng works on this system HAVE_PNGLIB = Y - EXTERN_INCLUDES += $(shell pkg-config libpng$(PNGVER) --cflags) + EXTERN_INCLUDES += $(shell $(PKG_CONFIG) libpng$(PNGVER) --cflags) else ifneq ($(shell libpng$(PNGVER)-config --version),) # No pkg-config, but we have libpng-config on this system @@ -192,7 +192,7 @@ tifftopnm pamtotiff pnmtotiffcmyk: \ ifneq ($(shell $(TEST_PKGCONFIG_LIBPNG)),) # pkg-config libpng works on this system - PNGLIB_LIBOPTS = $(shell pkg-config libpng$(PNGVER) --libs) + PNGLIB_LIBOPTS = $(shell $(PKG_CONFIG) libpng$(PNGVER) --libs) else ifneq ($(shell libpng$(PNGVER)-config --version),) # No pkg-config, but we have libpng-config on this system diff --git a/converter/other/cameratopam/camera.c b/converter/other/cameratopam/camera.c index 04a6ed01..503551f1 100644 --- a/converter/other/cameratopam/camera.c +++ b/converter/other/cameratopam/camera.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure strcasecmp is in string.h */ #define _XOPEN_SOURCE diff --git a/converter/other/cameratopam/cameratopam.c b/converter/other/cameratopam/cameratopam.c index ec33dd31..2c832714 100644 --- a/converter/other/cameratopam/cameratopam.c +++ b/converter/other/cameratopam/cameratopam.c @@ -7,6 +7,7 @@ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure string.h contains strdup() */ #define _XOPEN_SOURCE 500 /* Make sure unistd.h contains swab(), string.h constains strdup() */ diff --git a/converter/other/cameratopam/identify.c b/converter/other/cameratopam/identify.c index 02208be6..7e77adb2 100644 --- a/converter/other/cameratopam/identify.c +++ b/converter/other/cameratopam/identify.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure strcasecmp() is in string.h */ #include <string.h> diff --git a/converter/other/cameratopam/ljpeg.c b/converter/other/cameratopam/ljpeg.c index 07791e25..331d258c 100644 --- a/converter/other/cameratopam/ljpeg.c +++ b/converter/other/cameratopam/ljpeg.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure string.h containst strcasecmp() */ #include <stdlib.h> #include <string.h> diff --git a/converter/other/fiasco/binerror.c b/converter/other/fiasco/binerror.c index 80a2e461..9820d853 100644 --- a/converter/other/fiasco/binerror.c +++ b/converter/other/fiasco/binerror.c @@ -18,6 +18,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _ERROR_C diff --git a/converter/other/fiasco/codec/coder.c b/converter/other/fiasco/codec/coder.c index ce4a24f1..1e21994d 100644 --- a/converter/other/fiasco/codec/coder.c +++ b/converter/other/fiasco/codec/coder.c @@ -14,6 +14,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/fiasco/codec/options.c b/converter/other/fiasco/codec/options.c index af2cfb48..b9c64efd 100644 --- a/converter/other/fiasco/codec/options.c +++ b/converter/other/fiasco/codec/options.c @@ -14,6 +14,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/fiasco/codec/wfalib.c b/converter/other/fiasco/codec/wfalib.c index 75792627..90420d6f 100644 --- a/converter/other/fiasco/codec/wfalib.c +++ b/converter/other/fiasco/codec/wfalib.c @@ -14,6 +14,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/fiasco/fiascotopnm.c b/converter/other/fiasco/fiascotopnm.c index 503d023f..e95e27fc 100644 --- a/converter/other/fiasco/fiascotopnm.c +++ b/converter/other/fiasco/fiascotopnm.c @@ -15,6 +15,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/fiasco/input/read.c b/converter/other/fiasco/input/read.c index 862fec39..9f4ac993 100644 --- a/converter/other/fiasco/input/read.c +++ b/converter/other/fiasco/input/read.c @@ -14,6 +14,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/fiasco/lib/bit-io.c b/converter/other/fiasco/lib/bit-io.c index fdcd70b9..f69343e6 100644 --- a/converter/other/fiasco/lib/bit-io.c +++ b/converter/other/fiasco/lib/bit-io.c @@ -14,6 +14,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/fiasco/params.c b/converter/other/fiasco/params.c index 14f1529e..7d0b84ab 100644 --- a/converter/other/fiasco/params.c +++ b/converter/other/fiasco/params.c @@ -15,6 +15,7 @@ * $State: Exp $ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h and strcaseeq() is in nstring.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c index 76cf4bff..b0d479d5 100644 --- a/converter/other/giftopnm.c +++ b/converter/other/giftopnm.c @@ -19,6 +19,7 @@ describe the Lempel-Ziv base. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* for strcaseeq */ #include <string.h> diff --git a/converter/other/ipdb.c b/converter/other/ipdb.c index d6bd6ef5..1d72cc31 100644 --- a/converter/other/ipdb.c +++ b/converter/other/ipdb.c @@ -19,6 +19,7 @@ * Authors: Eric A. Howe (mu@trends.net) * Bryan Henderson, 2010 */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Ensure strdup() is in <string.h> */ #include <assert.h> diff --git a/converter/other/jpeg2000/jpeg2ktopam.c b/converter/other/jpeg2000/jpeg2ktopam.c index 405de9c9..b7276241 100644 --- a/converter/other/jpeg2000/jpeg2ktopam.c +++ b/converter/other/jpeg2000/jpeg2ktopam.c @@ -8,6 +8,7 @@ *****************************************************************************/ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ /* In 2014.09, this was _XOPEN_SOURCE 600, with a comment saying it was diff --git a/converter/other/jpeg2000/pamtojpeg2k.c b/converter/other/jpeg2000/pamtojpeg2k.c index b8905518..3d8a97af 100644 --- a/converter/other/jpeg2000/pamtojpeg2k.c +++ b/converter/other/jpeg2000/pamtojpeg2k.c @@ -8,6 +8,7 @@ *****************************************************************************/ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ /* In 2014.09, this was _XOPEN_SOURCE 600, with a comment saying it was diff --git a/converter/other/jpegtopnm.c b/converter/other/jpegtopnm.c index ab3b18e5..98552c00 100644 --- a/converter/other/jpegtopnm.c +++ b/converter/other/jpegtopnm.c @@ -48,6 +48,7 @@ *****************************************************************************/ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/pamtotga.c b/converter/other/pamtotga.c index aca93015..27974dd3 100644 --- a/converter/other/pamtotga.c +++ b/converter/other/pamtotga.c @@ -10,6 +10,7 @@ ** implied warranty. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure string.h contains strdup() */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/pamtotiff.c b/converter/other/pamtotiff.c index 7b645b23..9270fd4c 100644 --- a/converter/other/pamtotiff.c +++ b/converter/other/pamtotiff.c @@ -21,6 +21,7 @@ ** other special, indirect and consequential damages. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE /* Make sure stdio.h contains fileno() */ #define _BSD_SOURCE /* Make sure string.h contains strcasecmp() */ diff --git a/converter/other/pamtouil.c b/converter/other/pamtouil.c index ee7f5ae6..01858cbc 100644 --- a/converter/other/pamtouil.c +++ b/converter/other/pamtouil.c @@ -13,6 +13,7 @@ ** implied warranty. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure string.h contains strdup() */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #include <ctype.h> diff --git a/converter/other/pgmtoppm.c b/converter/other/pgmtoppm.c index f8a69424..c3a26594 100644 --- a/converter/other/pgmtoppm.c +++ b/converter/other/pgmtoppm.c @@ -10,6 +10,7 @@ ** implied warranty. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Make sure strdup() is in <string.h> */ #include <string.h> diff --git a/converter/other/pnmtojpeg.c b/converter/other/pnmtojpeg.c index ce231c94..86cb3eea 100644 --- a/converter/other/pnmtojpeg.c +++ b/converter/other/pnmtojpeg.c @@ -16,6 +16,7 @@ *****************************************************************************/ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c index c1dadc3e..c827f549 100644 --- a/converter/other/pnmtops.c +++ b/converter/other/pnmtops.c @@ -33,6 +33,7 @@ goes in separate from the rest of the raster. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure string.h contains strdup() */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #include <stdlib.h> diff --git a/converter/other/pstopnm.c b/converter/other/pstopnm.c index 016db2f6..e19a0fa4 100644 --- a/converter/other/pstopnm.c +++ b/converter/other/pstopnm.c @@ -14,6 +14,7 @@ -----------------------------------------------------------------------------*/ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure fdopen() is in stdio.h and strdup() is in string.h */ diff --git a/converter/other/rletopnm.c b/converter/other/rletopnm.c index ff37cfe4..018456c8 100644 --- a/converter/other/rletopnm.c +++ b/converter/other/rletopnm.c @@ -35,6 +35,7 @@ * */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/svgtopam.c b/converter/other/svgtopam.c index 137f4732..a10f51da 100644 --- a/converter/other/svgtopam.c +++ b/converter/other/svgtopam.c @@ -26,6 +26,7 @@ ============================================================================*/ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Make sure strdup() is in <string.h> */ #define _POSIX_SOURCE /* Make sure fileno() is in <stdio.h> */ diff --git a/converter/other/tiff.c b/converter/other/tiff.c index d0cbbd74..39e3b0ce 100644 --- a/converter/other/tiff.c +++ b/converter/other/tiff.c @@ -6,6 +6,7 @@ ============================================================================*/ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure strcaseeq() is in nstring.h */ #include <string.h> diff --git a/converter/other/tifftopnm.c b/converter/other/tifftopnm.c index 58efe1fd..fb0a7739 100644 --- a/converter/other/tifftopnm.c +++ b/converter/other/tifftopnm.c @@ -46,6 +46,7 @@ give the user the -byrow option to order (2) only. */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/other/xwdtopnm.c b/converter/other/xwdtopnm.c index d49a2b09..df3c7375 100644 --- a/converter/other/xwdtopnm.c +++ b/converter/other/xwdtopnm.c @@ -23,6 +23,7 @@ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/pbm/g3topbm.c b/converter/pbm/g3topbm.c index b0d08f9e..83479b91 100644 --- a/converter/pbm/g3topbm.c +++ b/converter/pbm/g3topbm.c @@ -18,6 +18,7 @@ contributing their work to the public domain. ===========================================================================*/ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make nstring.h define strcaseeq() */ #include "pm_c_util.h" diff --git a/converter/pbm/pbmtoascii.c b/converter/pbm/pbmtoascii.c index fd590aa6..0305a47b 100644 --- a/converter/pbm/pbmtoascii.c +++ b/converter/pbm/pbmtoascii.c @@ -83,15 +83,15 @@ BSQ,D04, D04,D05, D04,'L', D05,'[', '<','Z', '/','Z', 'c','k',D06,'R',/*D0-DF*/ static void -makeRowOfSigs(FILE * const ifP, - unsigned int const cols, - unsigned int const rows, - int const format, - unsigned int const cellWidth, - unsigned int const cellHeight, - unsigned int const row, - unsigned int * const sig, - unsigned int const ccols) { +makeRowOfSignatures(FILE * const ifP, + unsigned int const cols, + unsigned int const rows, + int const format, + unsigned int const cellWidth, + unsigned int const cellHeight, + unsigned int const row, + unsigned int * const sig, + unsigned int const ccols) { /*---------------------------------------------------------------------------- Compute the signatures for every cell in a row. @@ -183,23 +183,30 @@ pbmtoascii(FILE * const ifP, unsigned int const cellHeight, const char * const carr) { - int cols, rows, format; + int format; + int cols, rows; + /* Dimensions of the input in pixels */ unsigned int ccols; + /* Width of the output in characters */ char * line; /* malloc'ed array */ unsigned int row; - unsigned int * sig; /* malloc'ed array */ - /* This describes in a single integer the pixels of a cell, - as described above. + unsigned int * signatureRow; /* malloc'ed array */ + /* This is the cell signatures of a row of cells. + signatureRow[0] is the signature for the first (leftmost) cell + in the row, signatureRow[1] is the signature for the next one, + etc. A signature is an encoding of the pixels of a cell as + an integer, as described above. */ - assert(cellWidth * cellHeight <= sizeof(sig[0]*8)); + assert(cellWidth * cellHeight <= sizeof(signatureRow[0])*8); pbm_readpbminit(ifP, &cols, &rows, &format); ccols = (cols + cellWidth - 1) / cellWidth; - MALLOCARRAY(sig, ccols); - if (sig == NULL) + MALLOCARRAY(signatureRow, ccols); + if (signatureRow == NULL) pm_error("No memory for %u columns", ccols); + MALLOCARRAY_NOFAIL(line, ccols+1); if (line == NULL) pm_error("No memory for %u columns", ccols); @@ -207,16 +214,16 @@ pbmtoascii(FILE * const ifP, for (row = 0; row < rows; row += cellHeight) { unsigned int endCol; - makeRowOfSigs(ifP, cols, rows, format, cellWidth, cellHeight, - row, sig, ccols); + makeRowOfSignatures(ifP, cols, rows, format, cellWidth, cellHeight, + row, signatureRow, ccols); - findRightMargin(sig, ccols, carr, &endCol); + findRightMargin(signatureRow, ccols, carr, &endCol); - assembleCellRow(sig, endCol, carr, line); + assembleCellRow(signatureRow, endCol, carr, line); puts(line); } - free(sig); + free(signatureRow); free(line); } diff --git a/converter/pbm/pbmtoepson.c b/converter/pbm/pbmtoepson.c index bb36791d..122a438f 100644 --- a/converter/pbm/pbmtoepson.c +++ b/converter/pbm/pbmtoepson.c @@ -11,6 +11,7 @@ ** implied warranty. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure strcaseeq() is in nstring.h */ #include <stdio.h> diff --git a/converter/pbm/pbmtonokia.c b/converter/pbm/pbmtonokia.c index e803e413..73b62b96 100644 --- a/converter/pbm/pbmtonokia.c +++ b/converter/pbm/pbmtonokia.c @@ -4,6 +4,7 @@ Copyright information is at end of file. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Make sure strcaseeq() is in nstring.h */ #include <string.h> diff --git a/converter/pbm/pbmtopk.c b/converter/pbm/pbmtopk.c index 3948ae0d..2f05d449 100644 --- a/converter/pbm/pbmtopk.c +++ b/converter/pbm/pbmtopk.c @@ -9,6 +9,7 @@ https://www.tug.org/TUGboat/tb06-1/tb11gf.pdf */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/pbm/pbmtoppa/pbmtoppa.c b/converter/pbm/pbmtoppa/pbmtoppa.c index f43c08a8..ff4a599e 100644 --- a/converter/pbm/pbmtoppa/pbmtoppa.c +++ b/converter/pbm/pbmtoppa/pbmtoppa.c @@ -4,6 +4,7 @@ * 2-24-98 */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* This makes sure strcasecmp() is in string.h */ #include <stdio.h> diff --git a/converter/pbm/pbmtoxbm.c b/converter/pbm/pbmtoxbm.c index 14c6b85e..ecb72b30 100644 --- a/converter/pbm/pbmtoxbm.c +++ b/converter/pbm/pbmtoxbm.c @@ -20,6 +20,7 @@ */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/ppmtobmp.c b/converter/ppm/ppmtobmp.c index 6bdec8c3..a0de38e3 100644 --- a/converter/ppm/ppmtobmp.c +++ b/converter/ppm/ppmtobmp.c @@ -13,6 +13,7 @@ * */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/ppmtogif.c b/converter/ppm/ppmtogif.c index fa7d1dbe..8dd133b5 100644 --- a/converter/ppm/ppmtogif.c +++ b/converter/ppm/ppmtogif.c @@ -10,6 +10,7 @@ - Pamtogif requires a user-specififed map file (-mapfile) to match the input in depth. */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/ppmtompeg/gethostname.c b/converter/ppm/ppmtompeg/gethostname.c index d20af17c..649fff91 100644 --- a/converter/ppm/ppmtompeg/gethostname.c +++ b/converter/ppm/ppmtompeg/gethostname.c @@ -1,3 +1,4 @@ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/ppmtompeg/mpeg.c b/converter/ppm/ppmtompeg/mpeg.c index 24d337ed..33e1a9f9 100644 --- a/converter/ppm/ppmtompeg/mpeg.c +++ b/converter/ppm/ppmtompeg/mpeg.c @@ -30,6 +30,7 @@ * HEADER FILES * *==============*/ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/ppmtompeg/param.c b/converter/ppm/ppmtompeg/param.c index 45605981..87fdfa6b 100644 --- a/converter/ppm/ppmtompeg/param.c +++ b/converter/ppm/ppmtompeg/param.c @@ -7,6 +7,8 @@ /* COPYRIGHT INFORMATION IS AT THE END OF THIS FILE */ +#define _DEFAULT_SOURCE 1 + /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* This makes sure popen() is in stdio.h. In GNU libc 2.1.3, _POSIX_C_SOURCE = 2 is sufficient, but on AIX 4.3, the higher level diff --git a/converter/ppm/ppmtompeg/ppmtompeg.c b/converter/ppm/ppmtompeg/ppmtompeg.c index 46224e84..837b1b9d 100644 --- a/converter/ppm/ppmtompeg/ppmtompeg.c +++ b/converter/ppm/ppmtompeg/ppmtompeg.c @@ -30,6 +30,7 @@ * HEADER FILES * *==============*/ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/ppmtompeg/readframe.c b/converter/ppm/ppmtompeg/readframe.c index 23752706..2a359b2f 100644 --- a/converter/ppm/ppmtompeg/readframe.c +++ b/converter/ppm/ppmtompeg/readframe.c @@ -17,6 +17,7 @@ * HEADER FILES * *==============*/ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure popen() is in stdio.h */ #include "all.h" #include <time.h> diff --git a/converter/ppm/ppmtoxpm.c b/converter/ppm/ppmtoxpm.c index 38d99972..0e316928 100644 --- a/converter/ppm/ppmtoxpm.c +++ b/converter/ppm/ppmtoxpm.c @@ -33,6 +33,7 @@ ** (base 93 not base 28 -> saves a lot of space for colorful xpms) */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/tgatoppm.c b/converter/ppm/tgatoppm.c index 95893089..3660e646 100644 --- a/converter/ppm/tgatoppm.c +++ b/converter/ppm/tgatoppm.c @@ -12,6 +12,7 @@ ** implied warranty. */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/winicontoppm.c b/converter/ppm/winicontoppm.c index 6b1376b2..2c9015f5 100644 --- a/converter/ppm/winicontoppm.c +++ b/converter/ppm/winicontoppm.c @@ -14,6 +14,7 @@ ** 03/2003 - Added 24+32 bpp capability. */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/ximtoppm.c b/converter/ppm/ximtoppm.c index ce5e6396..75faac69 100644 --- a/converter/ppm/ximtoppm.c +++ b/converter/ppm/ximtoppm.c @@ -10,6 +10,7 @@ ** implied warranty. */ +#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ diff --git a/converter/ppm/xpmtoppm.c b/converter/ppm/xpmtoppm.c index 27f17931..9471ec7c 100644 --- a/converter/ppm/xpmtoppm.c +++ b/converter/ppm/xpmtoppm.c @@ -3,6 +3,7 @@ Copyright and history information is at end of file */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _BSD_SOURCE /* Make sure strdup() is in string.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ |