// This file is a part of Framsticks SDK. http://www.framsticks.com/ // Copyright (C) 1999-2020 Maciej Komosinski and Szymon Ulatowski. // See LICENSE.txt for details. #include "stdinoutfilesystem.h" #include "stdiofile.h" VirtFILE *StdInOutFileSystem::Vfopen(const char* path, const char*mode) { #ifndef NO_STD_IN_OUT_ERR if (isStdInOutPath(path)) { if (*mode == 'r') return new StdioFILEDontClose(stdin); else return new StdioFILEDontClose(stdout); } #endif return (chain != NULL) ? chain->Vfopen(path, mode) : NULL; } bool StdInOutFileSystem::isStdInOutPath(const char* path) { return strcmp(path, "-") == 0; }