File: set_term_timing.c

package info (click to toggle)
haskell-vty-unix 0.2.0.0-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: haskell: 1,748; ansic: 30; makefile: 5
file content (13 lines) | stat: -rw-r--r-- 278 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

void vty_set_term_timing(int fd, int vmin, int vtime)
{
    struct termios trm;
    tcgetattr(fd, &trm);
    trm.c_cc[VMIN] = vmin;
    trm.c_cc[VTIME] = vtime;
    tcsetattr(fd, TCSANOW, &trm);
}