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

This commit is contained in:
Giuseppe Baruffa
2008-02-11 14:43:11 +00:00
parent 29ea3dde47
commit ac0cc6df62
17 changed files with 271 additions and 165 deletions

View File

@@ -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) */