00001 
00006 
00007 
00008 
00009 #include "node.h"
00010 
00011 
00012 
00013 #ifdef TOOLBOX
00014 
00015 
00016 
00017 
00018 
00019 main(int argc, char ** argv)
00020     {
00021     bool  c_flag = FALSE;
00022     char  *comment;
00023 
00024     check_help();
00025 
00026     extern char *poptarg;
00027     int  c;
00028     char* param_string = "c:";
00029 
00030     while ((c = pgetopt(argc, argv, param_string)) != -1)
00031         switch(c)
00032             {
00033             case 'c': c_flag = TRUE;
00034                       comment = poptarg;
00035                       break;
00036             case '?': params_to_usage(cerr, argv[0], param_string);
00037                       get_help();
00038                       exit(1);
00039             }            
00040     
00041     node * root;
00042 
00043     while (root = get_node(cin))
00044         {
00045         for_all_daughters(node, root, daughter)
00046             if (daughter->is_parent())
00047                 {
00048                 if (c_flag == TRUE)
00049                     daughter->log_comment(comment);
00050                 daughter->log_history(argc, argv);
00051 
00052                 put_node(cout, *daughter);
00053                 }
00054         rmtree(root);
00055         }
00056     }
00057 
00058 #endif
00059 
00060 
00061 
00062 
00063