local instructions

This commit is contained in:
vrd
2023-11-02 21:25:56 +02:00
parent 6a71d7e13c
commit bc5e5d1deb
11 changed files with 210 additions and 166 deletions
+4 -18
View File
@@ -2,49 +2,35 @@
#include "utils.hpp"
#include "parser.hpp"
#include <ncursesw/ncurses.h>
/* #include <string_view> */
#include <iostream>
#include <string.h>
/* using std::string_view; */
using std::cout;
/* using namespace std::literals; */
int main(int argc, char* argv[])
{
if(argc < 2)
{
cout << "Usage: tft FILES...\n";
return 0;
return 1;
}
if(!strcmp(argv[1], "--help"))
{
cout << "Usage: tft FILES...\n"
<< "Display the combined family tree in the FILES\n";
<< "Display the combined family tree from the FILES\n\n"
<< VISUALIZATION_HELP_STR;
return 0;
}
Tree tree( parseTftFile(argv[1]) );
/* bool negative = false; */
for(int i = 2; i < argc; ++i)
{
tree += parseTftFile(argv[i]);
/* if( !strcmp(argv[i], "-") ) */
/* { */
/* negative = true; */
/* } */
/* else */
/* { */
/* if(negative) */
/* tree -= parseTftFile(argv[i]); */
/* else */
/* tree += parseTftFile(argv[i]); */
/* } */
}
init();
init_ncurses();
tree.display();
return 0;