author | ecalot
<ecalot> 2004-03-17 22:01:15 UTC |
committer | ecalot
<ecalot> 2004-03-17 22:01:15 UTC |
parent | 68acca336e168cdbad0a912bc20ecd94d96d2708 |
PR/src/console/main.c | +4 | -1 |
PR/src/lib/actions/export.c | +1 | -1 |
PR/src/lib/compression/rle_compress.c | +5 | -4 |
PR/src/lib/compression/rle_decompress.c | +5 | -4 |
PR/src/lib/compression/rlev_decompress.c | +5 | -4 |
PR/src/lib/layers/dat.c | +0 | -9 |
PR/src/lib/layers/disk.c | +1 | -1 |
PR/src/lib/object/image/image16.c | +5 | -4 |
PR/src/lib/object/image/image2.c | +5 | -4 |
PR/src/lib/object/image/image256.c | +5 | -4 |
PR/src/lib/object/image/image_common.c | +5 | -4 |
PR/src/lib/pr.c | +4 | -1 |
diff --git a/PR/src/console/main.c b/PR/src/console/main.c index 905be4b..bb408f4 100644 --- a/PR/src/console/main.c +++ b/PR/src/console/main.c @@ -243,7 +243,10 @@ int prImportDatOpt(const char* vDatFile, const char* vDirName, const char* vResF \***************************************************************/ void syntax() { - fprintf(outputStream,PARSING_HELP); + fprintf(outputStream,PARSING_HELP_BEGIN); + fprintf(outputStream,PARSING_HELP_PART1); + fprintf(outputStream,PARSING_HELP_PART2); + fprintf(outputStream,PARSING_HELP_PART3); } int prMain(int optionflag, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output) { diff --git a/PR/src/lib/actions/export.c b/PR/src/lib/actions/export.c index 35ae492..c187d66 100644 --- a/PR/src/lib/actions/export.c +++ b/PR/src/lib/actions/export.c @@ -164,7 +164,7 @@ int extract(const char* vFiledat,const char* vDirExt, tResource* r[], int option /* if the dat file is unknown, add it in the xml */ getFileName(vFileext,vDirExt,r[id],(unsigned short)id,vFiledat,vDatFileName,optionflag,backupExtension); } - //freeAllocation(data); + /*freeAllocation(data);*/ } } diff --git a/PR/src/lib/compression/rle_compress.c b/PR/src/lib/compression/rle_compress.c index 8497f6f..1b2680e 100644 --- a/PR/src/lib/compression/rle_compress.c +++ b/PR/src/lib/compression/rle_compress.c @@ -101,10 +101,11 @@ int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imag while (rep--) { /* Be careful in big images */ h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG)); image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG]; - -// h=((cursor-(location&0x3FF))&(~0x3FF)); -// image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; - // cursor++;location++; +/* + h=((cursor-(location&0x3FF))&(~0x3FF)); + image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; + cursor++;location++; +*/ } } } diff --git a/PR/src/lib/compression/rle_decompress.c b/PR/src/lib/compression/rle_decompress.c index 8497f6f..1b2680e 100644 --- a/PR/src/lib/compression/rle_decompress.c +++ b/PR/src/lib/compression/rle_decompress.c @@ -101,10 +101,11 @@ int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imag while (rep--) { /* Be careful in big images */ h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG)); image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG]; - -// h=((cursor-(location&0x3FF))&(~0x3FF)); -// image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; - // cursor++;location++; +/* + h=((cursor-(location&0x3FF))&(~0x3FF)); + image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; + cursor++;location++; +*/ } } } diff --git a/PR/src/lib/compression/rlev_decompress.c b/PR/src/lib/compression/rlev_decompress.c index 8497f6f..1b2680e 100644 --- a/PR/src/lib/compression/rlev_decompress.c +++ b/PR/src/lib/compression/rlev_decompress.c @@ -101,10 +101,11 @@ int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imag while (rep--) { /* Be careful in big images */ h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG)); image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG]; - -// h=((cursor-(location&0x3FF))&(~0x3FF)); -// image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; - // cursor++;location++; +/* + h=((cursor-(location&0x3FF))&(~0x3FF)); + image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; + cursor++;location++; +*/ } } } diff --git a/PR/src/lib/layers/dat.c b/PR/src/lib/layers/dat.c index a8fd3a8..9144a35 100644 --- a/PR/src/lib/layers/dat.c +++ b/PR/src/lib/layers/dat.c @@ -62,18 +62,13 @@ int mReadBeginDatFile(unsigned short int *numberOfItems,const char* vFiledat){ unsigned char* readDatFilePoint; /* Open file */ - //if ((((readDatFile=(fopen(vFiledat,"rb")))==NULL))) return -1; /* file could not be open */ readDatFileSize=mLoadFileArray(vFiledat,&readDatFile); -printf("q\n"); if (!readDatFileSize) return -1; -printf("w\n"); if (readDatFileSize<=6) return -1; -printf("e\n"); readDatFilePoint=readDatFile; /* verify dat format */ - //ok = fread(&indexOffset,4,1,readDatFile); indexOffset=array2long(readDatFilePoint); readDatFilePoint+=4; indexSize=array2short(readDatFilePoint); @@ -87,7 +82,6 @@ printf("e\n"); indexPointer=readDatFile+indexOffset; *numberOfItems=array2short(indexPointer); indexPointer+=2; -//printf("w %d %d\n",*numberOfItems,indexSize); pop1=(((*numberOfItems)*8+2)==indexSize); if (!pop1) { /* verify if pop2 */ @@ -97,7 +91,6 @@ printf("e\n"); ofk=0; } recordSize=pop1?8:11; -//printf("k %d\n",recordSize); return 0; } @@ -110,9 +103,7 @@ int mReadGetFileInDatFile(int k,unsigned char* *data,unsigned long int *size) { id= (indexPointer[ofk+k*recordSize])+(indexPointer[ofk+k*recordSize+1]<<8); offset=(indexPointer[ofk+k*recordSize+2])+(indexPointer[ofk+k*recordSize+3]<<8)+(indexPointer[ofk+k*recordSize+4]<<16)+(indexPointer[ofk+k*recordSize+5]<<24); *size= (indexPointer[ofk+k*recordSize+6])+(indexPointer[ofk+k*recordSize+7]<<8)+1; - //printf("kkx %d %d %d\n",id,offset,*size); if (!pop1) ok=(indexPointer[ofk+k*recordSize+8]==0x40)&&(!indexPointer[ofk+k*recordSize+9])&&(!indexPointer[ofk+k*recordSize+10]); - //ok=ok&&((*data=getMemory(*size))!=NULL); *data=readDatFile+offset; return ok?id:-1; } diff --git a/PR/src/lib/layers/disk.c b/PR/src/lib/layers/disk.c index 8097f11..bd51e42 100644 --- a/PR/src/lib/layers/disk.c +++ b/PR/src/lib/layers/disk.c @@ -50,7 +50,7 @@ extern FILE* outputStream; #define defmkdir(a) mkdir (a,(mode_t)0755) #include <dirent.h> #include <termios.h> - //#include <curses.h> + /*#include <curses.h>*/ #include <unistd.h> #include <fcntl.h> #define osIndepGetCharacter() getchar() diff --git a/PR/src/lib/object/image/image16.c b/PR/src/lib/object/image/image16.c index 8497f6f..1b2680e 100644 --- a/PR/src/lib/object/image/image16.c +++ b/PR/src/lib/object/image/image16.c @@ -101,10 +101,11 @@ int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imag while (rep--) { /* Be careful in big images */ h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG)); image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG]; - -// h=((cursor-(location&0x3FF))&(~0x3FF)); -// image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; - // cursor++;location++; +/* + h=((cursor-(location&0x3FF))&(~0x3FF)); + image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; + cursor++;location++; +*/ } } } diff --git a/PR/src/lib/object/image/image2.c b/PR/src/lib/object/image/image2.c index 8497f6f..1b2680e 100644 --- a/PR/src/lib/object/image/image2.c +++ b/PR/src/lib/object/image/image2.c @@ -101,10 +101,11 @@ int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imag while (rep--) { /* Be careful in big images */ h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG)); image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG]; - -// h=((cursor-(location&0x3FF))&(~0x3FF)); -// image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; - // cursor++;location++; +/* + h=((cursor-(location&0x3FF))&(~0x3FF)); + image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; + cursor++;location++; +*/ } } } diff --git a/PR/src/lib/object/image/image256.c b/PR/src/lib/object/image/image256.c index 8497f6f..1b2680e 100644 --- a/PR/src/lib/object/image/image256.c +++ b/PR/src/lib/object/image/image256.c @@ -101,10 +101,11 @@ int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imag while (rep--) { /* Be careful in big images */ h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG)); image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG]; - -// h=((cursor-(location&0x3FF))&(~0x3FF)); -// image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; - // cursor++;location++; +/* + h=((cursor-(location&0x3FF))&(~0x3FF)); + image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; + cursor++;location++; +*/ } } } diff --git a/PR/src/lib/object/image/image_common.c b/PR/src/lib/object/image/image_common.c index 8497f6f..1b2680e 100644 --- a/PR/src/lib/object/image/image_common.c +++ b/PR/src/lib/object/image/image_common.c @@ -101,10 +101,11 @@ int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imag while (rep--) { /* Be careful in big images */ h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG)); image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG]; - -// h=((cursor-(location&0x3FF))&(~0x3FF)); -// image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; - // cursor++;location++; +/* + h=((cursor-(location&0x3FF))&(~0x3FF)); + image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)]; + cursor++;location++; +*/ } } } diff --git a/PR/src/lib/pr.c b/PR/src/lib/pr.c index 905be4b..bb408f4 100644 --- a/PR/src/lib/pr.c +++ b/PR/src/lib/pr.c @@ -243,7 +243,10 @@ int prImportDatOpt(const char* vDatFile, const char* vDirName, const char* vResF \***************************************************************/ void syntax() { - fprintf(outputStream,PARSING_HELP); + fprintf(outputStream,PARSING_HELP_BEGIN); + fprintf(outputStream,PARSING_HELP_PART1); + fprintf(outputStream,PARSING_HELP_PART2); + fprintf(outputStream,PARSING_HELP_PART3); } int prMain(int optionflag, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output) {