We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a668bfe commit 7c4be25Copy full SHA for 7c4be25
cpp-terminal/platforms/terminal.cpp
@@ -75,7 +75,11 @@ void Term::Terminal::store_and_restore()
75
enabled = false;
76
}
77
#else
78
+ #if defined(__mips__) || defined(__mips) || defined(__MIPS__)
79
+ static termios orig_termios{0, 0, 0, 0, 0, {}};
80
+ #else
81
static termios orig_termios{0, 0, 0, 0, 0, {}, 0, 0};
82
+ #endif
83
if(!enabled)
84
{
85
int fd{open("/dev/tty", O_RDWR, O_NOCTTY)};
@@ -113,7 +117,11 @@ void Term::Terminal::setRawMode()
113
117
114
118
if(fd >= 0)
115
119
116
- termios raw{0, 0, 0, 0, 0, {0}, 0, 0};
120
121
+ static termios raw{0, 0, 0, 0, 0, {}};
122
123
+ static termios raw{0, 0, 0, 0, 0, {}, 0, 0};
124
125
if(tcgetattr(fd, &raw) == -1) { throw Term::Exception("tcgetattr() failed"); }
126
// Put terminal in raw mode
127
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
0 commit comments