Changeset 659 for CMT/HEAD


Ignore:
Timestamp:
Dec 11, 2013, 10:48:59 AM (10 years ago)
Author:
rybkin
Message:

See C.L. 518

Location:
CMT/HEAD
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r658 r659  
     12013-12-11    <rybkin@lal.in2p3.fr> 518
     2
     3        * source/cmt_commands.cxx: In class ArgParser, functions
     4        option(_no)_path_strip renamed option(_no)_strip_path, command line options
     5        -(no_)path_strip renamed -(no_)strip_path
     6        * source/cmt_commands.h: idem
     7        * source/cmt_symbol.h: In class class Symbol, function set_path_strip
     8        renamed set_strip_path
     9        * source/cmt_symbol.cxx: In class PathBuilder, functions get/set_path_strip
     10        renamed get/set_strip_path, member m_path_strip renamed m_strip_path
     11        * source/cmt.h: In class CmtContext, member m_path_strip renamed
     12        m_strip_path, in class Cmt, function get_path_strip renamed get_strip_path
     13        * source/cmt_parser.cxx: In class Cmt function do_setup, use
     14        -no_strip_path, -strip_path option names, function get_strip_path, class
     15        Symbol function set_strip_path
     16       
    1172013-12-06    <rybkin@lal.in2p3.fr> 517
    218
  • CMT/HEAD/source/cmt.h

    r656 r659  
    7878  bool m_env_access;
    7979  PrintMode m_print_mode;
    80   bool m_path_strip;
     80  bool m_strip_path;
    8181
    8282private:
     
    313313  static inline const PrintMode& get_print_mode ();
    314314  static inline void set_print_mode (const PrintMode& mode);
    315   static inline const bool& get_path_strip ();
     315  static inline const bool& get_strip_path ();
    316316
    317317private:
     
    458458}
    459459
    460 inline const bool& Cmt::get_path_strip ()
    461 {
    462   return m_cmt_context.m_path_strip;
     460inline const bool& Cmt::get_strip_path ()
     461{
     462  return m_cmt_context.m_strip_path;
    463463}
    464464//----------------------------------------------------------
  • CMT/HEAD/source/cmt_commands.cxx

    r656 r659  
    256256  pv.push_back (&ArgParser::option_no_cleanup); i++;
    257257
    258   parsers.add ("-no_path_s", i);
    259   parsers.add ("-no_path_st", i);
    260   parsers.add ("-no_path_str", i);
    261   parsers.add ("-no_path_stri", i);
    262   parsers.add ("-no_path_strip", i);
    263   pv.push_back (&ArgParser::option_no_path_strip); i++;
     258  parsers.add ("-no_strip_p", i);
     259  parsers.add ("-no_strip_pa", i);
     260  parsers.add ("-no_strip_pat", i);
     261  parsers.add ("-no_strip_path", i);
     262  pv.push_back (&ArgParser::option_no_strip_path); i++;
    264263
    265264  parsers.add ("-pac", i);
     
    271270  pv.push_back (&ArgParser::option_path); i++;
    272271
    273   parsers.add ("-path_s", i);
    274   parsers.add ("-path_st", i);
    275   parsers.add ("-path_str", i);
    276   parsers.add ("-path_stri", i);
    277   parsers.add ("-path_strip", i);
    278   pv.push_back (&ArgParser::option_path_strip); i++;
     272  parsers.add ("-strip_p", i);
     273  parsers.add ("-strip_pa", i);
     274  parsers.add ("-strip_pat", i);
     275  parsers.add ("-strip_path", i);
     276  pv.push_back (&ArgParser::option_strip_path); i++;
    279277
    280278  parsers.add ("-pr", i);
     
    20562054}
    20572055
    2058 void ArgParser::option_no_path_strip ()
    2059 {
    2060   cmt.m_path_strip = false;
    2061   if (!Cmt::add_cmt_flag ("-no_path_strip"))
    2062     CmtMessage::error ("Cannot add flag `-no_path_strip'");
    2063 }
    2064 
    2065 void ArgParser::option_path_strip ()
    2066 {
    2067   cmt.m_path_strip = true;
    2068   if (!Cmt::add_cmt_flag ("-path_strip"))
    2069     CmtMessage::error ("Cannot add flag `-path_strip'");
     2056void ArgParser::option_no_strip_path ()
     2057{
     2058  cmt.m_strip_path = false;
     2059  if (!Cmt::add_cmt_flag ("-no_strip_path"))
     2060    CmtMessage::error ("Cannot add flag `-no_strip_path'");
     2061}
     2062
     2063void ArgParser::option_strip_path ()
     2064{
     2065  cmt.m_strip_path = true;
     2066  if (!Cmt::add_cmt_flag ("-strip_path"))
     2067    CmtMessage::error ("Cannot add flag `-strip_path'");
    20702068}
    20712069
  • CMT/HEAD/source/cmt_commands.h

    r656 r659  
    8888  void option_without_version_directory ();
    8989  void option_no_cleanup ();
    90   void option_no_path_strip ();
    91   void option_path_strip ();
     90  void option_no_strip_path ();
     91  void option_strip_path ();
    9292  void option_private ();
    9393  void option_public ();
  • CMT/HEAD/source/cmt_parser.cxx

    r657 r659  
    113113  m_env_access = true;
    114114  m_print_mode = Csh;
    115   m_path_strip = false;
     115  m_strip_path = false;
    116116}
    117117//----------------------------------------------------------
     
    46114611  bool reset (false);
    46124612  CmtSystem::cmt_string_vector flags;
    4613   cmt_string path_strip_flag;
    4614   bool path_strip (false);
    4615 
    4616   bool strip_saved (get_path_strip ());
     4613  cmt_string strip_path_flag;
     4614  bool strip_path (false);
     4615
     4616  bool strip_saved (get_strip_path ());
    46174617  bool access_saved (Cmt::get_env_access ());
    46184618
     
    46244624      for (int i = 0; i < flags.size (); i++)
    46254625        {
    4626           if (flags[i] == "-no_path_strip")
    4627             path_strip_flag = "-no_path_strip";
    4628           else if (flags[i] == "-path_strip")
    4629             path_strip_flag = "-path_strip";
    4630         }
    4631       if (path_strip_flag != "-no_path_strip" &&
    4632           !get_path_strip ())
    4633         reset = Symbol::set_path_strip (true);
    4634 
    4635       if (get_path_strip () || reset)
    4636         path_strip = true;
     4626          if (flags[i] == "-no_strip_path")
     4627            strip_path_flag = "-no_strip_path";
     4628          else if (flags[i] == "-strip_path")
     4629            strip_path_flag = "-strip_path";
     4630        }
     4631      if (strip_path_flag != "-no_strip_path" &&
     4632          !get_strip_path ())
     4633        reset = Symbol::set_strip_path (true);
     4634
     4635      if (get_strip_path () || reset)
     4636        strip_path = true;
    46374637      else
    4638         path_strip = false;
     4638        strip_path = false;
    46394639
    46404640      Cmt::set_env_access (false);
     
    46434643
    46444644      if (CmtError::get_last_error_code () == CmtError::warning &&
    4645           (get_path_strip () || reset))
    4646         {
    4647           reset = Symbol::set_path_strip (false);
     4645          (get_strip_path () || reset))
     4646        {
     4647          reset = Symbol::set_strip_path (false);
    46484648          if (reset)
    46494649            {
    4650               path_strip = false;
     4650              strip_path = false;
    46514651
    46524652              CmtError::print ();
     
    46654665        }
    46664666
    4667       if (reset) Symbol::set_path_strip (strip_saved);
     4667      if (reset) Symbol::set_strip_path (strip_saved);
    46684668      Cmt::set_env_access (access_saved);
    46694669
     
    46724672        " -without_cmt"
    46734673        " -without_projects"
    4674         //" -path_strip"
     4674        //" -strip_path"
    46754675        ;
    46764676      for (int i = 0; i < flags.size (); i++)
     
    46854685            oh << " -without_projects";
    46864686          /*
    4687           else if (flags[i] == "-no_path_strip")
    4688             oh << " -path_strip";
    4689           else if (flags[i] == "-path_strip")
    4690             oh << " -no_path_strip";
     4687          else if (flags[i] == "-no_strip_path")
     4688            oh << " -strip_path";
     4689          else if (flags[i] == "-strip_path")
     4690            oh << " -no_strip_path";
    46914691          */
    4692           else if (flags[i] == "-no_path_strip" ||
    4693                    flags[i] == "-path_strip")
     4692          else if (flags[i] == "-no_strip_path" ||
     4693                   flags[i] == "-strip_path")
    46944694            continue;
    46954695          else
    46964696            oh << " " << flags[i];
    46974697        }
    4698       //if (reset) oh << " -path_strip";
    4699       if (path_strip)
    4700         oh << " -no_path_strip";
     4698      //if (reset) oh << " -strip_path";
     4699      if (strip_path)
     4700        oh << " -no_strip_path";
    47014701      else
    4702         oh << " -path_strip";
     4702        oh << " -strip_path";
    47034703      oh << endl;
    47044704
  • CMT/HEAD/source/cmt_symbol.cxx

    r656 r659  
    5050                          CmtSystem::cmt_string_vector& value,
    5151                          const cmt_string& tag_name = "") const;
    52   inline const bool& get_path_strip () const;
    53   inline void set_path_strip (const bool& path_strip);
     52  inline const bool& get_strip_path () const;
     53  inline void set_strip_path (const bool& strip_path);
    5454
    5555  PathBuilder ();
    56   PathBuilder (bool path_strip);
     56  PathBuilder (bool strip_path);
    5757
    5858private:
    59   bool m_path_strip;
     59  bool m_strip_path;
    6060};
    6161//-------------------------------------------------------------
     
    754754{
    755755  static SetBuilder Set;
    756   static PathBuilder Path (Cmt::get_path_strip ());
     756  static PathBuilder Path (Cmt::get_strip_path ());
    757757  //static PathBuilder Path;
    758758  static MacroBuilder Macro;
     
    12551255
    12561256//-------------------------------------------------------------
    1257 bool Symbol::set_path_strip (const bool& path_strip)
     1257bool Symbol::set_strip_path (const bool& strip_path)
    12581258{
    12591259  // searching for a path symbol
     
    12641264      if (symbol.type == Symbol::SymbolPath)
    12651265        {
    1266           static_cast<PathBuilder*> (symbol.builder)->set_path_strip (path_strip);
     1266          static_cast<PathBuilder*> (symbol.builder)->set_strip_path (strip_path);
    12671267          return true;
    12681268        }
     
    25702570//-------------------------------------------------------------
    25712571PathBuilder::PathBuilder ()
    2572   : m_path_strip (false)
    2573 {
    2574 }
    2575 
    2576 //-------------------------------------------------------------
    2577 PathBuilder::PathBuilder (bool path_strip)
     2572  : m_strip_path (false)
     2573{
     2574}
     2575
     2576//-------------------------------------------------------------
     2577PathBuilder::PathBuilder (bool strip_path)
    25782578{
    25792579  PathBuilder ();
    2580   m_path_strip = path_strip;
     2580  m_strip_path = strip_path;
    25812581}
    25822582
     
    30333033      if (!exists)
    30343034        {
    3035           if (m_path_strip)
     3035          if (m_strip_path)
    30363036            {
    30373037              if (!reg.match (v))
     
    30843084
    30853085//-------------------------------------------------------------
    3086 inline const bool& PathBuilder::get_path_strip () const
    3087 {
    3088   return m_path_strip;
    3089 }
    3090 
    3091 //-------------------------------------------------------------
    3092 inline void PathBuilder::set_path_strip (const bool& path_strip)
    3093 {
    3094   m_path_strip = path_strip;
     3086inline const bool& PathBuilder::get_strip_path () const
     3087{
     3088  return m_strip_path;
     3089}
     3090
     3091//-------------------------------------------------------------
     3092inline void PathBuilder::set_strip_path (const bool& strip_path)
     3093{
     3094  m_strip_path = strip_path;
    30953095}
    30963096
     
    37123712        if (!pb)
    37133713          pb = static_cast<PathBuilder*> (symbol.builder);
    3714         if (pb->get_path_strip ())
     3714        if (pb->get_strip_path ())
    37153715          {
    37163716            /*
     
    37843784              }
    37853785          }
    3786         else // (!pb->get_path_strip ())
     3786        else // (!pb->get_strip_path ())
    37873787          {
    37883788            if (CmtError::has_pending_error ())
  • CMT/HEAD/source/cmt_symbol.h

    r656 r659  
    109109
    110110  static bool get_inhibit_display ();
    111   static bool set_path_strip (const bool& path_strip);
     111  static bool set_strip_path (const bool& strip_path);
    112112
    113113public:
Note: See TracChangeset for help on using the changeset viewer.