OpenJPIP: small bug fixes to compile on win platform
This commit is contained in:
parent
1dc2654b54
commit
fb29d47f0c
3
CHANGES
3
CHANGES
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
May 9, 2011
|
||||||
|
* [antonin] OpenJPIP: small bug fixes to compile on win platform
|
||||||
|
|
||||||
May 8, 2011
|
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()).
|
* [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()).
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ void send_PNMstream( int connected_socket, Byte_t *pnmstream, unsigned int width
|
||||||
|
|
||||||
void send_stream( int connected_socket, void *stream, int length)
|
void send_stream( int connected_socket, void *stream, int length)
|
||||||
{
|
{
|
||||||
void *ptr = stream;
|
Byte_t *ptr = (Byte_t*)stream;
|
||||||
int remlen = length;
|
int remlen = length;
|
||||||
|
|
||||||
while( remlen > 0){
|
while( remlen > 0){
|
||||||
|
|
|
@ -130,7 +130,7 @@ int main(int argc, char *argv[]){
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
|
|
||||||
int listening_socket = open_listeningsocket();
|
int listening_socket = open_listeningsocket();
|
||||||
int addrlen = sizeof(peer_sin);
|
socklen_t addrlen = sizeof(peer_sin);
|
||||||
|
|
||||||
cachelist_param_t *cachelist = gene_cachelist();
|
cachelist_param_t *cachelist = gene_cachelist();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,13 @@
|
||||||
#ifndef QUERY_PARSER_H_
|
#ifndef QUERY_PARSER_H_
|
||||||
# define QUERY_PARSER_H_
|
# define QUERY_PARSER_H_
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define bool int
|
||||||
|
#define true 1
|
||||||
|
#define false 0
|
||||||
|
#else
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
//! maximum length of target name
|
//! maximum length of target name
|
||||||
#define MAX_LENOFTARGET 128
|
#define MAX_LENOFTARGET 128
|
||||||
|
|
|
@ -1017,7 +1017,7 @@ void j2k_read_unk() {
|
||||||
|
|
||||||
int j2k_index_JPIP(char *Idx_file, char *J2K_file, int len, int version){
|
int j2k_index_JPIP(char *Idx_file, char *J2K_file, int len, int version){
|
||||||
FILE *dest;
|
FILE *dest;
|
||||||
char *index;
|
unsigned char *index;
|
||||||
int pos_iptr, end_pos;
|
int pos_iptr, end_pos;
|
||||||
int len_cidx, pos_cidx;
|
int len_cidx, pos_cidx;
|
||||||
int len_jp2c, pos_jp2c;
|
int len_jp2c, pos_jp2c;
|
||||||
|
@ -1030,7 +1030,7 @@ int j2k_index_JPIP(char *Idx_file, char *J2K_file, int len, int version){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* INDEX MODE JPIP */
|
/* INDEX MODE JPIP */
|
||||||
index = (char*)malloc(len);
|
index = (unsigned char*)malloc(len);
|
||||||
cio_init(index, len);
|
cio_init(index, len);
|
||||||
jp2_write_jp();
|
jp2_write_jp();
|
||||||
jp2_write_ftyp();
|
jp2_write_ftyp();
|
||||||
|
@ -1158,7 +1158,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
FILE *src;
|
FILE *src;
|
||||||
int totlen;
|
int totlen;
|
||||||
char *j2kfile;
|
unsigned char *j2kfile;
|
||||||
j2k_image_t *imgg;
|
j2k_image_t *imgg;
|
||||||
j2k_cp_t *cp;
|
j2k_cp_t *cp;
|
||||||
int version;
|
int version;
|
||||||
|
@ -1180,7 +1180,7 @@ int main(int argc, char **argv)
|
||||||
totlen = ftell(src);
|
totlen = ftell(src);
|
||||||
fseek(src, 0, SEEK_SET);
|
fseek(src, 0, SEEK_SET);
|
||||||
|
|
||||||
j2kfile = (char*)malloc(totlen);
|
j2kfile = (unsigned char*)malloc(totlen);
|
||||||
fread(j2kfile, 1, totlen, src);
|
fread(j2kfile, 1, totlen, src);
|
||||||
fclose(src);
|
fclose(src);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue