sophuwu.site > crls
removed debug functions and updated cmake project
sophuwu sophie@sophuwu.site
Sun, 06 Aug 2023 08:11:27 +0200
commit

f732a24737823494480c92ab5620efdcbfa34839

parent

ae54976e1298176fb7cc4b2b23b40acb21677a7d

2 files changed, 3 insertions(+), 11 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -3,8 +3,4 @@ project(rls)

set(CMAKE_CXX_STANDARD 17) -include_directories(.) -add_library(termcolor INTERFACE IMPORTED) - add_executable(${CMAKE_PROJECT_NAME} main.cpp) -target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE termcolor)
M main.cppmain.cpp

@@ -126,7 +126,7 @@ else item.size = convsize(0);

files.push_back(item); } len /= i; - return len*7.5; + return len*10; } int charcmp(char a, char b) {

@@ -173,7 +173,7 @@ r.init(30);

std::string path = getpath(argc, argv); - r.print2d(path+"\n\n"); + r.print2d(path+"\n\n", path.length()); r.next(); if (!std::filesystem::exists(path) || !std::filesystem::is_directory(path)) {

@@ -185,11 +185,7 @@ std::vector<diritem> files;

std::vector<diritem> folders; int len = getdir(files, folders, path); std::vector<std::string> dirlist; - std::vector<std::string> dirlist1; - sortdir(folders, dirlist1); sortdir(folders, dirlist); - dirlist1.clear(); - sortdir(files,dirlist1); sortdir(files,dirlist); if (dirlist.size()<30) r.init(dirlist.size());

@@ -198,7 +194,7 @@ for (int i = 0; i < dirlist.size(); i++) {

r.print2d(dirlist[i], len); r.next(); } - r.print2d("\nFolders / Files / Total: " + std::to_string(folders.size()) + '/' + std::to_string(files.size()) + '/' + std::to_string(folders.size()+files.size()) + '\n'); + r.print2d("\nFolders / Files / Total: " + std::to_string(folders.size()) + '/' + std::to_string(files.size()) + '/' + std::to_string(folders.size()+files.size()) + '\n', len); return 0; }