this added output to text file and proper parsing of command line arguments. this also cleaned up some more stuff.

This commit is contained in:
Marcel Nowicki
2022-02-10 23:08:59 +01:00
parent bf6f224a23
commit 0114829d5b
4 changed files with 122 additions and 54 deletions

View File

@@ -6,6 +6,7 @@
#include <fstream>
#include <map>
#include <string>
#include "tarconst.h"
#ifndef TARSTATS___TARFUNC_H
@@ -22,8 +23,15 @@ namespace tar {
// gets type of an item
std::string getitemtype(char &n);
//
// to write stats to console in default style
void consolestats (std::map<std::string, uintmax_t> &typecount, uintmax_t tarfilesize, uintmax_t sizeofall);
// to write default console output to txt file
void txtfilestats (std::map<std::string, uintmax_t> &typecount, uintmax_t tarfilesize, uintmax_t sizeofall,
std::string archiveName);
// print out helpertext
void printhelp();
}