aboutsummaryrefslogtreecommitdiffstats
path: root/src/termios_wrapper.c
blob: 6a752e8d5f1694de0f3a42674cc30e773276eada (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <termios.h>

int cooked()
{
}

int cbreak()
{
}

int raw()
{
}

int echo(int enabled)
{
    struct termios t;

    if (tcgetattr(0, &t) == -1) {
        return 0;
    }

    if (enabled) {
        t.c_lflag |= ECHO;
    }
    else {
        t.c_lflag &= ~ECHO;
    }

    return tcsetattr(0, TCSANOW, &t) == 0;
}

int crlf(int enabled)
{
}