combine trees fix err not appearing
This commit is contained in:
+22
-6
@@ -14,22 +14,38 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
if(argc < 2)
|
||||
{
|
||||
cout << "Usage: tft FILE...\n";
|
||||
cout << "Usage: tft FILES...\n";
|
||||
return 0;
|
||||
}
|
||||
if(!strcmp(argv[1], "--help"))
|
||||
{
|
||||
cout << "Usage: tft FILE...\n"
|
||||
<< "Display the family tree in each FILE\n";
|
||||
cout << "Usage: tft FILES...\n"
|
||||
<< "Display the combined family tree in the FILES\n";
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
init();
|
||||
for(int i = 1; i < argc; ++i)
|
||||
Tree tree( parseTftFile(argv[1]) );
|
||||
/* bool negative = false; */
|
||||
|
||||
for(int i = 2; i < argc; ++i)
|
||||
{
|
||||
parseTftFile(argv[i]).display();
|
||||
tree += parseTftFile(argv[i]);
|
||||
/* if( !strcmp(argv[i], "-") ) */
|
||||
/* { */
|
||||
/* negative = true; */
|
||||
/* } */
|
||||
/* else */
|
||||
/* { */
|
||||
/* if(negative) */
|
||||
/* tree -= parseTftFile(argv[i]); */
|
||||
/* else */
|
||||
/* tree += parseTftFile(argv[i]); */
|
||||
/* } */
|
||||
}
|
||||
|
||||
init();
|
||||
tree.display();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user