From ac0cc6df623f02e21fb9eb950e73237c794f4a89 Mon Sep 17 00:00:00 2001 From: Giuseppe Baruffa Date: Mon, 11 Feb 2008 14:43:11 +0000 Subject: Minor style modifications to comply with c99 compiler flag; removed Microsoft-specific "union-in-struct" syntax; Re-enabled cstr_info struct creation when -W switch is specified. Changed a number of things in opjviewer (e.g., decoding thread does not execute GUI calls anymore), to have it running under linux --> it is better than before, but still crashes --- codec/image_to_j2k.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'codec') diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index 7fbd5a8a..0ce1a357 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -1054,7 +1054,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, int hprot, pprot, sens, addr, size, range; /* we need to enable indexing */ - if (!indexfilename) { + if (!indexfilename || !strcmp(indexfilename, "")) { strncpy(indexfilename, JPWL_PRIVATEINDEX_NAME, OPJ_PATH_LEN); } @@ -1122,7 +1122,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search packet error protection method */ if (*token == 'p') { - static int pack = 0, tile = 0, packspec = 0, lastpackno = 0; + static int pack = 0, tile = 0, packspec = 0/*, lastpackno = 0*/; pprot = 1; /* predefined method */ @@ -1278,7 +1278,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search addressing size */ if (*token == 'a') { - static int tile = 0, tilespec = 0, lasttileno = 0; + /*static int tile = 0, tilespec = 0, lasttileno = 0*/; addr = 0; /* predefined: auto */ @@ -1304,7 +1304,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search sensitivity size */ if (*token == 'z') { - static int tile = 0, tilespec = 0, lasttileno = 0; + /*static int tile = 0, tilespec = 0, lasttileno = 0;*/ size = 1; /* predefined: 1 byte */ @@ -1330,7 +1330,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search range method */ if (*token == 'g') { - static int tile = 0, tilespec = 0, lasttileno = 0; + /*static int tile = 0, tilespec = 0, lasttileno = 0;*/ range = 0; /* predefined: 0 (packet) */ -- cgit v1.2.3