Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Try this on Linux as replacement:
#include <stdio.h>
#include <termios.h>
static struct termios old_term, new_term;
/* initialise new terminal i/o settings*/
static void initTermios(int echo)
{
tcgetattr(0, &old_term); /* grab old terminal i/o settings */
new_term = old_term; /* make new settings same as old settings */
new_term.c_lflag &= ~ICANON; /* disable buffered i/o */
new_term.c_lflag &= echo ? ECHO : ~ECHO; /* set echo mode */
tcsetattr(0, TCSANOW, &new_term); /* use these new terminal i/o settings now */
}
/* Restore old terminal i/o settings */
static void resetTermios(void)
{
tcsetattr(0, TCSANOW, &old_term);
}
/* Read 1 character - echo defines echo mode */
static char getch_(int echo)
{
char ch;
initTermios(echo);
ch = getchar();
resetTermios();
return ch;
} -
If you're on Windows 10, you can use WSL to use the gcc compiler. That's what I do
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
Making projects with C on a Windows Machine in College - Works Perfectly
Trying them on my Linux machine at home - errors on 20 lines
rant
linux
gnu
windows
c