Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 4, 2008, 4:44:24 PM (16 years ago)
Author:
landauf
Message:

added a tcl-thread, but there are still some bugs and problems

File:
1 edited

Legend:

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

    r1198 r1230  
    5050    ConsoleCommandShortcutExtern(exec, AccessLevel::None);
    5151    ConsoleCommandShortcutExtern(echo, AccessLevel::None);
     52    ConsoleCommandShortcutExtern(puts, AccessLevel::None);
    5253
    5354    ConsoleCommandShortcutExtern(read, AccessLevel::None);
     
    9293    std::string echo(const std::string& text)
    9394    {
     95        std::cout << text << std::endl;
    9496        return text;
     97    }
     98
     99    void puts(bool newline, const std::string& text)
     100    {
     101        if (newline)
     102            std::cout << text << std::endl;
     103        else
     104            std::cout << text;
    95105    }
    96106
     
    384394        if (useTcl)
    385395        {
    386             return TclBind::eval(command);
    387         }
    388         else
    389         {
    390             if ((CommandExecutor::getEvaluation().processedCommand_ != command) || (CommandExecutor::getEvaluation().state_ == CS_Uninitialized))
    391                 CommandExecutor::parse(command);
    392 
    393             return CommandExecutor::execute(CommandExecutor::getEvaluation());
    394         }
     396            std::string temp = getLowercase(removeTrailingWhitespaces(command));
     397            if (!(temp.find("tclthread") == 0 || temp.find("tclthreadmanager") == 0))
     398                return TclBind::eval(command);
     399        }
     400
     401        if ((CommandExecutor::getEvaluation().processedCommand_ != command) || (CommandExecutor::getEvaluation().state_ == CS_Uninitialized))
     402            CommandExecutor::parse(command);
     403
     404        return CommandExecutor::execute(CommandExecutor::getEvaluation());
    395405    }
    396406
Note: See TracChangeset for help on using the changeset viewer.