Changeset 109 for CMT/HEAD


Ignore:
Timestamp:
Oct 28, 2005, 7:16:51 PM (19 years ago)
Author:
arnault
Message:

First implementation of a -warnings option.

Location:
CMT/HEAD
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r108 r109  
    66        harmless to any user of this special file though.
    77
     8        source/cmt.h
     9        source/cmt_parser.cxx
     10        source/cmt_commands.h
     11        source/cmt_commands.cxx
     12        doc/CMTDoc.xml: Add a -warnings option to display various warning messages
    813 
    9142005-10-18    <arnault@lal.in2p3.fr> 288
  • CMT/HEAD/doc/CMTDoc.xml

    r104 r109  
    46904690   -tag_add=&amp;lt;tag-list&gt;     : add specific comma-separated tag(s)
    46914691   -tag_remove=&amp;lt;tag-list&gt;  : remove specific comma-separated tag(s)
     4692   -warnings               : display various warnings
    46924693   -with_version_directory : reset to default structuring style
    46934694   -without_version_directory : switch structuring style
     
    58105811                simple list of used packages, starting from the
    58115812                deepest uses.</p>
     5813
     5814                <p>The <tt>-warnings</tt> option displays various warnings, such as invalid PATH items.</p>
    58125815
    58135816              <p></p></li>
  • CMT/HEAD/source/cmt.h

    r81 r109  
    5656  cmt_string m_default_path;
    5757  bool m_quiet;
     58  bool m_warnings;
    5859  bool m_recursive;
    5960  CmtScopeFilteringMode m_scope_filtering_mode;
     
    208209  static bool get_debug ();
    209210  static bool get_quiet ();
     211  static bool get_warnings ();
    210212  static bool get_recursive ();
    211213  static CmtScopeFilteringMode get_scope_filtering_mode ();
  • CMT/HEAD/source/cmt_commands.cxx

    r83 r109  
    294294  parsers.add ("-version", i);
    295295  pv.push_back (&ArgParser::option_version); i++;
     296
     297  parsers.add ("-warn", i);
     298  parsers.add ("-warni", i);
     299  parsers.add ("-warnin", i);
     300  parsers.add ("-warning", i);
     301  parsers.add ("-warnings", i);
     302  pv.push_back (&ArgParser::option_warnings); i++;
    296303
    297304  parsers.add ("-with_v", i);
     
    15711578}
    15721579
     1580void ArgParser::option_warnings ()
     1581{
     1582  cmt.m_warnings = true;
     1583}
     1584
    15731585void ArgParser::option_csh ()
    15741586{
     
    19892001  cerr << "#   -tag_add=<tag-list>     : add specific comma-separated tag(s)" << endl;
    19902002  cerr << "#   -tag_remove=<tag-list>  : remove specific comma-separated tag(s)" << endl;
     2003  cerr << "#   -warnings               : display various warnings" << endl;
    19912004  cerr << "#   -with_version_directory : reset to default structuring style" << endl;
    19922005  cerr << "#   -without_version_directory : switch structuring style" << endl;
  • CMT/HEAD/source/cmt_commands.h

    r42 r109  
    6161  void option_n ();
    6262  void option_quiet ();
     63  void option_warnings ();
    6364  void option_csh ();
    6465  void option_sh ();
  • CMT/HEAD/source/cmt_parser.cxx

    r108 r109  
    7777  m_default_path     = "";
    7878  m_quiet            = false;
     79  m_warnings         = false;
    7980  m_recursive        = false;
    8081
     
    39203921{
    39213922  return (Me.m_quiet);
     3923}
     3924
     3925bool Cmt::get_warnings ()
     3926{
     3927  return (Me.m_warnings);
    39223928}
    39233929
  • CMT/HEAD/source/cmt_symbol.cxx

    r102 r109  
    871871      if (!CmtSystem::test_directory (t))
    872872        {
    873           if (!Cmt::get_quiet ())
     873          if (Cmt::get_warnings ())
    874874            {
    875875              cerr << "#CMT> Warning: Wrong " << name << " item " << t << endl;
Note: See TracChangeset for help on using the changeset viewer.