|
|
1.1 ! root 1: // ! 2: // nono ! 3: // Copyright (C) 2020 [email protected] ! 4: // ! 5: ! 6: #include "header.h" ! 7: #include "console.h" ! 8: ! 9: // ! 10: // 標準入出力コンソール ! 11: // ! 12: ! 13: // コンストラクタ ! 14: ConsoleStdio::ConsoleStdio() ! 15: { ! 16: #if defined(HAVE_HISTEDIT_H) ! 17: // editline があれば使う ! 18: use_editline = true; ! 19: #endif ! 20: } ! 21: ! 22: // デストラクタ ! 23: ConsoleStdio::~ConsoleStdio() ! 24: { ! 25: } ! 26: ! 27: // 初期化 ! 28: bool ! 29: ConsoleStdio::Init() ! 30: { ! 31: return true; ! 32: } ! 33: ! 34: // オープン ! 35: bool ! 36: ConsoleStdio::Open() ! 37: { ! 38: // stdin,out 相当なので開きっぱなしにする ! 39: if (inp.fd == -1) { ! 40: inp.fd = STDIN_FILENO; ! 41: out.fd = STDOUT_FILENO; ! 42: FDOpen(); ! 43: } ! 44: return true; ! 45: } ! 46: ! 47: void ! 48: ConsoleStdio::Close() ! 49: { ! 50: // stdin,out 相当なので開きっぱなしにする ! 51: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.