console.h

来自「c-smile 一个语法类似与JS 又有点像C++的 编译器」· C头文件 代码 · 共 45 行

H
45
字号
//-< CONSOLE.H >-----------------------------------------------------*--------*
// SAL                       Version 1.0         (c) 1997  GARRET    *     ?  *
// (System Abstraction Layer)                                        *   /\|  *
//                                                                   *  /  \  *
//                          Created:      7-Jan-97    K.A. Knizhnik  * / [] \ *
//                          Last update: 21-Nov-98    K.A. Knizhnik  * GARRET *
//-------------------------------------------------------------------*--------*
// Handle information and error messages at virtual console.
//-------------------------------------------------------------------*--------*

#ifndef __CONSOLE_H__
#define __CONSOLE_H__

#include "stdtp.h"

namespace sal
{

class console { 
  protected:
    virtual void output_data(boolean error, const char* msg, va_list args);
    virtual boolean input_data(char* buf, size_t buf_size);
 
  public:
    static console* active_console; 
    //
    // Output information at console.
    //
    static void output(const char* msg, ...); 
    //
    // Output message at console and terminate program. 
    //
    static void error(const char* msg, ...);       

    //
    // Input information from console
    //
    static boolean input(char* buf, size_t buf_size);

    console();
}; 

};
#endif

⌨️ 快捷键说明

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