forked from Alepha/Alepha
Remove gnu dependency from Console.
This commit is contained in:
@ -13,9 +13,9 @@ static_assert( __cplusplus > 2020'99 );
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <ext/stdio_filebuf.h>
|
|
||||||
|
|
||||||
#include <Alepha/Utility/evaluation_helpers.h>
|
#include <Alepha/Utility/evaluation_helpers.h>
|
||||||
|
#include <Alepha/IOStreams/OutUnixFileBuf.h>
|
||||||
|
|
||||||
#include "Enum.h"
|
#include "Enum.h"
|
||||||
#include "ProgramOptions.h"
|
#include "ProgramOptions.h"
|
||||||
@ -348,8 +348,7 @@ namespace Alepha::Hydrogen ::detail:: console_m
|
|||||||
struct Console::Impl
|
struct Console::Impl
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
// TODO: Do we want to make this not gnu libstdc++ specific?
|
IOStreams::OutUnixFileBuf filebuf;
|
||||||
__gnu_cxx::stdio_filebuf< char > filebuf;
|
|
||||||
std::ostream stream;
|
std::ostream stream;
|
||||||
std::stack< std::pair< struct termios, ConsoleMode > > modeStack;
|
std::stack< std::pair< struct termios, ConsoleMode > > modeStack;
|
||||||
ConsoleMode mode= cooked;
|
ConsoleMode mode= cooked;
|
||||||
@ -357,7 +356,7 @@ namespace Alepha::Hydrogen ::detail:: console_m
|
|||||||
|
|
||||||
explicit
|
explicit
|
||||||
Impl( const int fd )
|
Impl( const int fd )
|
||||||
: fd( fd ), filebuf( fd, std::ios::out ), stream( &filebuf )
|
: fd( fd ), filebuf( fd ), stream( &filebuf )
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user