Skip to content

Commit ae328e2

Browse files
committed
Clean
1 parent 7c4be25 commit ae328e2

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

cpp-terminal/platforms/terminal.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ void Term::Terminal::store_and_restore()
7575
enabled = false;
7676
}
7777
#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
78+
static termios orig_termios;
8379
if(!enabled)
8480
{
8581
int fd{open("/dev/tty", O_RDWR, O_NOCTTY)};
@@ -117,11 +113,7 @@ void Term::Terminal::setRawMode()
117113
int fd{open("/dev/tty", O_RDWR, O_NOCTTY)};
118114
if(fd >= 0)
119115
{
120-
#if defined(__mips__) || defined(__mips) || defined(__MIPS__)
121-
static termios raw{0, 0, 0, 0, 0, {}};
122-
#else
123-
static termios raw{0, 0, 0, 0, 0, {}, 0, 0};
124-
#endif
116+
termios raw;
125117
if(tcgetattr(fd, &raw) == -1) { throw Term::Exception("tcgetattr() failed"); }
126118
// Put terminal in raw mode
127119
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);

0 commit comments

Comments
 (0)