Ignore:
Timestamp:
08/18/07 12:04:44 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MEnv.cc

    r8539 r8674  
    7171    if (GetEntries()<=0 && !fname.IsNull() && fname!=name)
    7272        ReadFile(fname, kEnvLocal);;
     73}
     74
     75//---------------------------------------------------------------------------
     76//
     77// Make sure that the name used for writing doesn't contain a full path
     78//
     79const char *MEnv::GetName() const
     80{
     81    const char *pos = strrchr(GetRcName(), '/');
     82    return pos>0 ? pos+1 : GetRcName();
    7383}
    7484
     
    847857//---------------------------------------------------------------------------
    848858//
     859// Add name and full path to output
     860//
     861void MEnv::PrintEnv(EEnvLevel level) const
     862{
     863    cout << "# Path: " << GetRcName() << endl;
     864    cout << "# Name: " << GetName() << endl;
     865    TEnv::PrintEnv(level);
     866}
     867
     868//---------------------------------------------------------------------------
     869//
    849870// Print resources which have never been touched (for debugging)
    850871//
Note: See TracChangeset for help on using the changeset viewer.