author | ecalot
<ecalot> 2005-03-25 00:35:10 UTC |
committer | ecalot
<ecalot> 2005-03-25 00:35:10 UTC |
parent | ab116194f9960259d801124704c686f1a0da64b7 |
PR/src/console/filedir.c | +1 | -1 |
PR/src/console/main.c | +8 | -1 |
PR/src/include/en.lang.pr.h | +1 | -1 |
diff --git a/PR/src/console/filedir.c b/PR/src/console/filedir.c index 8f3f53f..80e5cdb 100644 --- a/PR/src/console/filedir.c +++ b/PR/src/console/filedir.c @@ -232,7 +232,7 @@ int fileDirGetFilesImport(tFileDir2* list1,tFileDir2* files,const char* resfile, free(opt); free(file); } - printf("fils=%d dirs=%d\n",fils,dirs); + if (dirs>1) { while ((file=filedir_pop(&(files->filenames)))) free(file); /* empty list */ return -20; diff --git a/PR/src/console/main.c b/PR/src/console/main.c index 0f7e3e9..e4eb11b 100644 --- a/PR/src/console/main.c +++ b/PR/src/console/main.c @@ -197,19 +197,26 @@ int main (int argc, char **argv) { /* import */ fprintf(outputStream,PR_TEXT_TASK_COMPILE,file,dirName); result=prImportDatOpt(file,dirName,resFile,optionflag,dat,extension); + if (result>0) { + fprintf(outputStream,PR_TEXT_RESULT_ERR,result,result); + } else { + fprintf(outputStream,PR_TEXT_RESULT,importErrors[-result],result); + } } else if (hasFlag(export_flag)) { /* export */ fprintf(outputStream,PR_TEXT_TASK_EXTRACT,file,dirName); result=prExportDatOpt(file,dirName,resFile,optionflag,dat,datAuthor,extension); + fprintf(outputStream,PR_TEXT_RESULT,exportErrors[-result],result); } else { /* classify */ fprintf(outputStream,PR_TEXT_TASK_CLASSIFY,file); result=prVerifyDatType(file); + fprintf(outputStream,PR_TEXT_RESULT,classifyErrors[result+2],result); } - printf("file: %s '%s' result=%d\n",file,dat,result); free(file); free(datfile); } + fprintf(outputStream,"\n"); break; default: fprintf(stderr,"Error, check the xml file\n"); diff --git a/PR/src/include/en.lang.pr.h b/PR/src/include/en.lang.pr.h index ce26a9b..92a3d64 100644 --- a/PR/src/include/en.lang.pr.h +++ b/PR/src/include/en.lang.pr.h @@ -43,7 +43,7 @@ pr.h: Princed Resources : English language strings #define PR_CGI_TEXT2 "Result: %02d type\n" #define PR_TEXT_RESULT "Result: %s (%d)\n" -#define PR_TEXT_RESULT_ERR "Result: %d files with errors\n" +#define PR_TEXT_RESULT_ERR "Result: %d files with errors (%d)\n" #define PR_TEXT_FILE_NOT_FOUND "Result: File or directory '%s' not found\n"