print message when no files are given, rearrange code for readability

This commit is contained in:
Paul Cruz 2017-06-14 13:23:36 -07:00
parent ebd60349f5
commit 607ee9f4bc

View File

@ -674,13 +674,19 @@ int main(int argCount, const char* argv[])
} }
#endif #endif
if(operation==zom_list){ if(operation==zom_list){
unsigned u; if(filenameIdx==0){
DISPLAY("No files given\n");
CLEAN_RETURN(0);
}
DISPLAY("===========================================\n"); DISPLAY("===========================================\n");
DISPLAY("Printing information about compressed files\n"); DISPLAY("Printing information about compressed files\n");
DISPLAY("===========================================\n"); DISPLAY("===========================================\n");
DISPLAY("Number of files listed: %d\n", filenameIdx); DISPLAY("Number of files listed: %d\n", filenameIdx);
for(u=0; u<filenameIdx;u++){ {
FIO_listFile(filenameTable[u],g_displayLevel); unsigned u;
for(u=0; u<filenameIdx;u++){
FIO_listFile(filenameTable[u],g_displayLevel);
}
} }
CLEAN_RETURN(0); CLEAN_RETURN(0);
} }