Ignore:
Timestamp:
Mar 8, 2011, 1:56:48 PM (13 years ago)
Author:
rybkin
Message:

See C.L. 444

File:
1 edited

Legend:

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

    r459 r561  
    573573
    574574//----------------------------------------------------------
    575 void Constituent::show () const
     575void Constituent::show (ostream& out) const
     576//void Constituent::show () const
    576577{
    577578  int i;
     
    580581    {
    581582    case Library:
    582       cout << "library";
     583      out << "library";
    583584      break;
    584585    case Application:
    585       cout << "application";
     586      out << "application";
    586587      break;
    587588    case Document:
    588       cout << "document " << generator;
     589      out << "document " << generator;
    589590      break;
    590591    }
    591592 
    592   cout << " " << name;
     593  out << " " << name;
    593594 
    594595  if (group != 0)
    595596    {
    596       cout << " -group=" << group->name ();
     597      out << " -group=" << group->name ();
    597598    }
    598599 
    599600  if (suffix != 0)
    600601    {
    601       cout << " -suffix=" << suffix;
     602      out << " -suffix=" << suffix;
    602603    }
    603604 
    604605  if ((type == Application) && need_check)
    605606    {
    606       cout << " -check";
     607      out << " -check";
    607608    }
    608609 
    609610  if ((type == Library) && no_share)
    610611    {
    611       cout << " -no_share";
     612      out << " -no_share";
    612613    }
    613614 
    614615  if ((type == Library) && no_static)
    615616    {
    616       cout << " -no_static";
     617      out << " -no_static";
    617618    }
    618619 
    619620  if ((type == Library) && build_triggers)
    620621    {
    621       cout << " -triggers";
     622      out << " -triggers";
    622623    }
    623624 
    624625  if (has_target_tag)
    625626    {
    626       cout << " -target_tag";
     627      out << " -target_tag";
    627628    }
    628629 
     
    631632      const cmt_string& import_name = imports[i];
    632633     
    633       cout << " -import=" << import_name;
     634      out << " -import=" << import_name;
    634635    }
    635636 
     
    638639      const cmt_string& exclude = excludes[i];
    639640     
    640       cout << " -x=" << exclude;
     641      out << " -x=" << exclude;
    641642    }
    642643 
     
    645646      const cmt_string& select = selects[i];
    646647     
    647       cout << " -k=" << select;
     648      out << " -k=" << select;
    648649    }
    649650 
     
    652653      const cmt_string& module_name = modules[i];
    653654     
    654       cout << " " << module_name;
     655      out << " " << module_name;
    655656    }
    656657 
     
    659660      const Variable& v = variables[i];
    660661     
    661       cout << " " << v.name << "=" << v.value;
    662     }
    663  
    664   cout << endl;
    665 }
     662      //      out << " " << v.name << "=" << v.value;
     663      // quote (up to) 2 times as split is applied 2 times
     664      // - before action
     665      // - in parse
     666      cmt_string qvalue (CmtSystem::quote (v.value, " \t"));
     667      out << " " << v.name << "="
     668          << (qvalue == v.value ? v.value : CmtSystem::quote (qvalue, " \t"));
     669      //          << CmtSystem::quote (CmtSystem::quote (v.value, " \t"), " \t");
     670    }
     671 
     672  out << endl;
     673}
Note: See TracChangeset for help on using the changeset viewer.