source: CMT/v1r20p20070720/source/cmt_commands.cxx

Last change on this file was 388, checked in by garonne, 17 years ago

see C.L 324

  • Property svn:eol-style set to native
File size: 59.7 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// Modified by garonne@lal.in2p3.fr
5// See the complete license in cmt_license.txt "http://www.cecill.info".
6//-----------------------------------------------------------
7
8#include "cmt_commands.h"
9#include "cmt_tag.h"
10#include "cmt_symbol.h"
11#include "cmt_project.h"
12
13ArgParser::ArgParser (CmtContext& context) : cmt(context), argc(0), argv(0), mode(Csh)
14{
15  arguments.clear ();
16
17  int i = 0;
18
19  parsers.add ("awk", i);
20  pv.push_back (&ArgParser::do_awk); i++;
21
22  parsers.add ("br", i);
23  parsers.add ("bro", i);
24  parsers.add ("broa", i);
25  parsers.add ("broad", i);
26  parsers.add ("broadc", i);
27  parsers.add ("broadca", i);
28  parsers.add ("broadcas", i);
29  parsers.add ("broadcast", i);
30  pv.push_back (&ArgParser::do_broadcast); i++;
31
32  parsers.add ("bu", i);
33  parsers.add ("bui", i);
34  parsers.add ("buil", i);
35  parsers.add ("build", i);
36  pv.push_back (&ArgParser::do_build); i++;
37
38  parsers.add ("check", i);
39  pv.push_back (&ArgParser::do_check); i++;
40
41  parsers.add ("check_f", i);
42  parsers.add ("check_fi", i);
43  parsers.add ("check_fil", i);
44  parsers.add ("check_file", i);
45  parsers.add ("check_files", i);
46  pv.push_back (&ArgParser::do_check_files); i++;
47
48  parsers.add ("co", i);
49  parsers.add ("checkout", i);
50  pv.push_back (&ArgParser::do_checkout); i++;
51
52  parsers.add ("cl", i);
53  parsers.add ("cle", i);
54  parsers.add ("clea", i);
55  parsers.add ("clean", i);
56  parsers.add ("cleanu", i);
57  parsers.add ("cleanup", i);
58  pv.push_back (&ArgParser::do_cleanup); i++;
59
60  parsers.add ("con", i);
61  parsers.add ("conf", i);
62  parsers.add ("confi", i);
63  parsers.add ("config", i);
64  pv.push_back (&ArgParser::do_config); i++;
65
66  parsers.add ("create", i);
67  pv.push_back (&ArgParser::do_create); i++;
68
69  parsers.add ("create_project", i);
70  pv.push_back (&ArgParser::do_create_project); i++;
71
72  parsers.add ("cvsb", i);
73  parsers.add ("cvsbr", i);
74  parsers.add ("cvsbra", i);
75  parsers.add ("cvsbran", i);
76  parsers.add ("cvsbranc", i);
77  parsers.add ("cvsbranch", i);
78  parsers.add ("cvsbranche", i);
79  parsers.add ("cvsbranches", i);
80  pv.push_back (&ArgParser::do_cvsbranches); i++;
81
82  parsers.add ("cvssubpa", i);
83  parsers.add ("cvssubpac", i);
84  parsers.add ("cvssubpack", i);
85  parsers.add ("cvssubpacka", i);
86  parsers.add ("cvssubpackag", i);
87  parsers.add ("cvssubpackage", i);
88  parsers.add ("cvssubpackages", i);
89  pv.push_back (&ArgParser::do_cvssubpackages); i++;
90
91  parsers.add ("cvssubpr", i);
92  parsers.add ("cvssubpro", i);
93  parsers.add ("cvssubproj", i);
94  parsers.add ("cvssubproje", i);
95  parsers.add ("cvssubprojec", i);
96  parsers.add ("cvssubproject", i);
97  parsers.add ("cvssubprojects", i);
98  pv.push_back (&ArgParser::do_cvssubprojects); i++;
99
100  parsers.add ("cvst", i);
101  parsers.add ("cvsta", i);
102  parsers.add ("cvstag", i);
103  parsers.add ("cvstags", i);
104  pv.push_back (&ArgParser::do_cvstags); i++;
105
106  parsers.add ("d", i);
107  parsers.add ("do", i);
108  pv.push_back (&ArgParser::do_do); i++;
109
110  parsers.add ("e", i);
111  parsers.add ("ex", i);
112  parsers.add ("exp", i);
113  parsers.add ("expa", i);
114  parsers.add ("expan", i);
115  parsers.add ("expand", i);
116  pv.push_back (&ArgParser::do_expand); i++;
117
118  parsers.add ("f", i);
119  parsers.add ("fi", i);
120  parsers.add ("fil", i);
121  parsers.add ("filt", i);
122  parsers.add ("filte", i);
123  parsers.add ("filter", i);
124  pv.push_back (&ArgParser::do_filter); i++;
125
126  parsers.add ("h", i);
127  parsers.add ("he", i);
128  parsers.add ("hel", i);
129  parsers.add ("help", i);
130  pv.push_back (&ArgParser::do_help); i++;
131
132  parsers.add ("l", i);
133  parsers.add ("lo", i);
134  parsers.add ("loc", i);
135  parsers.add ("lock", i);
136  pv.push_back (&ArgParser::do_lock); i++;
137
138  parsers.add ("rel", i);
139  parsers.add ("relo", i);
140  parsers.add ("reloc", i);
141  parsers.add ("reloca", i);
142  parsers.add ("relocat", i);
143  parsers.add ("relocate", i);
144  pv.push_back (&ArgParser::do_relocate); i++;
145
146  parsers.add ("rem", i);
147  parsers.add ("remo", i);
148  parsers.add ("remov", i);
149  parsers.add ("remove", i);
150  pv.push_back (&ArgParser::do_remove); i++;
151
152  parsers.add ("run", i);
153  pv.push_back (&ArgParser::do_run); i++;
154
155  parsers.add ("run_sequence", i);
156  pv.push_back (&ArgParser::do_run_sequence); i++;
157
158  parsers.add ("set", i);
159  pv.push_back (&ArgParser::do_set); i++;
160
161  parsers.add ("setup", i);
162  pv.push_back (&ArgParser::do_setup); i++;
163
164  parsers.add ("sh", i);
165  parsers.add ("sho", i);
166  parsers.add ("show", i);
167  pv.push_back (&ArgParser::do_show); i++;
168
169  parsers.add ("sy", i);
170  parsers.add ("sys", i);
171  parsers.add ("syst", i);
172  parsers.add ("syste", i);
173  parsers.add ("system", i);
174  pv.push_back (&ArgParser::do_system); i++;
175
176  parsers.add ("u", i);
177  parsers.add ("un", i);
178  parsers.add ("unl", i);
179  parsers.add ("unlo", i);
180  parsers.add ("unloc", i);
181  parsers.add ("unlock", i);
182  pv.push_back (&ArgParser::do_unlock); i++;
183
184  parsers.add ("v", i);
185  parsers.add ("ve", i);
186  parsers.add ("ver", i);
187  parsers.add ("vers", i);
188  parsers.add ("versi", i);
189  parsers.add ("versio", i);
190  parsers.add ("version", i);
191  parsers.add ("--version", i);
192  pv.push_back (&ArgParser::do_version); i++;
193
194  parsers.add ("-b", i);
195  parsers.add ("-ba", i);
196  parsers.add ("-bat", i);
197  pv.push_back (&ArgParser::option_bat); i++;
198
199  parsers.add ("-c", i);
200  parsers.add ("-cs", i);
201  parsers.add ("-csh", i);
202  pv.push_back (&ArgParser::option_csh); i++;
203
204  parsers.add ("-d", i);
205  parsers.add ("-di", i);
206  parsers.add ("-dis", i);
207  parsers.add ("-disa", i);
208  parsers.add ("-disab", i);
209  parsers.add ("-disabl", i);
210  parsers.add ("-disable", i);
211  parsers.add ("-disable_", i);
212  parsers.add ("-disable_w", i);
213  parsers.add ("-disable_wa", i);
214  parsers.add ("-disable_war", i);
215  parsers.add ("-disable_warn", i);
216  parsers.add ("-disable_warni", i);
217  parsers.add ("-disable_warnin", i);
218  parsers.add ("-disable_warning", i);
219  parsers.add ("-disable_warnings", i);
220  pv.push_back (&ArgParser::option_disable_warnings); i++;
221//Cmt::get_quiet ()
222
223  parsers.add ("-e", i);
224  pv.push_back (&ArgParser::option_e); i++;
225
226  parsers.add ("-f", i);
227  pv.push_back (&ArgParser::option_f); i++;
228
229  parsers.add ("-h", i);
230  parsers.add ("-he", i);
231  parsers.add ("-hel", i);
232  parsers.add ("-help", i);
233  parsers.add ("--h", i);
234  parsers.add ("--he", i);
235  parsers.add ("--hel", i);
236  parsers.add ("--help", i);
237  pv.push_back (&ArgParser::option_help); i++;
238
239  parsers.add ("-ho", i);
240  parsers.add ("-hom", i);
241  parsers.add ("-home", i);
242  pv.push_back (&ArgParser::option_home); i++;
243
244  parsers.add ("-n", i);
245  pv.push_back (&ArgParser::option_n); i++;
246
247  parsers.add ("-no_c", i);
248  parsers.add ("-no_cl", i);
249  parsers.add ("-no_cle", i);
250  parsers.add ("-no_clea", i);
251  parsers.add ("-no_clean", i);
252  parsers.add ("-no_cleanu", i);
253  parsers.add ("-no_cleanup", i);
254  pv.push_back (&ArgParser::option_no_cleanup); i++;
255
256  parsers.add ("-pac", i);
257  parsers.add ("-pack", i);
258  pv.push_back (&ArgParser::option_pack); i++;
259
260  parsers.add ("-pat", i);
261  parsers.add ("-path", i);
262  pv.push_back (&ArgParser::option_path); i++;
263
264  parsers.add ("-pr", i);
265  parsers.add ("-pri", i);
266  parsers.add ("-priv", i);
267  parsers.add ("-priva", i);
268  parsers.add ("-privat", i);
269  parsers.add ("-private", i);
270  pv.push_back (&ArgParser::option_private); i++;
271
272  parsers.add ("-pu", i);
273  parsers.add ("-pub", i);
274  parsers.add ("-publ", i);
275  parsers.add ("-publi", i);
276  parsers.add ("-public", i);
277  pv.push_back (&ArgParser::option_public); i++;
278
279  parsers.add ("-s", i);
280  parsers.add ("-sh", i);
281  pv.push_back (&ArgParser::option_sh); i++;
282
283  parsers.add ("-q", i);
284  parsers.add ("-qu", i);
285  parsers.add ("-qui", i);
286  parsers.add ("-quie", i);
287  parsers.add ("-quiet", i);
288  pv.push_back (&ArgParser::option_quiet); i++;
289
290  parsers.add ("-tag", i);
291  pv.push_back (&ArgParser::option_tag); i++;
292
293  parsers.add ("-tag_add", i);
294  pv.push_back (&ArgParser::option_tag_add); i++;
295
296  parsers.add ("-tag_remove", i);
297  pv.push_back (&ArgParser::option_tag_remove); i++;
298
299  parsers.add ("-u", i);
300  parsers.add ("-us", i);
301  parsers.add ("-use", i);
302  pv.push_back (&ArgParser::option_use); i++;
303
304  parsers.add ("-user", i);
305  parsers.add ("-user_", i);
306  parsers.add ("-user_c", i);
307  parsers.add ("-user_co", i);
308  parsers.add ("-user_con", i);
309  parsers.add ("-user_cont", i);
310  parsers.add ("-user_conte", i);
311  parsers.add ("-user_contex", i);
312  parsers.add ("-user_context", i);
313  pv.push_back (&ArgParser::option_user_context); i++;
314
315  parsers.add ("-v", i);
316  parsers.add ("-ve", i);
317  parsers.add ("-ver", i);
318  parsers.add ("-vers", i);
319  parsers.add ("-versi", i);
320  parsers.add ("-versio", i);
321  parsers.add ("-version", i);
322  pv.push_back (&ArgParser::option_version); i++;
323
324  parsers.add ("-warn", i);
325  parsers.add ("-warni", i);
326  parsers.add ("-warnin", i);
327  parsers.add ("-warning", i);
328  parsers.add ("-warnings", i);
329  pv.push_back (&ArgParser::option_warnings); i++;
330
331  parsers.add ("-with_v", i);
332  parsers.add ("-with_ve", i);
333  parsers.add ("-with_ver", i);
334  parsers.add ("-with_vers", i);
335  parsers.add ("-with_versi", i);
336  parsers.add ("-with_versio", i);
337  parsers.add ("-with_version", i);
338  parsers.add ("-with_version_", i);
339  parsers.add ("-with_version_d", i);
340  parsers.add ("-with_version_di", i);
341  parsers.add ("-with_version_dir", i);
342  parsers.add ("-with_version_dire", i);
343  parsers.add ("-with_version_direc", i);
344  parsers.add ("-with_version_direct", i);
345  parsers.add ("-with_version_directo", i);
346  parsers.add ("-with_version_director", i);
347  parsers.add ("-with_version_directory", i);
348  pv.push_back (&ArgParser::option_with_version_directory); i++;
349
350  parsers.add ("-without_v", i);
351  parsers.add ("-without_ve", i);
352  parsers.add ("-without_ver", i);
353  parsers.add ("-without_vers", i);
354  parsers.add ("-without_versi", i);
355  parsers.add ("-without_versio", i);
356  parsers.add ("-without_version", i);
357  parsers.add ("-without_version_", i);
358  parsers.add ("-without_version_d", i);
359  parsers.add ("-without_version_di", i);
360  parsers.add ("-without_version_dir", i);
361  parsers.add ("-without_version_dire", i);
362  parsers.add ("-without_version_direc", i);
363  parsers.add ("-without_version_direct", i);
364  parsers.add ("-without_version_directo", i);
365  parsers.add ("-without_version_director", i);
366  parsers.add ("-without_version_directory", i);
367  pv.push_back (&ArgParser::option_without_version_directory); i++;
368
369}
370
371void ArgParser::shift ()
372{
373  if (argc > 0)
374    {
375      argc--;
376      argv++;
377    }
378}
379
380void ArgParser::unshift ()
381{
382  argc++;
383  argv--;
384}
385
386void ArgParser::fill_arguments ()
387{
388  while (argc > 0)
389    {
390      cmt_string& s = arguments.add ();
391      s = argv[0];
392
393      //cerr << "Getting arg[" << s << "] " << endl;
394
395      shift ();
396    } 
397}
398
399cmt_string& ArgParser::fill_one_argument ()
400{
401  if (argc > 0)
402    {
403      cmt_string& s = arguments.add ();
404      s = argv[0];
405
406      //cerr << "Getting arg[" << s << "] " << endl;
407
408      shift ();
409
410      return (s);
411    }
412  else
413    {
414      static cmt_string empty = "";
415      return (empty);
416    }
417}
418
419cmt_string& ArgParser::fill_one_argument_filtered ()
420{
421  if (argc > 0)
422    {
423      cmt_string& s = arguments.add ();
424      s = argv[0];
425
426      if (s[0] == '-')
427        {
428          s = "";
429        }
430
431      //cerr << "Getting arg[" << s << "] " << endl;
432
433      shift ();
434
435      return (s);
436    }
437  else
438    {
439      static cmt_string empty = "";
440      return (empty);
441    }
442}
443
444void ArgParser::parse ()
445{
446  ArgParser& me = *this;
447
448  help_action = action_none;
449  arguments.clear ();
450  extra_line.erase (0);
451  extra_file.erase (0);
452  mode = Csh;
453
454  /// Skip first argument ("cmt")
455  shift ();
456
457  cmt.m_action = action_none;
458
459  while (argc > 0)
460    {
461      arg = argv[0];
462
463      shift ();
464
465      /// Suppress trailing carriage-return
466      int cr = arg.find ('\r');
467      if (cr != cmt_string::npos) arg.erase (cr);
468
469      /// Suppress enclosing quotes
470      if ((arg[0] == '\"') && (arg[arg.size () - 1] == '\"'))
471        {
472          arg.erase (0, 1);
473          arg.erase (arg.size () - 1, 1);
474        }
475
476      /// Detect and split arguments of the form a=b
477      /// left and right part of this argument
478      cmt_string reduced_arg = arg;
479      int pos = reduced_arg.find ('=');
480      if (pos != cmt_string::npos)
481        {
482          reduced_arg.erase (pos);
483          arg.erase (0, pos+1);
484        }
485      else
486        {
487          arg = "";
488        }
489
490      // cerr << "argc=" << argc << " reduced_arg=[" << reduced_arg << "] arg=[" << arg << "]" << endl;
491
492      if (parsers.has (reduced_arg))
493        {
494          // This argument corresponds to a known command
495
496          int i = (*parsers.find (reduced_arg));
497
498          parser p = pv[i];
499          (me.*p) ();
500        }
501      else if (cmt.m_action != action_none)
502        {
503          // We have unexpected arguments (not handled by the command handler). This may sign
504          // an unprotected handler implementation.
505          if (!cmt.m_quiet) cerr << "#CMT> warning : unexpected parameter " << reduced_arg << endl;
506        }
507      else
508        {
509          // This argument does not correspond to a known command. We expect then an action
510          // to be executed with that name
511
512          unshift ();
513          do_do ();
514
515          /*
516              if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad command parameter " << arg << endl;
517              help_action = action_none;
518          */
519        }
520    }
521}
522
523void ArgParser::do_awk ()
524{
525  fill_arguments ();
526  cmt.m_action = action_awk;
527}
528
529void ArgParser::do_broadcast ()
530{
531  fill_arguments ();
532  cmt.m_action = action_broadcast;
533 
534  if (cmt.m_scope_filtering_mode == default_filtering_mode)
535    {
536      cmt.m_scope_filtering_mode = reach_private_uses;
537    }
538}
539
540void ArgParser::do_build ()
541{
542  if (argc > 0)
543    {
544      arg = argv[0];
545
546      if (arg == "-nmake")
547        {
548          cmt.m_build_nmake = true;
549          shift ();
550        }
551    }
552
553  if (argc > 0)
554    {
555      arg = argv[0];
556
557      shift ();
558
559      if (arg == "constituent_makefile")
560        {
561          if (argc > 0)
562            {
563              fill_one_argument ();
564              cmt.m_action = action_build_constituent_makefile;
565            }
566          else
567            {
568              if (!cmt.m_quiet) cerr << "#CMT> syntax error : constituent name missing" << endl;
569              cmt.m_action = action_build_constituent_makefile;
570              help_action = action_help;
571            }
572        }
573      else if (arg == "constituents_makefile")
574        {
575          fill_arguments ();
576          cmt.m_action = action_build_constituents_makefile;
577        }
578      else if (arg == "dependencies")
579        {
580          if (argc > 0)
581            {
582              fill_arguments ();
583              cmt.m_action = action_build_dependencies;
584            }
585          else
586            {
587              if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing " << endl;
588              help_action = action_help;
589              cmt.m_action = action_build_dependencies;
590            }
591        }
592      else if (arg == "library_links")
593        {
594          cmt.m_action = action_build_library_links;
595        }
596      else if (arg == "make_setup")
597        {
598          cmt.m_action = action_build_make_setup;
599        }
600      else if (arg == "msdev")
601        {
602          if (argc > 0)
603            {
604              fill_one_argument_filtered ();
605            }
606
607          cmt.m_action = action_build_msdev;
608        }
609      else if (arg == "CMT_pacman")
610        {
611          cmt.m_action = action_build_CMT_pacman;
612        }
613      else if (arg == "vsnet") 
614        {
615          if (argc > 0)
616            {
617              fill_one_argument_filtered ();
618            }
619                                                                   
620          cmt.m_action = action_build_vsnet;                 
621        }                                             
622      else if (arg == "os9_makefile")
623        {
624          if (argc > 0)
625            {
626              fill_one_argument ();
627              cmt.m_action = action_build_os9_makefile;
628            }
629          else
630            {
631              if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing " << endl;
632              help_action = action_help;
633              cmt.m_action = action_build_os9_makefile;
634            }
635        }
636      else if (arg == "prototype")
637        {
638          if (argc > 0)
639            {
640              fill_one_argument ();
641              cmt.m_action = action_build_prototype;
642            }
643          else
644            {
645              if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing" << endl;
646              help_action = action_help;
647              cmt.m_action = action_build_prototype;
648            }
649        }
650      else if (arg == "readme")
651        {
652          cmt.m_action = action_build_readme;
653
654          fill_arguments ();
655        }
656      else if (arg == "tag_makefile")
657        {
658          cmt.m_action = action_build_tag_makefile;
659        }
660      else if (arg == "temporary_name")
661        {
662          cmt.m_action = action_build_temporary_name;
663        }
664      else if (arg == "triggers")
665        {
666          if (argc > 0)
667            {
668              fill_one_argument ();
669              cmt.m_action = action_build_triggers;
670            }
671          else
672            {
673              if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing" << endl;
674              help_action = action_help;
675              cmt.m_action = action_build_triggers;
676            }
677        }
678      else if (arg == "windefs")
679        {
680          if (argc > 0)
681            {
682              fill_one_argument ();
683              cmt.m_action = action_build_windefs;
684            }
685          else
686            {
687              if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing" << endl;
688              help_action = action_help;
689              cmt.m_action = action_build_windefs;
690            }
691        }
692      else
693        {
694          if (!cmt.m_quiet) cerr << "#CMT> syntax error : wrong build argument" << endl;
695          help_action = action_help;
696          cmt.m_action = action_build;
697        }
698    }
699  else
700    {
701      if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to build" << endl;
702      help_action = action_help;
703      cmt.m_action = action_build;
704    }
705}
706
707void ArgParser::do_check ()
708{
709  if (argc > 0)
710    {
711      arg = argv[0];
712
713      shift ();
714
715      if (arg == "configuration")
716        {
717          cmt.m_action = action_check_configuration;
718          //cmt.m_warnings = true;
719        }
720      else if (arg == "files")
721        {
722          if (argc > 0)
723            {
724              fill_one_argument ();
725              if (argc > 0)
726                {
727                  fill_one_argument ();
728                  cmt.m_action = action_check_files;
729                }
730              else
731                {
732                  if (!cmt.m_quiet) cerr << "#CMT> syntax error : reference file name missing" 
733                                         << endl;
734                  help_action = action_help;
735                  cmt.m_action = action_check_files;
736                }
737            }
738          else
739            {
740              if (!cmt.m_quiet) cerr << "#CMT> syntax error : file name missing" << endl;
741              help_action = action_help;
742              cmt.m_action = action_check_files;
743            }
744        }
745      else if (arg == "version")
746        {
747          if (argc > 0)
748            {
749              fill_one_argument ();
750              cmt.m_action = action_check_version;
751            }
752          else
753            {
754              if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
755              help_action = action_help;
756              cmt.m_action = action_check_version;
757            }
758        }
759      else
760        {
761          if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad check option" << endl;
762          help_action = action_help;
763          cmt.m_action = action_check;
764        }
765    }
766  else
767    {
768      if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to check" << endl;
769      help_action = action_help;
770      cmt.m_action = action_check;
771    }
772}
773
774void ArgParser::do_check_files ()
775{
776  if (argc > 0)
777    {
778      fill_one_argument ();
779      if (argc > 0)
780        {
781          fill_one_argument ();
782          cmt.m_action = action_check_files;
783        }
784      else
785        {
786          if (!cmt.m_quiet) cerr << "#CMT> syntax error : reference file missing" << endl;
787          help_action = action_help;
788          cmt.m_action = action_check_files;
789        }
790    }
791  else
792    {
793      if (!cmt.m_quiet) cerr << "#CMT> syntax error : file name missing" << endl;
794      help_action = action_help;
795      cmt.m_action = action_check_files;
796    }
797}
798
799void ArgParser::do_checkout ()
800{
801  if (argc > 0)
802    {
803      fill_arguments ();
804      cmt.m_action = action_checkout;
805    }
806  else
807    {
808      if (!cmt.m_quiet) cerr << "#CMT> syntax error : checkout arguments missing" << endl;
809      help_action = action_help;
810      cmt.m_action = action_checkout;
811    }
812}
813
814void ArgParser::do_cleanup ()
815{
816  cmt.m_action = action_cleanup;
817}
818
819void ArgParser::do_config ()
820{
821  cmt.m_action = action_config;
822}
823
824void ArgParser::do_create ()
825{
826  if (argc > 0)
827    {
828      fill_arguments ();
829      cmt.m_action = action_create;
830    }
831  else
832    {
833      if (!cmt.m_quiet) cerr << "#CMT> syntax error : create arguments missing" << endl;
834      help_action = action_help;
835      cmt.m_action = action_create;
836    }
837}
838
839void ArgParser::do_create_project ()
840{
841  if (argc > 0)
842    {
843      fill_arguments ();
844      cmt.m_action = action_create_project;
845    }
846  else
847    {
848      if (!cmt.m_quiet) cerr << "#CMT> syntax error : create_project arguments missing" << endl;
849      help_action = action_help;
850      cmt.m_action = action_create_project;
851    }
852}
853
854void ArgParser::do_cvsbranches ()
855{
856  if (argc > 0)
857    {
858      fill_one_argument ();
859      cmt.m_action = action_cvsbranches;
860    }
861  else
862    {
863      if (!cmt.m_quiet) cerr << "#CMT> syntax error : cvsbranches arguments missing" << endl;
864      help_action = action_help;
865      cmt.m_action = action_cvsbranches;
866    }
867}
868
869void ArgParser::do_cvssubpackages ()
870{
871  if (argc > 0)
872    {
873      fill_one_argument ();
874    }
875
876  cmt.m_action = action_cvssubpackages;
877}
878
879void ArgParser::do_cvssubprojects ()
880{
881  if (argc > 0)
882    {
883      fill_one_argument ();
884    }
885
886  cmt.m_action = action_cvssubprojects;
887}
888
889void ArgParser::do_cvstags ()
890{
891  if (argc > 0)
892    {
893      fill_arguments ();
894      cmt.m_action = action_cvstags;
895    }
896  else
897    {
898      if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
899      help_action = action_help;
900      cmt.m_action = action_cvstags;
901    }
902}
903
904void ArgParser::do_do ()
905{
906  if (argc > 0)
907    {
908      fill_arguments ();
909                 
910      {
911        cmt_string tag_name = "target_";
912        tag_name += arguments[0];
913
914        Tag* tag;
915        tag = Tag::add (tag_name, PriorityUserTag, "action", 0);                     
916        tag->mark ();
917      }
918
919      cmt.m_action = action_do;
920    }
921  else
922    {
923      if (!cmt.m_quiet) cerr << "#CMT> syntax error : action not specified" << endl;
924      help_action = action_help;
925      cmt.m_action = action_do;
926    }
927}
928
929void ArgParser::do_expand ()
930{
931  if (argc > 0)
932    {
933      arg = argv[0];
934
935      shift ();
936      if (arg == "model")
937        {
938          if (argc > 0)
939            {
940              fill_arguments ();
941              cmt.m_action = action_expand_model;
942            }
943          else
944            {
945              if (!cmt.m_quiet) cerr << "#CMT> syntax error : model not specified" << endl;
946              help_action = action_help;
947              cmt.m_action = action_expand_model;
948            }
949        }
950      else
951        {
952          if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad expand option" << endl;
953          help_action = action_help;
954          cmt.m_action = action_expand_model;
955        }
956    }
957  else
958    {
959      if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to expand" << endl;
960      help_action = action_help;
961      cmt.m_action = action_expand_model;
962    }
963}
964
965void ArgParser::do_filter ()
966{
967  if (argc > 0)
968    {
969      fill_arguments ();
970      cmt.m_action = action_filter;
971    }
972  else
973    {
974      if (!cmt.m_quiet) cerr << "#CMT> syntax error : file to filter not specified" << endl;
975      help_action = action_help;
976      cmt.m_action = action_filter;
977    }
978}
979
980void ArgParser::do_help ()
981{
982  help_action = action_help;
983}
984
985void ArgParser::do_lock ()
986{
987  if (argc > 0)
988    {
989      cmt.m_current_package = fill_one_argument ();
990      cmt.m_current_version.erase (0);
991      cmt.m_current_path.erase (0);
992
993      if (argc > 0)
994        {
995          cmt.m_current_version = fill_one_argument ();
996          cmt.m_action = action_lock;
997
998          if (argc > 0)
999            {
1000              cmt.m_current_path = fill_one_argument_filtered ();
1001            }
1002
1003          cmt.m_current_access = UserMode;
1004          (Use::current()).set (cmt.m_current_package, 
1005                                cmt.m_current_version, 
1006                                cmt.m_current_path);
1007
1008        }
1009      else
1010        {
1011          if (!cmt.m_quiet) cerr << "#CMT> syntax error : version missing" << endl;
1012          help_action = action_help;
1013          cmt.m_action = action_lock;
1014        }
1015    }
1016  else
1017    {
1018      cmt.m_action = action_lock;
1019    }
1020}
1021
1022
1023void ArgParser::do_relocate ()
1024{
1025  cmt.m_action = action_relocate;
1026}
1027
1028
1029void ArgParser::do_remove ()
1030{
1031  if (argc > 0)
1032    {
1033      arg = argv[0];
1034
1035      if (arg == "library_links")
1036        {
1037          shift ();
1038          cmt.m_action = action_remove_library_links;
1039        }
1040      else
1041        {
1042          cmt.m_current_package = fill_one_argument ();
1043          cmt.m_current_version.erase (0);
1044          cmt.m_current_path.erase (0);
1045                     
1046          if (argc > 0)
1047            {
1048              cmt.m_current_version = fill_one_argument ();
1049
1050              if (argc > 0)
1051                {
1052                  cmt.m_current_path = fill_one_argument_filtered ();
1053                }
1054                           
1055              cmt.m_action = action_remove;
1056            }
1057          else
1058            {
1059              if (!cmt.m_quiet) cerr << "#CMT> syntax error : version missing" << endl;
1060              help_action = action_help;
1061              cmt.m_action = action_remove;
1062            }
1063        }
1064    }
1065  else
1066    {
1067      if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to remove" << endl;
1068      help_action = action_help;
1069      cmt.m_action = action_remove;
1070    }
1071}
1072
1073void ArgParser::do_run ()
1074{
1075  if (argc > 0)
1076    {
1077      fill_arguments ();
1078      cmt.m_action = action_run;
1079    }
1080  else
1081    {
1082      if (!cmt.m_quiet) cerr << "#CMT> syntax error : run arguments missing" << endl;
1083      help_action = action_help;
1084      cmt.m_action = action_run;
1085    }
1086}
1087
1088void ArgParser::do_run_sequence ()
1089{
1090  if (argc > 0)
1091    {
1092      fill_one_argument ();
1093      cmt.m_action = action_run_sequence;
1094    }
1095  else
1096    {
1097      if (!cmt.m_quiet) cerr << "#CMT> syntax error : run_sequence arguments missing" << endl;
1098      help_action = action_help;
1099      cmt.m_action = action_run_sequence;
1100    }
1101}
1102
1103void ArgParser::do_set ()
1104{
1105  if (argc > 0)
1106    {
1107      arg = argv[0];
1108
1109      shift ();
1110
1111      if (arg == "version")
1112        {
1113          fill_arguments ();
1114          cmt.m_action = action_set_version;
1115        }
1116      else if (arg == "versions")
1117        {
1118          fill_arguments ();
1119
1120          cmt.m_action = action_set_versions;
1121
1122          if (cmt.m_scope_filtering_mode == default_filtering_mode)
1123            {
1124              cmt.m_scope_filtering_mode = reach_private_uses;
1125            }
1126        }
1127      else
1128        {
1129          if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad set argument" << endl;
1130          help_action = action_help;
1131          //cmt.m_action = action_set;
1132        }
1133    }
1134  else
1135    {
1136      if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to set" << endl;
1137      help_action = action_help;
1138      //cmt.m_action = action_set;
1139    }
1140}
1141
1142void ArgParser::do_setup ()
1143{
1144  cmt.m_action = action_setup;
1145  //cmt.m_warnings = true;
1146}
1147
1148void ArgParser::do_show ()
1149{
1150  if (argc > 0)
1151    {
1152      arg = argv[0];
1153
1154      //cerr << "Running show arg=" << arg << endl;
1155
1156      shift ();
1157
1158      if (arg == "action")
1159        {
1160          if (argc > 0)
1161            {
1162              cmt.m_current_target = fill_one_argument ();
1163              cmt.m_action = action_show_action;
1164            }
1165          else
1166            {
1167              if (!cmt.m_quiet) cerr << "#CMT> syntax error : action name missing" << endl;
1168              help_action = action_help;
1169              cmt.m_action = action_show_action;
1170            }
1171        }
1172      else if (arg == "action_names")
1173        {
1174          if (argc > 0)
1175            {
1176              fill_one_argument ();
1177            }
1178
1179          cmt.m_action = action_show_action_names;
1180        }
1181      else if (arg == "action_value")
1182        {
1183          cmt.m_quiet = true;
1184          if (argc > 0)
1185            {
1186              cmt.m_current_target = fill_one_argument ();
1187              cmt.m_action = action_show_action_value;
1188            }
1189          else
1190            {
1191              if (!cmt.m_quiet) cerr << "#CMT> syntax error : action name missing" << endl;
1192              help_action = action_help;
1193              cmt.m_action = action_show_action_value;
1194            }
1195        }
1196      else if (arg == "actions")
1197        {
1198          if (argc > 0)
1199            {
1200              fill_one_argument ();
1201            }
1202
1203          cmt.m_action = action_show_actions;
1204        }
1205      else if (arg == "all_tags")
1206        {
1207          cmt.m_action = action_show_all_tags;
1208        }
1209      else if (arg == "applied_patterns")
1210        {
1211          cmt.m_action = action_show_applied_patterns;
1212        }
1213      else if (arg == "author")
1214        {
1215          cmt.m_action = action_show_author;
1216        }
1217      else if (arg == "branches")
1218        {
1219          cmt.m_action = action_show_branches;
1220        }
1221      else if (arg == "clients")
1222        {
1223          if (argc > 0)
1224            {
1225              cmt.m_current_target = fill_one_argument ();
1226
1227              cmt.m_action = action_show_clients;
1228
1229              if (argc > 0)
1230                {
1231                  fill_one_argument ();
1232                  if (argc > 0)
1233                    {
1234                      fill_one_argument ();
1235                    }
1236                }
1237            }
1238          else
1239            {
1240              if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
1241              help_action = action_help;
1242              cmt.m_action = action_show_clients;
1243            }
1244        }
1245      else if (arg == "cmtpath_patterns")
1246        {
1247          cmt.m_action = action_show_cmtpath_patterns;
1248        }
1249      else if (arg == "constituent")
1250        {
1251          if (argc > 0)
1252            {
1253              cmt.m_current_target = fill_one_argument ();
1254              cmt.m_action = action_show_constituent;
1255            }
1256          else
1257            {
1258              if (!cmt.m_quiet) cerr << "#CMT> syntax error : constituent name missing" << endl;
1259              help_action = action_help;
1260              cmt.m_action = action_show_constituent;
1261            }
1262        }
1263      else if (arg == "constituent_names")
1264        {
1265          cmt.m_action = action_show_constituent_names;
1266        }
1267      else if (arg == "constituents")
1268        {
1269          cmt.m_action = action_show_constituents;
1270        }
1271      else if (arg == "cycles")
1272        {
1273          cmt.m_action = action_show_cycles;
1274        }
1275      else if (arg == "fragment")
1276        {
1277          if (argc > 0)
1278            {
1279              cmt.m_current_target = fill_one_argument ();
1280              cmt.m_action = action_show_fragment;
1281            }
1282          else
1283            {
1284              if (!cmt.m_quiet) cerr << "#CMT> syntax error : fragment name missing" << endl;
1285              help_action = action_help;
1286              cmt.m_action = action_show_fragment;
1287            }
1288        }
1289      else if (arg == "fragments")
1290        {
1291          cmt.m_action = action_show_fragments;
1292        }
1293      else if (arg == "groups")
1294        {
1295          cmt.m_action = action_show_groups;
1296        }
1297      else if (arg == "include_dirs")
1298        {
1299          cmt.m_action = action_show_include_dirs;
1300        }
1301      else if (arg == "language")
1302        {
1303          if (argc > 0)
1304            {
1305              cmt.m_current_target = fill_one_argument ();
1306              cmt.m_action = action_show_language;
1307            }
1308          else
1309            {
1310              if (!cmt.m_quiet) cerr << "#CMT> syntax error : language name missing" << endl;
1311              help_action = action_help;
1312              cmt.m_action = action_show_language;
1313            }
1314        }
1315      else if (arg == "languages")
1316        {
1317          cmt.m_action = action_show_languages;
1318        }
1319      else if (arg == "macro")
1320        {
1321          if (argc > 0)
1322            {
1323              cmt.m_current_target = fill_one_argument ();
1324              cmt.m_action = action_show_macro;
1325            }
1326          else
1327            {
1328              if (!cmt.m_quiet) cerr << "#CMT> syntax error : macro name missing" << endl;
1329              help_action = action_help;
1330              cmt.m_action = action_show_macro;
1331            }
1332        }
1333      else if (arg == "macro_names")
1334        {
1335          if (argc > 0)
1336            {
1337              fill_one_argument ();
1338            }
1339
1340          cmt.m_action = action_show_macro_names;
1341        }
1342      else if (arg == "macro_value")
1343        {
1344          cmt.m_quiet = true;
1345          if (argc > 0)
1346            {
1347              cmt.m_current_target = fill_one_argument ();
1348              cmt.m_action = action_show_macro_value;
1349            }
1350          else
1351            {
1352              if (!cmt.m_quiet) cerr << "#CMT> syntax error : macro name missing" << endl;
1353              help_action = action_help;
1354              cmt.m_action = action_show_macro_value;
1355            }
1356        }
1357      else if (arg == "macros")
1358        {
1359          if (argc > 0)
1360            {
1361              fill_one_argument ();
1362            }
1363
1364          cmt.m_action = action_show_macros;
1365        }
1366      else if (arg == "manager")
1367        {
1368          cmt.m_action = action_show_manager;
1369        }
1370      else if (arg == "packages")
1371        {
1372          if (argc > 0)
1373            {
1374              cmt.m_current_target = fill_one_argument ();
1375            }
1376
1377          cmt.m_action = action_show_packages;
1378        }
1379      else if (arg == "path")
1380        {
1381          cmt.m_action = action_show_path;
1382        }
1383      else if (arg == "pattern")
1384        {
1385          if (argc > 0)
1386            {
1387              cmt.m_current_target = fill_one_argument ();
1388              cmt.m_action = action_show_pattern;
1389            }
1390          else
1391            {
1392              if (!cmt.m_quiet) cerr << "#CMT> syntax error : pattern name missing" << endl;
1393              help_action = action_help;
1394              cmt.m_action = action_show_pattern;
1395            }
1396        }
1397      else if (arg == "pattern_names")
1398        {
1399          cmt.m_action = action_show_pattern_names;
1400        }
1401      else if (arg == "patterns")
1402        {
1403          cmt.m_action = action_show_patterns;
1404        }
1405      else if (arg == "projects")
1406        {
1407          cmt.m_action = action_show_projects;
1408        }
1409        else if (arg == "project_author")
1410        {
1411          cmt.m_action = action_show_project_author;
1412        }
1413
1414      else if (arg == "pwd")
1415        {
1416          cmt.m_action = action_show_pwd;
1417        }
1418      else if (arg == "setup")
1419        {
1420          cmt.m_action = action_show_setup;
1421
1422          if (cmt.m_scope_filtering_mode == default_filtering_mode)
1423            {
1424              cmt.m_scope_filtering_mode = reach_private_uses;
1425            }
1426        }
1427      else if (arg == "set_names")
1428        {
1429          if (argc > 0)
1430            {
1431              fill_one_argument ();
1432            }
1433
1434          cmt.m_action = action_show_set_names;
1435        }
1436      else if (arg == "set_value")
1437        {
1438          cmt.m_quiet = true;
1439          if (argc > 0)
1440            {
1441              cmt.m_current_target = fill_one_argument ();
1442              cmt.m_action = action_show_set_value;
1443            }
1444          else
1445            {
1446              if (!cmt.m_quiet) cerr << "#CMT> syntax error : set name missing" << endl;
1447              help_action = action_help;
1448              cmt.m_action = action_show_set_value;
1449            }
1450        }
1451      else if (arg == "set")
1452        {
1453          if (argc > 0)
1454            {
1455              cmt.m_current_target = fill_one_argument ();
1456              cmt.m_action = action_show_set;
1457            }
1458          else
1459            {
1460              if (!cmt.m_quiet) cerr << "#CMT> syntax error : set name missing" << endl;
1461              help_action = action_help;
1462              cmt.m_action = action_show_set;
1463            }
1464        }
1465      else if (arg == "sets")
1466        {
1467          if (argc > 0)
1468            {
1469              fill_one_argument ();
1470            }
1471
1472          cmt.m_action = action_show_sets;
1473        }
1474      else if (arg == "strategies")
1475        {
1476          cmt.m_action = action_show_strategies;
1477        }
1478      else if (arg == "tags")
1479        {
1480          cmt.m_action = action_show_tags;
1481        }
1482      else if (arg == "use_paths")
1483        {
1484          if (argc > 0)
1485            {
1486              while (argc > 0)
1487                {
1488                  if (strcmp (argv[0], "-private") == 0)
1489                    {
1490                      cmt.m_scope_filtering_mode = reach_private_uses;
1491                    }
1492                  else if (strcmp (argv[0], "--private") == 0)
1493                    {
1494                      cmt.m_scope_filtering_mode = reach_private_uses;
1495                    }
1496                  else
1497                    {
1498                      cmt_string& s = arguments.add ();
1499                      s = argv[0];
1500                    }
1501
1502                  shift ();
1503                }
1504
1505              cmt.m_action = action_show_use_paths;
1506            }
1507          else
1508            {
1509              if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
1510              help_action = action_help;
1511              cmt.m_action = action_show_use_paths;
1512            }
1513        }
1514      else if ((arg == "u") ||
1515               (arg == "us") ||
1516               (arg == "use") ||
1517               (arg == "uses"))
1518        {
1519          cmt.m_action = action_show_uses;
1520
1521          if (cmt.m_scope_filtering_mode == default_filtering_mode)
1522            {
1523              cmt.m_scope_filtering_mode = reach_private_uses;
1524            }
1525        }
1526      else if (arg == "version")
1527        {
1528          cmt.m_action = action_show_version;
1529        }
1530      else if (arg == "versions")
1531        {
1532          if (argc > 0)
1533            {
1534              cmt.m_current_target = fill_one_argument ();
1535              cmt.m_action = action_show_versions;
1536            }
1537          else
1538            {
1539              if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
1540              help_action = action_help;
1541              cmt.m_action = action_show_versions;
1542            }
1543        }
1544      else
1545        {
1546          if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad show argument" << endl;
1547          help_action = action_help;
1548          cmt.m_action = action_show;
1549        }
1550    }
1551  else
1552    {
1553      if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to show" << endl;
1554      help_action = action_help;
1555      cmt.m_action = action_show;
1556    }
1557}
1558
1559void ArgParser::do_system ()
1560{
1561  cmt.m_action = action_system;
1562}
1563
1564void ArgParser::do_unlock ()
1565{
1566  if (argc > 0)
1567    {
1568      cmt.m_current_package = fill_one_argument ();
1569      cmt.m_current_version.erase (0);
1570      cmt.m_current_path.erase (0);
1571                                       
1572      if (argc > 0)
1573        {
1574          cmt.m_current_version = fill_one_argument ();
1575          cmt.m_action = action_unlock;
1576
1577          if (argc > 0)
1578            {
1579              cmt.m_current_path = fill_one_argument_filtered ();
1580            }
1581                                               
1582          cmt.m_current_access = UserMode;
1583          (Use::current()).set (cmt.m_current_package, 
1584                                cmt.m_current_version, 
1585                                cmt.m_current_path);
1586
1587        }
1588      else
1589        {
1590          if (!cmt.m_quiet) cerr << "#CMT> syntax error : version missing" << endl;
1591          help_action = action_help;
1592          cmt.m_action = action_unlock;
1593        }
1594    }
1595  else
1596    {
1597      cmt.m_action = action_unlock;
1598    }
1599}
1600
1601void ArgParser::do_version ()
1602{
1603  cmt.m_action = action_version;
1604}
1605
1606void ArgParser::option_help ()
1607{
1608  help_action = action_help;
1609}
1610
1611void ArgParser::option_n ()
1612{
1613  cmt.m_simulation = true;
1614}
1615
1616
1617void ArgParser::option_disable_warnings ()
1618{
1619  cmt.m_disable_warnings = true;
1620}
1621
1622void ArgParser::option_quiet ()
1623{
1624  cmt.m_quiet = true;
1625}
1626
1627
1628void ArgParser::option_warnings ()
1629{
1630  cmt.m_warnings = true;
1631}
1632
1633void ArgParser::option_csh ()
1634{
1635  mode = Csh;
1636}
1637
1638void ArgParser::option_sh ()
1639{
1640  mode = Sh;
1641}
1642
1643void ArgParser::option_bat ()
1644{
1645  mode = Bat;
1646}
1647
1648void ArgParser::option_use ()
1649{
1650  if (cmt.m_action != action_create)
1651    {
1652      CmtSystem::cmt_string_vector words;
1653
1654      CmtSystem::split (arg, ":", words);
1655
1656      cmt.m_current_access = UserMode;
1657
1658      if (words.size () > 0) cmt.m_current_package = words[0];
1659      if (words.size () > 1) cmt.m_current_version = words[1];
1660      if (words.size () > 2) cmt.m_current_path    = words[2];
1661      (Use::current()).set (cmt.m_current_package, 
1662                            cmt.m_current_version, 
1663                            cmt.m_current_path);
1664    }
1665}
1666
1667void ArgParser::option_pack ()
1668{
1669  if ((cmt.m_action != action_create) && (cmt.m_current_package != arg))
1670    {
1671      //CmtSystem::cd (cmt.m_default_path);
1672
1673      cmt.m_current_access = UserMode;
1674
1675      cmt.m_current_package = arg;
1676      cmt.m_current_version = "";
1677
1678      /*
1679      cerr << "ArgParser::option_pack> "
1680           << " cp=" << cmt.m_current_package
1681           << " cv=" << cmt.m_current_version
1682           << " cp=" << cmt.m_current_path << endl;
1683      */
1684
1685      (Use::current()).set (cmt.m_current_package, 
1686                            cmt.m_current_version, 
1687                            cmt.m_current_path);
1688    }
1689}
1690
1691void ArgParser::option_version ()
1692{
1693  if ((cmt.m_action != action_create) && (cmt.m_current_version != arg))
1694    {
1695      cmt.m_current_access = UserMode;
1696      cmt.m_current_version = arg;
1697
1698      /*
1699      cerr << "ArgParser::option_version> "
1700           << " cp=" << cmt.m_current_package
1701           << " cv=" << cmt.m_current_version
1702           << " cp=" << cmt.m_current_path << endl;
1703      */
1704
1705      (Use::current()).set (cmt.m_current_package, 
1706                            cmt.m_current_version, 
1707                            cmt.m_current_path);
1708    }
1709}
1710
1711void ArgParser::option_path ()
1712{
1713  if ((cmt.m_action != action_create) && (cmt.m_current_path != arg))
1714    {
1715      cmt.m_current_access = UserMode;
1716      cmt.m_current_path = arg;
1717
1718      /*
1719      cerr << "ArgParser::option_path> "
1720           << " cp=" << cmt.m_current_package
1721           << " cv=" << cmt.m_current_version
1722           << " cp=" << cmt.m_current_path << endl;
1723      */
1724
1725      (Use::current()).set (cmt.m_current_package, 
1726                            cmt.m_current_version, 
1727                            cmt.m_current_path);
1728
1729      //IProjectFactory& factory = ProjectFactory::instance ();
1730      //CmtSystem::add_cmt_path (cmt.m_current_path, "argument", factory);
1731    }
1732}
1733
1734void ArgParser::option_f ()
1735{
1736  extra_file = arg;
1737}
1738
1739void ArgParser::option_e ()
1740{
1741  cerr << "#CMT> Warning: extra statement = " << arg << endl;
1742  extra_line = arg;
1743}
1744
1745void ArgParser::option_home ()
1746{
1747  if (CmtSystem::test_directory (arg))
1748    {
1749      cmt.m_cmt_home = arg;
1750    }
1751}
1752
1753void ArgParser::option_tag ()
1754{
1755  /*
1756    Here we are going to change the complete tag set
1757  */
1758  if (arg != "")
1759    {
1760      Tag* tag;
1761      CmtSystem::cmt_string_vector words;
1762
1763      // First reset selection of all existing tags
1764      //Tag::clear_all ();
1765      Tag::unmark_all ();
1766      cmt.m_extra_tags = ",";
1767                   
1768      // Then restore CMTSITE
1769      Cmt::configure_version_tag ();
1770      Cmt::configure_site_tag (0);
1771      Cmt::configure_uname_tag ();
1772      Cmt::configure_hosttype_tag ();
1773      Cmt::configure_config_tag ();
1774      Cmt::configure_home (0);
1775      Cmt::guess_current_project ();
1776
1777      CmtSystem::split (arg, " \t,", words);
1778                 
1779      for (int i = 0; i < words.size (); i++)
1780        {
1781          const cmt_string& a = words[i];
1782      //if (!cmt.m_quiet) cout  << "parse_argument(tag_add)> current_tag=" << a << endl;                     
1783          cmt_string s = ",";
1784          s += a;
1785          s += ",";
1786                     
1787          if (i == 0)
1788            {
1789              cmt.m_current_tag = a;
1790                         
1791              if (CmtSystem::testenv ("TAGDEBUG")) 
1792              cerr << "parse_argument(tag_add)> current_tag=" << cmt.m_current_tag << endl;
1793            }
1794                     
1795          if (cmt.m_extra_tags.find (s) == cmt_string::npos)
1796            {
1797              //if (!cmt.m_quiet) cerr << "  a=[" << a << "]" << endl;
1798                         
1799              // Then restore uname if the specified tag is CMTCONFIG
1800              if (a == CmtSystem::get_cmt_config ())
1801                {
1802                  Cmt::configure_uname_tag ();
1803                }
1804                         
1805              tag = Tag::add (a, PriorityArgument, "arguments", 0);
1806              tag->mark ();
1807              cmt.m_extra_tags += a;
1808              cmt.m_extra_tags += ",";
1809            }
1810        }
1811        // To be sure that a tag
1812        Cmt::guess_current_project ();
1813    }
1814}
1815
1816void ArgParser::option_tag_add ()
1817{
1818  Tag* tag;
1819  CmtSystem::cmt_string_vector words;
1820 
1821
1822  CmtSystem::split (arg, " \t,", words);
1823
1824  for (int i = 0; i < words.size (); i++)
1825    {
1826      const cmt_string& a = words[i];
1827
1828      cmt_string s = ",";
1829      s += a;
1830      s += ",";
1831
1832      if (cmt.m_extra_tags.find (s) == cmt_string::npos)
1833        {
1834          //if (!cmt.m_quiet) cerr << "  a=[" << a << "]" << endl;
1835
1836          /// Then restore uname if the specified tag is CMTCONFIG
1837          if (a == CmtSystem::get_cmt_config ())
1838            {
1839              Cmt::configure_uname_tag ();
1840            }
1841                     
1842          tag = Tag::add (a, PriorityUserTag, "arguments", 0);
1843                     
1844          tag->mark ();
1845
1846          cmt.m_extra_tags += a;
1847          cmt.m_extra_tags += ",";
1848        }
1849    }
1850}
1851
1852void ArgParser::option_tag_remove ()
1853{
1854  Tag::TagPtrVector tags = Tag::tags ();
1855  int i;
1856  Tag* tag;
1857
1858  /*
1859    for (i = 0; i < tags.size (); i++)
1860    {
1861    tag = tags[i];
1862    if ((tag != 0) &&
1863    (tag->selected))
1864    {
1865    if (!cmt.m_quiet) cerr << "  original tag_list=" << tag->name << tag->priority << endl;
1866    }
1867    }
1868  */
1869
1870  CmtSystem::cmt_string_vector words;
1871
1872  //if (!cmt.m_quiet) cerr << "-arg_remove=" << arg << endl;
1873
1874  CmtSystem::split (arg, " \t,", words);
1875
1876  //
1877  // Now erase all entries in the old list that match
1878  // the specified tags
1879  //
1880
1881  for (i = 0; i < words.size (); i++)
1882    {
1883      const cmt_string& a = words[i];
1884
1885      cmt_string s = ",";
1886      s += a;
1887      s += ",";
1888
1889      int pos;
1890
1891      pos = cmt.m_extra_tags.find (s);
1892
1893      if (pos != cmt_string::npos)
1894        {
1895          cmt.m_extra_tags.erase (pos, s.size () - 1);
1896        }
1897
1898      //if (!cmt.m_quiet) cerr << "  tag_list=[" << tag_list << "]" << endl;
1899    }
1900
1901  //
1902  // Now reinject the purged list of tags into the database
1903  // exactly as when using -tag=<tag-list>
1904  //
1905
1906  /// First forget about all existing tags
1907      Tag::unmark_all ();
1908
1909      /// Then restore CMTSITE
1910        Cmt::configure_version_tag ();
1911        Cmt::configure_site_tag (0);
1912        Cmt::configure_uname_tag ();
1913        Cmt::configure_hosttype_tag ();
1914             
1915        CmtSystem::split (cmt.m_extra_tags, " \t,", words);
1916
1917        for (i = 0; i < words.size (); i++)
1918          {
1919            const cmt_string& a = words[i];
1920
1921            //fprintf (stderr, "  a=[%s]\n", a.c_str ());
1922
1923            /// Then restore uname if the specified tag is CMTCONFIG
1924              if (a == CmtSystem::get_cmt_config ())
1925                {
1926                  Cmt::configure_uname_tag ();
1927                }
1928
1929              if (i == 0)
1930                {
1931                  cmt.m_current_tag = a;
1932
1933                  //if (!cmt.m_quiet) cerr << "parse_argument(tag_remove)> current_tag="
1934                  //<< cmt.m_current_tag << endl;
1935
1936                  tag = Tag::add (a, PriorityTag, "restore configuration", 0);
1937                }
1938              else
1939                {
1940                  tag = Tag::add (a, PriorityUserTag, "restore configuration", 0);
1941                }
1942
1943              tag->mark ();
1944          }
1945}
1946
1947void ArgParser::option_user_context ()
1948{
1949  if (CmtSystem::test_directory (arg))
1950    {
1951      cmt.m_cmt_user_context = arg;
1952    }
1953}
1954
1955void ArgParser::option_with_version_directory ()
1956{
1957  cmt.m_current_structuring_style = with_version_directory;
1958
1959  StrategyDef* def = StrategyMgr::find_strategy ("VersionDirectory");
1960  if (def != 0)
1961    {
1962      def->m_default_value = true;
1963      def->m_priority_value = false;
1964    }
1965}
1966
1967void ArgParser::option_without_version_directory ()
1968{
1969  cmt.m_current_structuring_style = without_version_directory;
1970
1971  StrategyDef* def = StrategyMgr::find_strategy ("VersionDirectory");
1972  if (def != 0)
1973    {
1974      def->m_default_value = false;
1975      def->m_priority_value = true;
1976    }
1977}
1978
1979void ArgParser::option_no_cleanup ()
1980{
1981  //cmt.m_current_setup_strategy |= SetupNoCleanup;
1982}
1983
1984void ArgParser::option_private ()
1985{
1986  cmt.m_scope_filtering_mode = reach_private_uses;
1987}
1988
1989void ArgParser::option_public ()
1990{
1991  cmt.m_scope_filtering_mode = block_private_uses;
1992}
1993
1994
1995
1996
1997
1998
1999CommandHelp::HelpMap& CommandHelp::get_help ()
2000{
2001  static CommandHelp& me = instance ();
2002
2003  return (me.m_help);
2004}
2005
2006CommandHelp::HelpTexts& CommandHelp::get_help_texts ()
2007{
2008  static CommandHelp& me = instance ();
2009
2010  return (me.m_help_texts);
2011}
2012
2013const cmt_string& CommandHelp::get_help_text (ActionType key)
2014{
2015  static const HelpTexts& help = get_help_texts ();
2016
2017  const cmt_string& h = help[key];
2018  return (h);
2019}
2020
2021void CommandHelp::show_all ()
2022{
2023  static HelpTexts& help_texts = get_help_texts ();
2024
2025  cerr << "#> cmt command [option...]" << endl;
2026  cerr << "# command :" << endl;
2027
2028  int i;
2029
2030  for (i = 0; ; i++)
2031    {
2032      const cmt_string& s = help_texts[i];
2033      if (s == "") break;
2034      cerr << "#   " << s << endl;
2035    }
2036
2037  cerr << "# global options :" << endl;
2038
2039  cerr << "#   -disable_warnings       : don't print warnings" << endl;
2040  cerr << "#   -quiet                  : don't print errors" << endl;
2041  cerr << "#   -use=<p>:<v>:<path>     : set package version path" << endl;
2042  cerr << "#   -pack=<package>         : set package" << endl;
2043  cerr << "#   -version=<version>      : set version" << endl;
2044  cerr << "#   -path=<path>            : set root path" << endl;
2045  cerr << "#   -f=<requirement-file>   : set input file" << endl;
2046  cerr << "#   -e=<statement>          : add a one line statement" << endl;
2047  cerr << "#   -tag=<tag-list>         : select a new tag-set" << endl;
2048  cerr << "#   -tag_add=<tag-list>     : add specific comma-separated tag(s)" << endl;
2049  cerr << "#   -tag_remove=<tag-list>  : remove specific comma-separated tag(s)" << endl;
2050  cerr << "#   -warnings               : display various warnings" << endl;
2051  cerr << "#   -with_version_directory : reset to default structuring style" << endl;
2052  cerr << "#   -without_version_directory : switch structuring style" << endl;
2053  cerr << "#   -cleanup                : activate install area cleanup" << endl;
2054  cerr << "#   -no_cleanup             : inhibit install area cleanup" << endl;
2055}
2056
2057void CommandHelp::show (ActionType action)
2058{
2059  //cerr << "CommandHelp::show> action = " << action << endl;
2060
2061  static HelpTexts& help_texts = get_help_texts ();
2062
2063  if (action == action_build)
2064    {
2065      int i;
2066
2067      for (i = action_build_constituent_makefile; i <= action_build_windefs; i++)
2068        {
2069          const cmt_string& s = help_texts[i];
2070          cerr << "#   " << s << endl;
2071        }
2072    }
2073  if (action == action_check)
2074    {
2075      int i;
2076
2077      for (i = action_check_configuration; i <= action_check_version; i++)
2078        {
2079          const cmt_string& s = help_texts[i];
2080          cerr << "#   " << s << endl;
2081        }
2082    }
2083  else if (action == action_show)
2084    {
2085      int i;
2086
2087      for (i = (action_show + 1); i <= action_show_versions; i++)
2088        {
2089          const cmt_string& s = help_texts[i];
2090          cerr << "#   " << s << endl;
2091        }
2092    }
2093  else
2094    {
2095      const cmt_string& s = get_help_text (action);
2096      cerr << "#" << s << endl;
2097    }
2098}
2099
2100CommandHelp& CommandHelp::instance ()
2101{
2102  static CommandHelp me;
2103  return (me);
2104}
2105
2106CommandHelp::CommandHelp ()
2107{
2108  static HelpMap& help = m_help;
2109
2110  static HelpTexts& help_texts = m_help_texts;
2111
2112  help_texts.clear ();
2113
2114  help_texts.add () =  "none";
2115  help_texts.add () =  "awk";
2116  help_texts.add () =  "broadcast [-select=list] [-exclude=list] [-local] [-global] [-begin=pattern] [-depth=n] <command> : apply a command to [some of] the used packages";
2117  help_texts.add () =  "build <option>          : build actions. (Try cmt help build)";
2118  help_texts.add () =  "build constituent_makefile <constituent>  : generate constituent Makefile fragment";
2119  help_texts.add () =  "build constituents_makefile : generate constituents.make";
2120  help_texts.add () =  "build dependencies      : generate dependencies";
2121  help_texts.add () =  "build library_links     : build symbolic links towards all imported libraries";
2122  help_texts.add () =  "build make_setup        : build a compiled version of setup scripts";
2123  help_texts.add () =  "build msdev             : generate MSDEV files";
2124  help_texts.add () =  "build CMT_pacman        : generate PACMAN manifest file for CMT";
2125  help_texts.add () =  "build vsnet             : generate VS.NET files";
2126  help_texts.add () =  "build os9_makefile      : generate Makefile for OS9";
2127  help_texts.add () =  "build prototype         : generate prototype file";
2128  help_texts.add () =  "build readme            : generate README.html";
2129  help_texts.add () =  "build tag_makefile      : generate tag specific Makefile";
2130  help_texts.add () =  "build temporary_name    : generate a name for a temprary file";
2131  help_texts.add () =  "build triggers <constituent> : generate library trigger file";
2132  help_texts.add () =  "build windefs <library_name> : generate def file for Windows shared libraries";
2133  help_texts.add () =  "check <option>          : check actions. (Try cmt help check)";
2134  help_texts.add () =  "check configuration     : check configuration";
2135  help_texts.add () =  "check files <old> <new> : compare two files and overrides <old> by <new> if different";
2136  help_texts.add () =  "check version <name>    : check if a name follows a version tag syntax ";
2137  help_texts.add () =  "co | checkout           : perform a cvs checkout over a CMT package";
2138  help_texts.add () =  "cleanup [-csh|-sh|-bat] : generate a cleanup script";
2139  help_texts.add () =  "config                  : generate setup and cleanup scripts";
2140  help_texts.add () =  "create <package> <version> [<path>] : create and configure a new package";
2141  help_texts.add () =  "create_project <project> <name> [<path>] : create and configure a new project";
2142  help_texts.add () =  "cvsbranches <module>      : display the subdirectories for a module";
2143  help_texts.add () =  "cvssubpackages <module>   : display the subpackages for a module";
2144  help_texts.add () =  "cvssubprojects <module>   : display the subprojects for a module";
2145  help_texts.add () =  "cvstags <module>          : display the CVS tags for a module";
2146  help_texts.add () =  "do <action> [<param>=<value>] ... : Execute an action";
2147  help_texts.add () =  "expand model <model>    : ";
2148  help_texts.add () =  "filter <in> <out>       : filter a file against CMT macros and env. variables";
2149  help_texts.add () =  "help | -help | --help   : display this help";
2150  help_texts.add () =  "load";
2151  help_texts.add () =  "lock [<p> <v> [<path>]] : lock a package";
2152  help_texts.add () =  "relocate                : generate only setup scripts";
2153  help_texts.add () =  "remove <package> <version> [<path>] : remove a package version";
2154  help_texts.add () =  "remove library_links    : remove symbolic links towards all imported libraries";
2155  help_texts.add () =  "run '<command>'         : apply a command";
2156  help_texts.add () =  "run_sequence <sequence file> : execute a cmt equence file";
2157  help_texts.add () =  "set version <version>   : generate a version file in the current package";
2158  help_texts.add () =  "set versions            : generate version files into packages";
2159  help_texts.add () =  "setup [-csh|-sh|-bat]   : generate a setup script";
2160  help_texts.add () =  "show <option>           : query actions. (Try cmt help show)";
2161  help_texts.add () =  "show  action <name>     :  a formatted action definition";
2162  help_texts.add () =  "show  action_value <name> :  a raw action definition";
2163  help_texts.add () =  "show  action_names      :  all action names";
2164  help_texts.add () =  "show  actions           :  all action definitions";
2165  help_texts.add () =  "show  all_tags          :  all defined tags";
2166  help_texts.add () =  "show  applied_patterns  :  all patterns actually applied";
2167  help_texts.add () =  "show  author            :  package author";
2168  help_texts.add () =  "show  branches          :  added branches";
2169  help_texts.add () =  "show  clients           :  package clients";
2170  help_texts.add () =  "show  cmtpath_patterns  :  cmtpath_patterns";
2171  help_texts.add () =  "show  constituent <name>:  constituent definition";
2172  help_texts.add () =  "show  constituent_names :  constituent names";
2173  help_texts.add () =  "show  constituents      :  constituent definitions";
2174  help_texts.add () =  "show  cycles            :  cycles in the use graph";
2175  help_texts.add () =  "show  fragment <name>   :  one fragment definition";
2176  help_texts.add () =  "show  fragments         :  fragment definitions";
2177  help_texts.add () =  "show  groups            :  group definitions";
2178  help_texts.add () =  "show  include_dirs      :  ";
2179  help_texts.add () =  "show  language <name>   :  language definition";
2180  help_texts.add () =  "show  languages         :  language definitions";
2181  help_texts.add () =  "show  macro <name>      :  a formatted macro definition";
2182  help_texts.add () =  "show  macro_value <name>  :  a raw macro definition";
2183  help_texts.add () =  "show  macro_names       :  all macro names";
2184  help_texts.add () =  "show  macros            :  all macro definitions";
2185  help_texts.add () =  "show  manager           :  package manager";
2186  help_texts.add () =  "show  packages          :  packages reachable from the current context";
2187  help_texts.add () =  "show  path              :  the package search list";
2188  help_texts.add () =  "show  pattern <name>    :  the pattern definition and usages";
2189  help_texts.add () =  "show  pattern_names     :  pattern names";
2190  help_texts.add () =  "show  patterns          :  the pattern definitions";
2191  help_texts.add () =  "show  projects          :  project definitions";
2192  help_texts.add () =  "show  project author    :  project author";
2193  help_texts.add () =  "show  setup             :  setup definitions";
2194  help_texts.add () =  "show  pwd               :  filtered current directory";
2195  help_texts.add () =  "show  set <name>        :  a formatted set definition";
2196  help_texts.add () =  "show  set_names         :  set names";
2197  help_texts.add () =  "show  set_value <name>  :  a raw set definition";
2198  help_texts.add () =  "show  sets              :  set definitions";
2199  help_texts.add () =  "show  strategies        :  all strategies (build & version)";
2200  help_texts.add () =  "show  tags              :  all currently active tags";
2201  help_texts.add () =  "show  use_paths <pack>  :  all paths to the used package";
2202  help_texts.add () =  "show  uses              :  used packages";
2203  help_texts.add () =  "show  version           :  version of the current package";
2204  help_texts.add () =  "show  versions <name>   :  visible versions of the selected package";
2205  help_texts.add () =  "system                  : display the system tag";
2206  help_texts.add () =  "unlock [<p> <v> [<path>]] : unlock a package";
2207  help_texts.add () =  "version                 : version of CMT";
2208  help_texts.add () =  "";
2209
2210  //"build <key>             : build various components :"
2211  //"show <key>              : display various infos on :"
2212
2213  help.add (action_none, help_texts[action_none]);
2214  help.add (action_awk, help_texts[action_awk]);
2215  help.add (action_broadcast, help_texts[action_broadcast]);
2216  help.add (action_build, help_texts[action_build]);
2217  help.add (action_build_constituent_makefile, help_texts[action_build_constituent_makefile]);
2218  help.add (action_build_constituents_makefile, help_texts[action_build_constituents_makefile]);
2219  help.add (action_build_dependencies, help_texts[action_build_dependencies]);
2220  help.add (action_build_library_links, help_texts[action_build_library_links]);
2221  help.add (action_build_make_setup, help_texts[action_build_make_setup]);
2222  help.add (action_build_msdev, help_texts[action_build_msdev]);
2223  help.add (action_build_CMT_pacman, help_texts[action_build_CMT_pacman]);
2224  help.add (action_build_vsnet, help_texts[action_build_vsnet]);
2225  help.add (action_build_os9_makefile, help_texts[action_build_os9_makefile]);
2226  help.add (action_build_prototype, help_texts[action_build_prototype]);
2227  help.add (action_build_readme, help_texts[action_build_readme]);
2228  help.add (action_build_tag_makefile, help_texts[action_build_tag_makefile]);
2229  help.add (action_build_temporary_name, help_texts[action_build_temporary_name]);
2230  help.add (action_build_triggers, help_texts[action_build_triggers]);
2231  help.add (action_build_windefs, help_texts[action_build_windefs]);
2232  help.add (action_check_configuration, help_texts[action_check_configuration]);
2233  help.add (action_check_files, help_texts[action_check_files]);
2234  help.add (action_check_version, help_texts[action_check_version]);
2235  help.add (action_checkout, help_texts[action_checkout]);
2236  help.add (action_cleanup, help_texts[action_cleanup]);
2237  help.add (action_config, help_texts[action_config]);
2238  help.add (action_create, help_texts[action_create]);
2239  help.add (action_create_project, help_texts[action_create_project]);
2240  help.add (action_cvsbranches, help_texts[action_cvsbranches]);
2241  help.add (action_cvssubpackages, help_texts[action_cvssubpackages]);
2242  help.add (action_cvssubprojects, help_texts[action_cvssubprojects]);
2243  help.add (action_cvstags, help_texts[action_cvstags]);
2244  help.add (action_do, help_texts[action_do]);
2245  help.add (action_expand_model, help_texts[action_expand_model]);
2246  help.add (action_filter, help_texts[action_filter]);
2247  help.add (action_help, help_texts[action_help]);
2248  help.add (action_load, help_texts[action_load]);
2249  help.add (action_lock, help_texts[action_lock]);
2250  help.add (action_relocate, help_texts[action_relocate]);
2251  help.add (action_remove, help_texts[action_remove]);
2252  help.add (action_remove_library_links, help_texts[action_remove_library_links]);
2253  help.add (action_run, help_texts[action_run]);
2254  help.add (action_run_sequence, help_texts[action_run_sequence]);
2255  help.add (action_set_version, help_texts[action_set_version]);
2256  help.add (action_set_versions, help_texts[action_set_versions]);
2257  help.add (action_setup, help_texts[action_setup]);
2258  help.add (action_show, help_texts[action_show]);
2259  help.add (action_show_action, help_texts[action_show_action]);
2260  help.add (action_show_action_value, help_texts[action_show_action_value]);
2261  help.add (action_show_action_names, help_texts[action_show_action_names]);
2262  help.add (action_show_actions, help_texts[action_show_actions]);
2263  help.add (action_show_all_tags, help_texts[action_show_all_tags]);
2264  help.add (action_show_applied_patterns, help_texts[action_show_applied_patterns]);
2265  help.add (action_show_author, help_texts[action_show_author]);
2266  help.add (action_show_branches, help_texts[action_show_branches]);
2267  help.add (action_show_clients, help_texts[action_show_clients]);
2268  help.add (action_show_cmtpath_patterns, help_texts[action_show_cmtpath_patterns]);
2269  help.add (action_show_constituent, help_texts[action_show_constituent]);
2270  help.add (action_show_constituent_names, help_texts[action_show_constituent_names]);
2271  help.add (action_show_constituents, help_texts[action_show_constituents]);
2272  help.add (action_show_cycles, help_texts[action_show_cycles]);
2273  help.add (action_show_fragment, help_texts[action_show_fragment]);
2274  help.add (action_show_fragments, help_texts[action_show_fragments]);
2275  help.add (action_show_groups, help_texts[action_show_groups]);
2276  help.add (action_show_include_dirs, help_texts[action_show_include_dirs]);
2277  help.add (action_show_language, help_texts[action_show_language]);
2278  help.add (action_show_languages, help_texts[action_show_languages]);
2279  help.add (action_show_macro, help_texts[action_show_macro]);
2280  help.add (action_show_macro_value, help_texts[action_show_macro_value]);
2281  help.add (action_show_macro_names, help_texts[action_show_macro_names]);
2282  help.add (action_show_macros, help_texts[action_show_macros]);
2283  help.add (action_show_manager, help_texts[action_show_manager]);
2284  help.add (action_show_packages, help_texts[action_show_packages]);
2285  help.add (action_show_path, help_texts[action_show_path]);
2286  help.add (action_show_pattern, help_texts[action_show_pattern]);
2287  help.add (action_show_pattern_names, help_texts[action_show_pattern_names]);
2288  help.add (action_show_patterns, help_texts[action_show_patterns]);
2289  help.add (action_show_projects, help_texts[action_show_projects]);
2290  help.add (action_show_project_author, help_texts[action_show_project_author]);
2291  help.add (action_show_setup, help_texts[action_show_setup]);
2292  help.add (action_show_pwd, help_texts[action_show_pwd]);
2293  help.add (action_show_set, help_texts[action_show_set]);
2294  help.add (action_show_set_names, help_texts[action_show_set_names]);
2295  help.add (action_show_set_value, help_texts[action_show_set_value]);
2296  help.add (action_show_sets, help_texts[action_show_sets]);
2297  help.add (action_show_strategies, help_texts[action_show_strategies]);
2298  help.add (action_show_tags, help_texts[action_show_tags]);
2299  help.add (action_show_use_paths, help_texts[action_show_use_paths]);
2300  help.add (action_show_uses, help_texts[action_show_uses]);
2301  help.add (action_show_version, help_texts[action_show_version]);
2302  help.add (action_show_versions, help_texts[action_show_versions]);
2303  help.add (action_system, help_texts[action_system]);
2304  help.add (action_unlock, help_texts[action_unlock]);
2305  help.add (action_version, help_texts[action_version]);
2306}
2307
Note: See TracBrowser for help on using the repository browser.