Ignore:
Timestamp:
11/22/03 21:14:14 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/rootlogon.C

    r2491 r2557  
    4242}
    4343
    44 void load(TString &dir)
     44bool load(TString &dir)
    4545{
    4646    if (isloaded())
    4747        return;
    4848
    49     cout << "Loading 'libmars.so'... " << flush;
     49    cout << "\033[33m\033[1m" << "Loading '" << dir << "libmars.so'... " << "\033[31m" << flush;
    5050
    51     if (gSystem->Load(dir.IsNull() ? "libmars.so" : dir+"libmars.so")!=0)
    52         cout << "error." << endl;
     51    if (dir.IsNull())
     52        dir = "./";
     53
     54    if (gSystem->Load(dir+"libmars.so")!=0)
     55    {
     56        cout << "\033[33m\033[1m" << "error." << endl;
     57        cout << "\033[0m" << endl;
     58        return false;
     59    }
    5360    else
    5461    {
    5562        MParContainer::Class()->IgnoreTObjectStreamer();
    5663        MArray::Class()->IgnoreTObjectStreamer();
    57         cout << "done." << endl;
     64        cout << "\033[33m\033[1m" << "done." << endl;
     65        cout << "\033[0m" << endl;
     66        return true;
    5867    }
    59 
    60     cout << endl;
    6168}
    6269/*
     
    7986
    8087    TString dir = gSystem->Getenv("MARSSYS");
    81 
    8288    if (!dir.IsNull())
    8389    {
    84         cout << "Mars found in " << dir << " (MARSSYS)" << endl << endl;
     90        cout << "\033[34m\033[1m" << "Searching Mars in " << dir << " (MARSSYS)" << "\033[0m" << endl << endl;
    8591
    8692        if (!dir.EndsWith("/"))
     
    8894    }
    8995
    90     load(dir);
     96    if (!load(dir))
     97        return;
    9198
    9299    gInterpreter->AddIncludePath(dir+"macros");
     
    119126    }
    120127
    121     cout << "Welcome to the Mars Root environment." << endl;
    122 
     128    cout << "\033[32m" << "Welcome to the Mars Root environment." << "\033[0m" << endl;
    123129    cout << endl;
    124130}
Note: See TracChangeset for help on using the changeset viewer.