--- /dev/null
+What's New for OpenJPIP
+
+* : fixed
+- : removed
+! : changed
++ : added
+
+May 9, 2011
+* [kaori] Removal of c99 from the compile option (to be compatible to win platform) and bool definition in libopenjpip/bool.h
+
+May 9, 2011
+* [antonin] OpenJPIP: small bug fixes to compile on win platform
+
+May 8, 2011
+* [antonin] OpenJPIP: fixed several bugs in opj_server (removal of strsep function, duplication of query string) + some changes to compile opj_server under windows (replacement of strcasecmp(), bzero()).
+
+April 14, 2011
++ [antonin] initial commit of OpenJPIP 1.0, a JPIP client-server architecture based on OpenJPEG (see README file in jpip directory for more details)
+* [antonin] fixed applications/codec/CMakeLists.txt that prevented JPWL executables to be built with JPWL functionalities.
+! [antonin] changed make all behaviour : DOC target removed from ALL.
--- /dev/null
+/*
+ * $Id$
+ *
+ * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
+ * Copyright (c) 2002-2011, Professor Benoit Macq
+ * Copyright (c) 2010-2011, Kaori Hagihara
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef BOOL_H_
+# define BOOL_H_
+
+#ifndef false
+#define false 0
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef true
+#define true (!false)
+#endif
+
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+
+typedef char bool;
+
+#endif /* !BOOL_H_ */
ifdef jpipserver
-CFLAGS = -O3 -Wall -std=c99 -pedantic -m32 -DSERVER
+CFLAGS = -O3 -Wall -m32 -DSERVER
LIBNAME = libopenjpip_server.a
else
-CFLAGS = -O3 -Wall -std=c99 -pedantic
+CFLAGS = -O3 -Wall
LIBNAME = libopenjpip_local.a
endif
/*
- * $Id: faixbox_manager.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: faixbox_manager.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
if( faix->version%2){
subfaixbox8_param_t *subfaixbox;
+ int i;
faix->subfaixbox.byte8_params = (subfaixbox8_param_t *)malloc( sizeof(subfaixbox8_param_t));
if( faix->version == 3)
subfaixbox->aux = ( Byte4_t *)malloc( numOfelem*sizeof(Byte4_t));
- for( int i=0; i<numOfelem; i++){
+ for( i=0; i<numOfelem; i++){
subfaixbox->elem[i].off = fetch_DBox8bytebigendian( box, (pos+=8)-8);
subfaixbox->elem[i].len = fetch_DBox8bytebigendian( box, (pos+=8)-8);
if( faix->version == 3)
}
else{
subfaixbox4_param_t *subfaixbox;
+ int i;
faix->subfaixbox.byte4_params = (subfaixbox4_param_t *)malloc( sizeof(subfaixbox4_param_t));
if( faix->version == 2)
subfaixbox->aux = ( Byte4_t *)malloc( numOfelem*sizeof(Byte4_t));
- for( int i=0; i<numOfelem; i++){
+ for( i=0; i<numOfelem; i++){
subfaixbox->elem[i].off = fetch_DBox4bytebigendian( box, (pos+=4)-4);
subfaixbox->elem[i].len = fetch_DBox4bytebigendian( box, (pos+=4)-4);
if( faix->version == 2)
void print_faixbox( faixbox_param_t *faix)
{
+ Byte8_t i, j;
+
fprintf( logstream, "faix box info\n");
fprintf( logstream, "\tversion: %d\n", faix->version);
fprintf( logstream, "\t nmax: %#llx = %lld\n", get_nmax( faix), get_nmax( faix));
fprintf( logstream, "\t m: %#llx = %lld\n", get_m( faix), get_m( faix));
- for( Byte8_t i=0; i<get_m( faix); i++){
- for( Byte8_t j=0; j<get_nmax( faix); j++){
+ for( i=0; i<get_m( faix); i++){
+ for( j=0; j<get_nmax( faix); j++){
fprintf( logstream, "\t off = %#llx, len = %#llx", get_elemOff( faix, j, i), get_elemLen( faix, j, i));
if( 2 <= faix->version)
fprintf( logstream, ", aux = %#x", get_elemAux( faix, j, i));
/*
- * $Id: index_manager.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: index_manager.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdbool.h>
#include <stdlib.h>
-#include <strings.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
+
#include "index_manager.h"
#include "box_manager.h"
#include "manfbox_manager.h"
void print_index( index_param_t index)
{
+ int i;
+
fprintf( logstream, "index info:\n");
fprintf( logstream, "\tCodestream Offset: %#llx\n", index.offset);
fprintf( logstream, "\t Length: %#llx\n", index.length);
fprintf( logstream, "\t XTnum, YTnum: (%d,%d)\n", index.XTnum, index.YTnum);
fprintf( logstream, "\t Num of Components: %d\n", index.Csiz);
- for( int i=0; i<index.Csiz; i++)
+ for( i=0; i<index.Csiz; i++)
fprintf( logstream, "\t[%d] (Ssiz, XRsiz, YRsiz): (%d, %d, %d) = (%#x, %#x, %#x)\n", i, index.Ssiz[i], index.XRsiz[i], index.YRsiz[i], index.Ssiz[i], index.XRsiz[i], index.YRsiz[i]);
print_faixbox( index.tilepart);
void print_cachemodel( index_param_t index)
{
Byte8_t TPnum; // num of tile parts in each tile
+ int i, j, k, n;
TPnum = get_nmax( index.tilepart);
fprintf( logstream, "\t main header model: %d\n", index.mhead_model);
fprintf( logstream, "\t tile part model:\n");
- for( int i=0, n=0; i<index.YTnum; i++){
- for( int j=0; j<index.XTnum; j++){
- for( int k=0; k<TPnum; k++)
+ for( i=0, n=0; i<index.YTnum; i++){
+ for( j=0; j<index.XTnum; j++){
+ for( k=0; k<TPnum; k++)
fprintf( logstream, "%d", index.tp_model[n++]);
fprintf( logstream, " ");
}
numOfelem = get_nmax( faix)*get_m( faix);
jp2idx->tp_model = (bool *)malloc( numOfelem*sizeof(bool));
- bzero( jp2idx->tp_model, numOfelem*sizeof(bool));
+ memset( jp2idx->tp_model, 0, numOfelem*sizeof(bool));
//delete_faixbox( &faix); // currently the jp2idx element
free( tpix_box);
bool set_SIZmkrdata( markeridx_param_t *sizmkidx, codestream_param_t codestream, index_param_t *jp2idx)
{
marker_param_t sizmkr;
-
+ int i;
+
sizmkr = set_marker( codestream, sizmkidx->code, sizmkidx->offset, sizmkidx->length);
if( sizmkidx->length != fetch_marker2bytebigendian( sizmkr, 0)){
jp2idx->XTnum = ( jp2idx->Xsiz-jp2idx->XTOsiz+jp2idx->XTsiz-1)/jp2idx->XTsiz;
jp2idx->YTnum = ( jp2idx->Ysiz-jp2idx->YTOsiz+jp2idx->YTsiz-1)/jp2idx->YTsiz;
- for( int i=0; i<(int)jp2idx->Csiz; i++){
+ for( i=0; i<(int)jp2idx->Csiz; i++){
jp2idx->Ssiz[i] = fetch_marker1byte( sizmkr, 38+i*3);
jp2idx->XRsiz[i] = fetch_marker1byte( sizmkr, 39+i*3);
jp2idx->YRsiz[i] = fetch_marker1byte( sizmkr, 40+i*3);
range_param_t get_tile_range( Byte4_t Osiz, Byte4_t siz, Byte4_t TOsiz, Byte4_t Tsiz, Byte4_t tile_id, int level)
{
range_param_t range;
+ int n;
range.minvalue = max( Osiz, TOsiz+tile_id*Tsiz);
range.maxvalue = min( siz, TOsiz+(tile_id+1)*Tsiz);
- for( int n=0; n<level; n++){
+ for( n=0; n<level; n++){
range.minvalue = ceil(range.minvalue/2.0);
range.maxvalue = ceil(range.maxvalue/2.0);
}
/*
- * $Id: index_manager.h 44 2011-02-15 12:32:29Z kaori $
+ * $Id: index_manager.h 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
# define INDEX_MANAGER_H_
#include <stdio.h>
-#include <stdbool.h>
+#include "bool.h"
#include "byte_manager.h"
#include "faixbox_manager.h"
#include "metadata_manager.h"
/*
- * $Id: metadata_manager.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: metadata_manager.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
int search_metadataidx( char boxtype[4], metadatalist_param_t *list)
{
metadata_param_t *ptr;
+ int i;
- for( int i=0; i<4; i++)
+ for( i=0; i<4; i++)
if( boxtype[i] == '_')
boxtype[i] = ' ';
/*
- * $Id: msgqueue_manager.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: msgqueue_manager.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
faixbox_param_t *tilepart;
message_param_t *msg;
Byte8_t binOffset, binLength;
+ int i;
target = msgqueue->target;
codeidx = target->codeidx;
tp_model = &codeidx->tp_model[ tile_id*numOftparts];
binOffset=0;
- for( int i=0; i<numOftparts-level; i++){
+ for( i=0; i<numOftparts-level; i++){
binLength = get_elemLen( tilepart, i, tile_id);
if( !tp_model[i]){
void print_binarycode( Byte8_t n, int segmentlen)
{
char buf[256];
- int i=0;
+ int i=0, j, k;
+
do{
buf[i++] = n%2 ? '1' : '0';
}while((n=n/2));
- for( int j=segmentlen-1; j>=i; j--)
+ for( j=segmentlen-1; j>=i; j--)
putchar('0');
- for( int j=i-1, k=0; j>=0; j--, k++){
+ for( j=i-1, k=0; j>=0; j--, k++){
putchar( buf[j]);
if( !((k+1)%segmentlen))
printf(" ");
message_param_t *ptr;
Byte_t *codestream = NULL;
int last_tileID;
+ int tileID;
*codelen = 0;
last_tileID = get_last_tileID( msgqueue, csn);
- for( int tileID=0; tileID <= last_tileID; tileID++){
+ for( tileID=0; tileID <= last_tileID; tileID++){
bool found = false;
ptr = msgqueue->first;
while(( ptr = search_message( TILE_MSG, tileID, csn, ptr))!=NULL){
/*
- * $Id: msgqueue_manager.h 44 2011-02-15 12:32:29Z kaori $
+ * $Id: msgqueue_manager.h 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
#ifndef MSGQUEUE_MANAGER_H_
# define MSGQUEUE_MANAGER_H_
-#include <stdbool.h>
#include <stdio.h>
+#include "bool.h"
#include "byte_manager.h"
#include "target_manager.h"
#include "placeholder_manager.h"
/*
- * $Id: placeholder_manager.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: placeholder_manager.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
void print_placeholder( placeholder_param_t *phld)
{
+ int i;
+
fprintf( logstream, "placeholder info:\n");
fprintf( logstream, "\t LBox: %d %#x\n", phld->LBox, phld->LBox);
fprintf( logstream, "\t TBox: %.4s\n", phld->TBox);
fprintf( logstream, "\t Flags: %#x %#x\n", phld->Flags, phld->Flags);
fprintf( logstream, "\t OrigID: %lld\n", phld->OrigID);
fprintf( logstream, "\t OrigBH: ");
- for( int i=0; i< phld->OrigBHlen; i++)
+
+ for( i=0; i< phld->OrigBHlen; i++)
fprintf( logstream, "%02x ", phld->OrigBH[i]);
fprintf( logstream, "\t");
- for( int i=0; i< phld->OrigBHlen; i++)
+
+ for( i=0; i< phld->OrigBHlen; i++)
fprintf( logstream, "%c", phld->OrigBH[i]);
fprintf( logstream, "\n");
}
LIBDIR = ../../libopenjpip
LIBFNAME = $(LIBDIR)/libopenjpip_local.a
-CFLAGS = -O3 -Wall -std=c99 -pedantic -I$(LIBDIR)
+CFLAGS = -O3 -Wall -I$(LIBDIR)
LDFLAGS = -L$(LIBDIR) -lm -lopenjpeg -lopenjpip_local
/*
- * $Id: cache_manager.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: cache_manager.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
void delete_cache( cache_param_t **cache)
{
+ int i;
+
delete_metadatalist( &(*cache)->metadatalist);
if((*cache)->ihdrbox)
free((*cache)->ihdrbox);
- for( int i=0; i<(*cache)->numOfcid; i++)
+ for( i=0; i<(*cache)->numOfcid; i++)
free( (*cache)->cid[i]);
free( (*cache)->cid);
free( *cache);
cache_param_t * search_cacheBycid( char cid[], cachelist_param_t *cachelist)
{
cache_param_t *foundcache;
+ int i;
foundcache = cachelist->first;
while( foundcache != NULL){
- for( int i=0; i<foundcache->numOfcid; i++)
+ for( i=0; i<foundcache->numOfcid; i++)
if( strcmp( cid, foundcache->cid[i]) == 0)
return foundcache;
foundcache = foundcache->next;
void add_cachecid( char *cid, cache_param_t *cache)
{
char **tmp;
+ int i;
tmp = cache->cid;
cache->cid = (char **)malloc( (cache->numOfcid+1)*sizeof(char *));
- for( int i=0; i<cache->numOfcid; i++){
+ for( i=0; i<cache->numOfcid; i++){
cache->cid[i] = (char *)malloc( MAX_LENOFCID);
strcpy( cache->cid[i], tmp[i]);
free( tmp[i]);
{
int idx = -1;
char **tmp;
+ int i, j;
- for( int i=0; i<cache->numOfcid; i++)
+ for( i=0; i<cache->numOfcid; i++)
if( strcmp( cid, cache->cid[i]) == 0){
idx = i;
break;
cache->cid = (char **)malloc( (cache->numOfcid-1)*sizeof(char *));
- for( int i=0, j=0; i<cache->numOfcid; i++){
+ for( i=0, j=0; i<cache->numOfcid; i++){
if( i != idx){
cache->cid[j] = (char *)malloc( MAX_LENOFCID);
strcpy( cache->cid[j], tmp[i]);
void print_cache( cache_param_t *cache)
{
+ int i;
+
fprintf( stdout,"cache\n");
fprintf( stdout,"\t filename: %s\n", cache->filename);
fprintf( stdout,"\t csn: %d\n", cache->csn);
fprintf( stdout,"\t cid:");
- for( int i=0; i<cache->numOfcid; i++)
+
+ for( i=0; i<cache->numOfcid; i++)
fprintf( stdout," %s", cache->cid[i]);
fprintf( stdout,"\n");
}
/*
- * $Id: imgsock_manager.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: imgsock_manager.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
* POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef _WIN32
+#include <windows.h>
+#define strcasecmp _stricmp
+#else
+#include <strings.h>
+#endif
+
#include <stdio.h>
#include <string.h>
-#include <strings.h>
#include <stdlib.h>
#include <netdb.h>
#include <sys/types.h>
int read_size;
char buf[BUF_LEN];
char *magicid[] = { "JPT-stream", "PNM request", "XML request", "CID request", "CID destroy", "JP2 save", "QUIT"};
+ int i;
read_size = read_line( connected_socket, buf);
return ERROR;
}
- for( int i=0; i<NUM_OF_MSGTYPES; i++){
+ for( i=0; i<NUM_OF_MSGTYPES; i++){
if( strncasecmp( magicid[i], buf, strlen(magicid[i])) == 0){
printf("Client message: %s\n", magicid[i]);
return i;
void send_stream( int connected_socket, void *stream, int length)
{
- Byte_t *ptr = (Byte_t*)stream;
+ void *ptr = stream;
int remlen = length;
while( remlen > 0){
/*
- * $Id: imgsock_manager.h 44 2011-02-15 12:32:29Z kaori $
+ * $Id: imgsock_manager.h 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
#ifndef IMGSOCK_MANAGER_H_
# define IMGSOCK_MANAGER_H_
-#include <stdbool.h>
+#include "bool.h"
#include "byte_manager.h"
/**
/*
- * $Id: jp2k_decoder.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: jp2k_decoder.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
int adjustR, adjustG=0, adjustB=0;
int datasize;
Byte_t *pix=NULL, *ptr=NULL;
+ int i;
if(*ihdrbox){
if( (*ihdrbox)->nc != image->numcomps)
pix = (Byte_t *)malloc( datasize);
ptr = pix;
- for( int i = 0; i < image->comps[0].w * image->comps[0].h; i++){
+ for( i = 0; i < image->comps[0].w * image->comps[0].h; i++){
int r, g, b;
r = image->comps[0].data[i];
r += (image->comps[0].sgnd ? 1 << (image->comps[0].prec - 1) : 0);
LIBDIR = ../libopenjpip
LIBFNAME = $(LIBDIR)/libopenjpip_server.a
-CFLAGS = -O3 -Wall -std=c99 -pedantic -m32 -DSERVER -I$(LIBDIR)
+CFLAGS = -O3 -Wall -m32 -DSERVER -I$(LIBDIR)
LDFLAGS = -L$(LIBDIR) -lm -lfcgi -lopenjpip_server
ALL = opj_server
/*
- * $Id: opj_server.c 46 2011-02-17 14:50:55Z kaori $
+ * $Id: opj_server.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
{
imgreg_param_t imgreg;
range_param_t tile_Xrange, tile_Yrange;
+ int u, v, tile_id;
imgreg = map_viewin2imgreg( query_param.fx, query_param.fy,
query_param.rx, query_param.ry, query_param.rw, query_param.rh,
get_nmax( codeidx->tilepart));
- for( int u=0, tile_id=0; u<codeidx->YTnum; u++){
+ for( u=0, tile_id=0; u<codeidx->YTnum; u++){
tile_Yrange = get_tile_Yrange( *codeidx, u, imgreg.level);
- for( int v=0; v<codeidx->XTnum; v++, tile_id++){
+ for( v=0; v<codeidx->XTnum; v++, tile_id++){
tile_Xrange = get_tile_Xrange( *codeidx, v, imgreg.level);
if( tile_Xrange.minvalue < tile_Xrange.maxvalue && tile_Yrange.minvalue < tile_Yrange.maxvalue){
void enqueue_metabins( query_param_t query_param, metadatalist_param_t *metadatalist, msgqueue_param_t *msgqueue)
{
- for( int i=0; query_param.box_type[i][0]!=0 && i<MAX_NUMOFBOX; i++){
+ int i;
+ for( i=0; query_param.box_type[i][0]!=0 && i<MAX_NUMOFBOX; i++){
if( query_param.box_type[i][0] == '*'){
// not implemented
}
/*
- * $Id: query_parser.c 44 2011-02-15 12:32:29Z kaori $
+ * $Id: query_parser.c 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _WIN32
-#include <strings.h>
-#endif
-#include <stdio.h>
-#include <string.h>
-#include "query_parser.h"
+
#ifdef _WIN32
#include <windows.h>
#define strcasecmp _stricmp
+#else
+#include <strings.h>
#endif
+#include <stdio.h>
+#include <string.h>
+#include "query_parser.h"
+
#ifdef SERVER
#include "fcgi_stdio.h"
#define logstream FCGI_stdout
void str2cclose( char *src, char cclose[][MAX_LENOFCID])
{
int i, u, v;
+
size_t len = strlen( src);
for( i=0, u=0, v=0; i<len; i++){
/*
- * $Id: query_parser.h 44 2011-02-15 12:32:29Z kaori $
+ * $Id: query_parser.h 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
#ifndef QUERY_PARSER_H_
# define QUERY_PARSER_H_
-#ifdef _WIN32
-#define bool int
-#define true 1
-#define false 0
-#else
-#include <stdbool.h>
-#endif
+#include "bool.h"
//! maximum length of target name
#define MAX_LENOFTARGET 128
/*
- * $Id: session_manager.h 44 2011-02-15 12:32:29Z kaori $
+ * $Id: session_manager.h 53 2011-05-09 16:55:39Z kaori $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
#ifndef SESSION_MANAGER_H_
# define SESSION_MANAGER_H_
-#include <stdbool.h>
+#include "bool.h"
#include "channel_manager.h"
#include "target_manager.h"
LIBDIR = ../libopenjpip
LIBFNAME = $(LIBDIR)/libopenjpip_local.a
-CFLAGS = -O3 -Wall -std=c99 -pedantic -I$(LIBDIR)
+CFLAGS = -O3 -Wall -I$(LIBDIR)
LDFLAGS = -L$(LIBDIR) -lm -lopenjpip_local
ALL = jpt_to_jp2 jpt_to_j2k test_index addXMLinJP2