UTF-8 fix for Solaris

This commit is contained in:
Markus Gans 2018-01-25 09:31:59 +01:00
parent ac8ac70b9c
commit 1fc960f672
2 changed files with 16 additions and 13 deletions

View File

@ -413,9 +413,9 @@ class FVTerm : public FTerm
#if defined(__sun) && defined(__SVR4)
static int appendOutputBuffer (char);
#else
static int appendOutputBuffer (int);
#endif
static int appendOutputBuffer (int);
// Data Members
static std::queue<int>* output_buffer;

View File

@ -3003,17 +3003,7 @@ inline void FVTerm::appendOutputBuffer (const char s[])
//----------------------------------------------------------------------
int FVTerm::appendOutputBuffer (char ch)
{
output_buffer->push(ch);
if ( output_buffer->size() >= TERMINAL_OUTPUT_BUFFER_SIZE )
flush_out();
return ch;
}
#else
//----------------------------------------------------------------------
int FVTerm::appendOutputBuffer (int ch)
{
// This method is required by tputs under Solaris
output_buffer->push(ch);
if ( output_buffer->size() >= TERMINAL_OUTPUT_BUFFER_SIZE )
@ -3022,3 +3012,16 @@ int FVTerm::appendOutputBuffer (int ch)
return ch;
}
#endif
//----------------------------------------------------------------------
int FVTerm::appendOutputBuffer (int ch)
{
// append method for unicode character
output_buffer->push(ch);
if ( output_buffer->size() >= TERMINAL_OUTPUT_BUFFER_SIZE )
flush_out();
return ch;
}