diff options
Diffstat (limited to 'converter/other/jpeg2000/libjasper/base')
-rw-r--r-- | converter/other/jpeg2000/libjasper/base/jas_image.c | 8 | ||||
-rw-r--r-- | converter/other/jpeg2000/libjasper/base/jas_seq.c | 3 | ||||
-rw-r--r-- | converter/other/jpeg2000/libjasper/base/jas_stream.c | 9 |
3 files changed, 11 insertions, 9 deletions
diff --git a/converter/other/jpeg2000/libjasper/base/jas_image.c b/converter/other/jpeg2000/libjasper/base/jas_image.c index e6439fcd..903b45c6 100644 --- a/converter/other/jpeg2000/libjasper/base/jas_image.c +++ b/converter/other/jpeg2000/libjasper/base/jas_image.c @@ -375,9 +375,9 @@ static void jas_image_cmpt_destroy(jas_image_cmpt_t *cmpt) jas_free(cmpt); } -/******************************************************************************\ +/*****************************************************************************\ * Load and save operations. -\******************************************************************************/ +\*****************************************************************************/ jas_image_t *jas_image_decode(jas_stream_t *in, int fmt, char *optstr) { @@ -623,7 +623,7 @@ int jas_image_getfmt(jas_stream_t *in) int found; int i; - /* Check for data in each of the supported formats. */ + /* Check for data in each of the formats we know. */ found = 0; for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) { @@ -857,7 +857,7 @@ void jas_image_dump(jas_image_t *image, FILE *out) } for (cmptno = 0; cmptno < image->numcmpts_; ++cmptno) { cmpt = image->cmpts_[cmptno]; - fprintf(out, "prec=%d sgnd=%d\n", cmpt->prec_, cmpt->sgnd_); + fprintf(out, "prec=%d sgnd=%d\n", (int)cmpt->prec_, cmpt->sgnd_); if (jas_image_readcmpt(image, cmptno, 0, 0, 1, 1, data)) { abort(); } diff --git a/converter/other/jpeg2000/libjasper/base/jas_seq.c b/converter/other/jpeg2000/libjasper/base/jas_seq.c index b8e3c94b..12dc1595 100644 --- a/converter/other/jpeg2000/libjasper/base/jas_seq.c +++ b/converter/other/jpeg2000/libjasper/base/jas_seq.c @@ -414,7 +414,8 @@ int jas_matrix_output(jas_matrix_t *matrix, FILE *out) int j; jas_seqent_t x; - fprintf(out, "%d %d\n", jas_matrix_numrows(matrix), jas_matrix_numcols(matrix)); + fprintf(out, "%d %d\n", + (int)jas_matrix_numrows(matrix), (int)jas_matrix_numcols(matrix)); for (i = 0; i < jas_matrix_numrows(matrix); ++i) { for (j = 0; j < jas_matrix_numcols(matrix); ++j) { x = jas_matrix_get(matrix, i, j); diff --git a/converter/other/jpeg2000/libjasper/base/jas_stream.c b/converter/other/jpeg2000/libjasper/base/jas_stream.c index 4c84e6c2..16c948eb 100644 --- a/converter/other/jpeg2000/libjasper/base/jas_stream.c +++ b/converter/other/jpeg2000/libjasper/base/jas_stream.c @@ -117,6 +117,7 @@ */ #define _XOPEN_SOURCE 500 /* Make sure P_tmpdir is defined */ +#include "pm_config.h" #include <assert.h> #include <fcntl.h> #include <stdlib.h> @@ -126,11 +127,11 @@ #if defined(HAVE_UNISTD_H) #include <unistd.h> #endif -#if defined(WIN32) || defined(HAVE_IO_H) +#if HAVE_IO_H #include <io.h> #endif -#include "pm.h" +#include "netpbm/pm.h" #include "jasper/jas_types.h" #include "jasper/jas_stream.h" @@ -440,7 +441,7 @@ jas_stream_t *jas_stream_fdopen(int fd, const char *mode) /* Parse the mode string. */ stream->openmode_ = jas_strtoopenmode(mode); -#if defined(WIN32) +#if defined(HAVE_SETMODE) && defined(O_BINARY) /* Argh!!! Someone ought to banish text mode (i.e., O_TEXT) to the greatest depths of purgatory! */ /* Ensure that the file descriptor is in binary mode, if the caller @@ -902,7 +903,7 @@ int jas_stream_copy(jas_stream_t *out, jas_stream_t *in, int n) while (all || m > 0) { if ((c = jas_stream_getc_macro(in)) == EOF) { /* The next character of input could not be read. */ - /* Return with an error if an I/O error occured + /* Return with an error if an I/O error occurred (not including EOF) or if an explicit copy count was specified. */ return (!all || jas_stream_error(in)) ? (-1) : 0; |