Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6007


Ignore:
Timestamp:
Oct 30, 2009, 5:26:28 PM (15 years ago)
Author:
rgrieder
Message:

Fixed IOConsole partly and fixed two problems in PathConfig and OutputHandler

Location:
code/branches/console/src/libraries
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/libraries/core/IOConsole.cc

    r6006 r6007  
    5454#ifdef ORXONOX_PLATFORM_UNIX
    5555
    56     termios* IOConsole::originalTerminalSettings_;
    57 
    5856    namespace EscapeMode
    5957    {
     
    6967        : shell_(new Shell("IOConsole", false))
    7068        , buffer_(shell_->getInputBuffer())
     69        , originalTerminalSettings_(new termios())
    7170        , bStatusPrinted_(false)
    7271    {
    73         this->originalTerminalSettings_ = new termios();
    7472        this->setTerminalMode();
    7573        this->shell_->registerListener(this);
  • code/branches/console/src/libraries/core/IOConsole.h

    r6004 r6007  
    5555
    5656        void setTerminalMode();
    57         static void resetTerminalMode();
     57        void resetTerminalMode();
    5858        int getTerminalSize(int* x, int* y);
    5959
     
    7272        Shell*                  shell_;
    7373        InputBuffer*            buffer_;
    74         static termios*         originalTerminalSettings_;
     74        termios*                originalTerminalSettings_;
    7575        bool                    bPrintStatusLine_;
    7676        bool                    bStatusPrinted_;
  • code/branches/console/src/libraries/core/PathConfig.cc

    r5929 r6007  
    263263        putenv(const_cast<char*>(("PATH=" + pathVariable + ";" + modulePath_.string()).c_str()));
    264264
     265        // Make sure the path exists, otherwise don't load modules
     266        if (!boost::filesystem::exists(modulePath_))
     267            return modulePaths;
     268
    265269        boost::filesystem::directory_iterator file(modulePath_);
    266270        boost::filesystem::directory_iterator end;
  • code/branches/console/src/libraries/util/OutputHandler.cc

    r6004 r6007  
    7070            called from getInstance!)
    7171        */
    72         LogFileWriter(OutputHandler& outputHandler)
     72        LogFileWriter()
    7373            : OutputListener(OutputHandler::logFileOutputListenerName_s)
    7474        {
     
    9292
    9393            this->outputStream_ = &this->logFile_;
    94             // Use default level until we get the configValue from the Core
    95             this->setSoftDebugLevel(OutputLevel::Debug);
    96             outputHandler.registerOutputListener(this);
    9794        }
    9895
     
    147144            called from getInstance!)
    148145        */
    149         MemoryLogWriter(OutputHandler& outputHandler)
     146        MemoryLogWriter()
    150147            : OutputListener("memoryLog")
    151148        {
    152149            this->outputStream_ = &this->buffer_;
    153             // We capture as much input as the listener with the highest level
    154             this->setSoftDebugLevel(OutputHandler::getSoftDebugLevel());
    155             outputHandler.registerOutputListener(this);
    156150        }
    157151
     
    182176        : outputLevel_(OutputLevel::Verbose)
    183177    {
    184         this->logFile_ = new LogFileWriter(*this);
    185         this->output_  = new MemoryLogWriter(*this);
     178        this->logFile_ = new LogFileWriter();
     179        // Use default level until we get the configValue from the Core
     180        this->logFile_->softDebugLevel_ = OutputLevel::Debug;
     181        this->registerOutputListener(this->logFile_);
     182
     183        this->output_  = new MemoryLogWriter();
     184        // We capture as much input as the listener with the highest level
     185        this->output_->softDebugLevel_ = getSoftDebugLevel();
     186        this->registerOutputListener(this->output_);
    186187    }
    187188
Note: See TracChangeset for help on using the changeset viewer.