Ignore:
Timestamp:
Nov 7, 2013, 4:04:42 PM (11 years ago)
Author:
rybkin
Message:

See C.L. 512

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_parser.cxx

    r652 r653  
    4949{
    5050  clear ();
    51 
    52   cmt_string tags = CmtSystem::getenv ("CMTEXTRATAGS");
    53   CmtSystem::cmt_string_vector words;
    54   CmtSystem::split (tags, " \t,", words);
    55   for (int i = 0; i < words.size (); i++)
    56     {
    57       bool has (false);
    58       for (int j = 0; j < m_extra_tags.size (); j++)
    59         {
    60           if (m_extra_tags[j] == words[i])
    61             {
    62               has = true;
    63               break;
    64             }
    65         }
    66       if (!has)
    67         m_extra_tags.push_back (words[i]);
    68     }
    69 }
    70 
     51}
     52
     53//----------------------------------------------------------
    7154CmtContext::~CmtContext ()
    7255{
    7356}
    7457
     58//----------------------------------------------------------
    7559void CmtContext::clear ()
    7660{
     
    126110  m_autoconfigure_cmtpath = false;
    127111}
    128 
     112//----------------------------------------------------------
     113
     114int CmtContext::initialize ()
     115{
     116  int errors (0);
     117
     118  cmt_string tags = CmtSystem::getenv ("CMTEXTRATAGS");
     119  CmtSystem::cmt_string_vector words;
     120  CmtSystem::split (tags, " \t,", words);
     121  for (int i = 0; i < words.size (); i++)
     122    {
     123      bool has (false);
     124      for (int j = 0; j < m_extra_tags.size (); j++)
     125        {
     126          if (m_extra_tags[j] == words[i])
     127            {
     128              has = true;
     129              break;
     130            }
     131        }
     132      if (!has)
     133        m_extra_tags.push_back (words[i]);
     134    }
     135
     136  return - errors;
     137}
    129138//----------------------------------------------------------
    130139
     
    550559  log << "configure_default_path" << log_endl;
    551560  configure_default_path ();
     561
     562  log << "restore_all_tags" << log_endl;
     563  restore_all_tags (0);
    552564  log << "configure_version_tag" << log_endl;
    553565  configure_version_tag ();
     
    54865498{
    54875499  return (Me.m_current_target);
     5500}
     5501
     5502const CmtSystem::cmt_string_vector& Cmt::get_tags_remove ()
     5503{
     5504  return (Me.m_tags_remove);
    54885505}
    54895506
     
    67476764int Cmt::parser (int argc, char* argv[])
    67486765{
     6766  // save CMTFLAGS
     6767  cmt_string cmtflags (get_cmt_flags ());
     6768
     6769  clear ();
     6770  Me.initialize ();
     6771
    67496772  ArgParser ap (Me);
    67506773 
     
    67596782    }
    67606783
    6761   // save CMTFLAGS
    6762   cmt_string cmtflags (get_cmt_flags ());
    6763 
    6764   clear ();
     6784  //  clear ();
    67656785
    67666786  //  Me.clear ();
     
    67776797    default:
    67786798      configure (ap);
    6779       restore_all_tags (0);
     6799      //restore_all_tags (0);
    67806800      break;
    67816801    }
Note: See TracChangeset for help on using the changeset viewer.