whitespace
This commit is contained in:
@@ -8,6 +8,8 @@ using std::cout;
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
initscr(); /* Start curses mode */
|
||||||
|
|
||||||
/*Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
|
/*Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
|
||||||
Tree test2("Karamanovi");
|
Tree test2("Karamanovi");
|
||||||
|
|
||||||
@@ -55,6 +57,10 @@ int main()
|
|||||||
firstTree.printOldestAncestors(3);
|
firstTree.printOldestAncestors(3);
|
||||||
|
|
||||||
|
|
||||||
|
/* ====================================================== */
|
||||||
|
|
||||||
|
refresh(); /* Print it on to the real screen */
|
||||||
|
|
||||||
Array<Tree> trees;
|
Array<Tree> trees;
|
||||||
|
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
@@ -90,13 +96,13 @@ int main()
|
|||||||
};
|
};
|
||||||
|
|
||||||
unsigned curTree = 0, //Currently selected tree ID
|
unsigned curTree = 0, //Currently selected tree ID
|
||||||
id, secondId; //Indexes
|
id, secondId; // Person IDs
|
||||||
Tree *newTree;
|
Tree* newTree;
|
||||||
char name[128], secondName[128];
|
char name[128], secondName[128];
|
||||||
U8 day, month; //TODO add h m
|
U8 day, month; //TODO add h m
|
||||||
U16 year;
|
U16 year;
|
||||||
bool sex;
|
bool sex;
|
||||||
unsigned father, mother;
|
unsigned father, mother; // IDs
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -122,8 +128,8 @@ int main()
|
|||||||
trees[curTree].rename(name);
|
trees[curTree].rename(name);
|
||||||
break;
|
break;
|
||||||
case 2: //load
|
case 2: //load
|
||||||
cin >> input;
|
cin >> input;
|
||||||
trees.push(Tree(input));
|
trees.push(Tree(input));
|
||||||
if (!trees[trees.gNum() - 1].loadTree())
|
if (!trees[trees.gNum() - 1].loadTree())
|
||||||
std::cout << "File doesnt exist or is empty.\n\n";
|
std::cout << "File doesnt exist or is empty.\n\n";
|
||||||
break;
|
break;
|
||||||
@@ -262,5 +268,8 @@ int main()
|
|||||||
|
|
||||||
} while (!quit);
|
} while (!quit);
|
||||||
|
|
||||||
|
endwin(); /* stop ncursers */
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
struct EventTime
|
struct EventTime
|
||||||
{
|
{
|
||||||
//enum { UNKNOWN_DATE=0, UNKNOWN_TIME=1};
|
//enum { UNKNOWN_DATE=0, UNKNOWN_TIME=1};
|
||||||
static const I16 UNKNOWN_DATE = 0;
|
static const I16 UNKNOWN_DATE = 0;
|
||||||
static const I8 UNKNOWN_TIME = -1;
|
static const I8 UNKNOWN_TIME = -1;
|
||||||
/*explicit*/ EventTime(I16 Year=UNKNOWN_DATE, U8 Month=UNKNOWN_DATE, U16 Day=UNKNOWN_DATE, I8 Hour=UNKNOWN_TIME, I8 Minute=UNKNOWN_TIME);
|
/*explicit*/ EventTime(I16 Year=UNKNOWN_DATE, U8 Month=UNKNOWN_DATE, U16 Day=UNKNOWN_DATE, I8 Hour=UNKNOWN_TIME, I8 Minute=UNKNOWN_TIME);
|
||||||
void print() const;
|
void print() const;
|
||||||
|
|
||||||
I16 year; //The year in relation to Chritst's birth - 1 (AD) is the year He was born, -1 (BC) is the previous year. There is no year 0
|
I16 year; //The year in relation to Chritst's birth - 1 (AD) is the year He was born, -1 (BC) is the previous year. There is no year 0
|
||||||
U8 month;
|
U8 month;
|
||||||
U16 day;
|
U16 day;
|
||||||
I8 hour; //0-23
|
I8 hour; //0-23
|
||||||
I8 minute; //0-59
|
I8 minute; //0-59
|
||||||
|
|||||||
Reference in New Issue
Block a user