interpreter.h

来自「Unix下的MUD客户端程序」· C头文件 代码 · 共 34 行

H
34
字号
// The command interpreter holds commands to be executed// Expand what?#define EXPAND_NONE      0x00#define EXPAND_VARIABLES 0x01#define EXPAND_ALIASES   0x02#define EXPAND_SEMICOLON 0x04#define EXPAND_SPEEDWALK 0x08#define EXPAND_ALL       0xffff// Default flags for entry from the input line#define EXPAND_INPUT     (EXPAND_ALIASES|EXPAND_SPEEDWALK)class Interpreter {public:    void add(const char *s, int flags = EXPAND_ALL, bool back = true);    void execute();    void mclCommand (const char *command);    void setCommandCharacter (int c);    char getCommandCharacter();    void expandAliases(const char*, int flags);    const char *expandVariables(const char *);    void expandSemicolon(const char*, int);    void expandSpeedwalk(const char*, int );    private:    List<String*> commands;    char commandCharacter;};extern Interpreter interpreter;extern bool macros_disabled, aliases_disabled, actions_disabled;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?