diff --git a/src/tft.cpp b/src/tft.cpp index d88ecaa..dfabd9f 100644 --- a/src/tft.cpp +++ b/src/tft.cpp @@ -4,6 +4,7 @@ #include /* #include */ #include +#include /* using std::string_view; */ using std::cout; @@ -13,12 +14,18 @@ int main(int argc, char* argv[]) { if(argc < 2) { - cout << "Usage: tft FILES...\n"; + cout << "Usage: tft FILE...\n"; return 0; } + if(!strcmp(argv[1], "--help")) + { + cout << "Usage: tft FILE...\n" + << "Display the family tree in each FILE\n"; + return 0; + + } init(); - for(int i = 1; i < argc; ++i) { parseTftFile(argv[i]).display(); diff --git a/src/utils.cpp b/src/utils.cpp index 74f1f9c..b748bc6 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -60,7 +60,9 @@ fd_t openOrDie(const char* path) fd_t file = open(path, O_RDONLY); if(file == -1) { + endwin(); std::cerr << "Can't open: " << path << '\n'; + std::cerr.flush(); exit(1); } return file; diff --git a/todo.txt b/todo.txt index 0852f52..fd2bb34 100644 --- a/todo.txt +++ b/todo.txt @@ -8,14 +8,19 @@ findRelation - extend Combine trees on the command line +Person info + +man page + Visualization: - zooming +- snap to selection/scroll with selection - horizontal navigation between cousins - color on different consoles - screen resize - empty tree - half children and main tree -- distincs tree regions +- distinct tree regions Compilation - static and dynamic ncurses @@ -27,9 +32,6 @@ Compilation - same person can be displayed twice - coordinate types for large trees -Backend -- move to SQLlite - Refactoring - comment style /*