- Timestamp:
- Dec 11, 2013, 10:48:59 AM (10 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r658 r659 1 2013-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 1 17 2013-12-06 <rybkin@lal.in2p3.fr> 517 2 18 -
CMT/HEAD/source/cmt.h
r656 r659 78 78 bool m_env_access; 79 79 PrintMode m_print_mode; 80 bool m_ path_strip;80 bool m_strip_path; 81 81 82 82 private: … … 313 313 static inline const PrintMode& get_print_mode (); 314 314 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 (); 316 316 317 317 private: … … 458 458 } 459 459 460 inline const bool& Cmt::get_ path_strip()461 { 462 return m_cmt_context.m_ path_strip;460 inline const bool& Cmt::get_strip_path () 461 { 462 return m_cmt_context.m_strip_path; 463 463 } 464 464 //---------------------------------------------------------- -
CMT/HEAD/source/cmt_commands.cxx
r656 r659 256 256 pv.push_back (&ArgParser::option_no_cleanup); i++; 257 257 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++; 264 263 265 264 parsers.add ("-pac", i); … … 271 270 pv.push_back (&ArgParser::option_path); i++; 272 271 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++; 279 277 280 278 parsers.add ("-pr", i); … … 2056 2054 } 2057 2055 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'");2056 void 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 2063 void 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'"); 2070 2068 } 2071 2069 -
CMT/HEAD/source/cmt_commands.h
r656 r659 88 88 void option_without_version_directory (); 89 89 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 (); 92 92 void option_private (); 93 93 void option_public (); -
CMT/HEAD/source/cmt_parser.cxx
r657 r659 113 113 m_env_access = true; 114 114 m_print_mode = Csh; 115 m_ path_strip= false;115 m_strip_path = false; 116 116 } 117 117 //---------------------------------------------------------- … … 4611 4611 bool reset (false); 4612 4612 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 ()); 4617 4617 bool access_saved (Cmt::get_env_access ()); 4618 4618 … … 4624 4624 for (int i = 0; i < flags.size (); i++) 4625 4625 { 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; 4637 4637 else 4638 path_strip= false;4638 strip_path = false; 4639 4639 4640 4640 Cmt::set_env_access (false); … … 4643 4643 4644 4644 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); 4648 4648 if (reset) 4649 4649 { 4650 path_strip= false;4650 strip_path = false; 4651 4651 4652 4652 CmtError::print (); … … 4665 4665 } 4666 4666 4667 if (reset) Symbol::set_ path_strip(strip_saved);4667 if (reset) Symbol::set_strip_path (strip_saved); 4668 4668 Cmt::set_env_access (access_saved); 4669 4669 … … 4672 4672 " -without_cmt" 4673 4673 " -without_projects" 4674 //" - path_strip"4674 //" -strip_path" 4675 4675 ; 4676 4676 for (int i = 0; i < flags.size (); i++) … … 4685 4685 oh << " -without_projects"; 4686 4686 /* 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"; 4691 4691 */ 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") 4694 4694 continue; 4695 4695 else 4696 4696 oh << " " << flags[i]; 4697 4697 } 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"; 4701 4701 else 4702 oh << " - path_strip";4702 oh << " -strip_path"; 4703 4703 oh << endl; 4704 4704 -
CMT/HEAD/source/cmt_symbol.cxx
r656 r659 50 50 CmtSystem::cmt_string_vector& value, 51 51 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); 54 54 55 55 PathBuilder (); 56 PathBuilder (bool path_strip);56 PathBuilder (bool strip_path); 57 57 58 58 private: 59 bool m_ path_strip;59 bool m_strip_path; 60 60 }; 61 61 //------------------------------------------------------------- … … 754 754 { 755 755 static SetBuilder Set; 756 static PathBuilder Path (Cmt::get_ path_strip());756 static PathBuilder Path (Cmt::get_strip_path ()); 757 757 //static PathBuilder Path; 758 758 static MacroBuilder Macro; … … 1255 1255 1256 1256 //------------------------------------------------------------- 1257 bool Symbol::set_ path_strip (const bool& path_strip)1257 bool Symbol::set_strip_path (const bool& strip_path) 1258 1258 { 1259 1259 // searching for a path symbol … … 1264 1264 if (symbol.type == Symbol::SymbolPath) 1265 1265 { 1266 static_cast<PathBuilder*> (symbol.builder)->set_ path_strip (path_strip);1266 static_cast<PathBuilder*> (symbol.builder)->set_strip_path (strip_path); 1267 1267 return true; 1268 1268 } … … 2570 2570 //------------------------------------------------------------- 2571 2571 PathBuilder::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 //------------------------------------------------------------- 2577 PathBuilder::PathBuilder (bool strip_path) 2578 2578 { 2579 2579 PathBuilder (); 2580 m_ path_strip = path_strip;2580 m_strip_path = strip_path; 2581 2581 } 2582 2582 … … 3033 3033 if (!exists) 3034 3034 { 3035 if (m_ path_strip)3035 if (m_strip_path) 3036 3036 { 3037 3037 if (!reg.match (v)) … … 3084 3084 3085 3085 //------------------------------------------------------------- 3086 inline const bool& PathBuilder::get_ path_strip() const3087 { 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;3086 inline const bool& PathBuilder::get_strip_path () const 3087 { 3088 return m_strip_path; 3089 } 3090 3091 //------------------------------------------------------------- 3092 inline void PathBuilder::set_strip_path (const bool& strip_path) 3093 { 3094 m_strip_path = strip_path; 3095 3095 } 3096 3096 … … 3712 3712 if (!pb) 3713 3713 pb = static_cast<PathBuilder*> (symbol.builder); 3714 if (pb->get_ path_strip())3714 if (pb->get_strip_path ()) 3715 3715 { 3716 3716 /* … … 3784 3784 } 3785 3785 } 3786 else // (!pb->get_ path_strip())3786 else // (!pb->get_strip_path ()) 3787 3787 { 3788 3788 if (CmtError::has_pending_error ()) -
CMT/HEAD/source/cmt_symbol.h
r656 r659 109 109 110 110 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); 112 112 113 113 public:
Note: See TracChangeset
for help on using the changeset viewer.