author | ecalot
<ecalot> 2006-06-06 01:01:12 UTC |
committer | ecalot
<ecalot> 2006-06-06 01:01:12 UTC |
parent | 6239c2f78f1a5963e516d2774c877cf2e4cbd179 |
PR/src/console/main.c | +1 | -1 |
PR/src/include/en.lang.pr.h | +1 | -1 |
PR/src/lib/actions/export.c | +3 | -3 |
PR/src/lib/compression/lzg_decompress.c | +1 | -9 |
PR/src/lib/object/image/image256.c | +1 | -1 |
PR/src/lib/object/object.c | +0 | -1 |
PR/src/lib/object/palette/pop1_16c.c | +1 | -2 |
diff --git a/PR/src/console/main.c b/PR/src/console/main.c index de767ad..cd1b49a 100644 --- a/PR/src/console/main.c +++ b/PR/src/console/main.c @@ -230,7 +230,7 @@ int main (int argc, char **argv) { fprintf(outputStream,PR_TEXT_TASK_EXTRACT,file,dirNameDef); result=prExportDatOpt(file,dirNameDef,resFile,optionflag,dat,datAuthor,extension,format); if (result>0) { - fprintf(outputStream,PR_TEXT_EXPORT_OK,result,result); + fprintf(outputStream,PR_TEXT_EXPORT_SUCCESS,result,result); } else { fprintf(outputStream,PR_TEXT_RESULT,errors[-result],result); } diff --git a/PR/src/include/en.lang.pr.h b/PR/src/include/en.lang.pr.h index f5bc3f5..5831032 100644 --- a/PR/src/include/en.lang.pr.h +++ b/PR/src/include/en.lang.pr.h @@ -70,7 +70,7 @@ pr.h: Princed Resources : English language strings #define PR_TEXT_IMPORT_PLV_WARN "Warning: PLV file may be corrupt\n" #define PR_TEXT_EXPORT_WORKING "'%s' successfully exported\n" -#define PR_TEXT_EXPORT_OK "%d files successfully exported (%d)\n" +#define PR_TEXT_EXPORT_SUCCESS "Result: %d files successfully exported (%d)\n" #define PR_TEXT_EXPORT_ERROR "'%s' has errors, aborting...\n" #define PR_TEXT_EXPORT_BMP_WARN "Warning: Extracted file may be corrupt\n" diff --git a/PR/src/lib/actions/export.c b/PR/src/lib/actions/export.c index f68e860..d2e245f 100644 --- a/PR/src/lib/actions/export.c +++ b/PR/src/lib/actions/export.c @@ -151,14 +151,14 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti if (ok==PR_RESULT_SUCCESS) ok=writeObject(o,file,optionflag,backupExtension); else - printf("not ok. result=%d for %s\n",ok,file); + /* printf("not ok. result=%d for %s\n",ok,file);*/ /* Verbose information */ - /*if (hasFlag(verbose_flag)) { + if (hasFlag(verbose_flag)) /*{ if (ok) { fprintf(outputStream,PR_TEXT_EXPORT_WORKING,getFileNameFromPath(file)); } else { - fprintf(outputStream,PR_TEXT_EXPORT_ERROR,getFileNameFromPath(file)); +*/ fprintf(outputStream,"Error in file %s (code %d)\n"/*PR_TEXT_EXPORT_ERROR*/,getFileNameFromPath(file),ok);/* } } TODO: add warning counter */ ok=1; /* efit the for and add !fatal(ok)*/ diff --git a/PR/src/lib/compression/lzg_decompress.c b/PR/src/lib/compression/lzg_decompress.c index f377bfd..e206ef5 100644 --- a/PR/src/lib/compression/lzg_decompress.c +++ b/PR/src/lib/compression/lzg_decompress.c @@ -55,19 +55,15 @@ int expandLzg(const unsigned char* input, int inputSize, if (*outputSize) (*outputSize)+=LZG_WINDOW_SIZE; else *outputSize=65000; -printf("Entering LZG layer:\n Init:\n input: size=%d\n output: allocated size=%d\n",inputSize,(*outputSize)); - /* initialize the first 1024 bytes of the window with zeros */ for(oCursor=0;oCursor<LZG_WINDOW_SIZE;output[oCursor++]=0); /* main loop */ while (iCursor<inputSize&&oCursor<(*outputSize)) { -/*printf("i=%d o=%d\n",iCursor,oCursor);*/ maskbyte=input[iCursor++]; for (k=8;k&&(iCursor<inputSize);k--) { if (popBit(&maskbyte)) { output[oCursor++]=input[iCursor++]; /* copy input to output */ -/*printf("%02x ",output[oCursor-1]);*/ } else { /* * loc: @@ -85,7 +81,6 @@ printf("Entering LZG layer:\n Init:\n input: size=%d\n output: allocated size= while (rep--) { /* repeat pattern in output */ output[oCursor]=output[oCursor-loc]; -/*printf("%02x ",output[oCursor]);*/ oCursor++; } } @@ -96,13 +91,10 @@ printf("Entering LZG layer:\n Init:\n input: size=%d\n output: allocated size= /* ignore the first 1024 bytes */ *outputSize=oCursor-LZG_WINDOW_SIZE; *output2=(unsigned char*)malloc(*outputSize); -printf(" results:\n input: read cursor=%d input size resulted=%d\n",iCursor,inputSize); for(iCursor=LZG_WINDOW_SIZE;iCursor<oCursor;iCursor++) (*output2)[iCursor-LZG_WINDOW_SIZE]=output[iCursor]; -printf(" output: size=%d (without window=%d)\n error control: maskbyte=%01x\n",oCursor,(*outputSize),maskbyte); - - if (oCursor>=(*outputSize)) return inputSize; /* TODO: this case never happens !!! */ + if (oCursor>=(*outputSize)) return inputSize; /* TODO: check if this case never happens !!! */ return (!maskbyte)-1; /*return rep?COMPRESS_RESULT_WARNING:COMPRESS_RESULT_SUCCESS;*/ diff --git a/PR/src/lib/object/image/image256.c b/PR/src/lib/object/image/image256.c index 6ca26d8..829b9e2 100644 --- a/PR/src/lib/object/image/image256.c +++ b/PR/src/lib/object/image/image256.c @@ -258,7 +258,7 @@ int pop2decompress(const unsigned char* input, int inputSize, int verify, unsign return COMPRESS_RESULT_WARNING; } aux2= expandRleC(lineI,aux,lineO,&lineSize); - if (aux2) printf(" error: rle=%d linesize=%d of %d. size=%d r=%d.\n",aux2, lineSize,verify,tempOutputSize,tempOutputSize-aux-2); + /*if (aux2) printf(" error: rle=%d linesize=%d of %d. size=%d r=%d.\n",aux2, lineSize,verify,tempOutputSize,tempOutputSize-aux-2);*/ lineO+=lineSize; *outputSize+=lineSize; tempOutputSize-=aux; diff --git a/PR/src/lib/object/object.c b/PR/src/lib/object/object.c index fef8d4d..b26f16d 100644 --- a/PR/src/lib/object/object.c +++ b/PR/src/lib/object/object.c @@ -61,7 +61,6 @@ tObject getObject(tResource* r, int* error) { o.obj=objBinaryCreate(r->content,error); break; case eResTypePop1Palette4bits: /* save and remember palette file */ -printf("debug\n"); o.obj=objPalette_pop1_4bitsCreate(r->content,error); break; case eResTypePop2PaletteNColors: /* save and remember palette file */ diff --git a/PR/src/lib/object/palette/pop1_16c.c b/PR/src/lib/object/palette/pop1_16c.c index 800d924..6bcadcb 100644 --- a/PR/src/lib/object/palette/pop1_16c.c +++ b/PR/src/lib/object/palette/pop1_16c.c @@ -120,7 +120,7 @@ int readPalette(tPalette* p, unsigned char* data, int dataSize) { tColor c[256]; int i,bits=0; *p=createPalette(); - printf("reading a palette from data (%d)\n",dataSize); + /*printf("reading a palette from data (%d)\n",dataSize);*/ /* TODO: validate checksum */ switch (dataSize) { @@ -172,7 +172,6 @@ void* objPalette_pop1_4bitsCreate(tBinary cont, int *error) { if (cont.size!=100) { *error=PR_RESULT_XML_AND_DAT_FORMAT_DO_NOT_MATCH; -printf("yes\n"); return NULL; }