-
Notifications
You must be signed in to change notification settings - Fork 1
/
tsettings.c
25 lines (22 loc) · 1.1 KB
/
tsettings.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tsettings.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ahamdaou <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/10 22:05:35 by ahamdaou #+# #+# */
/* Updated: 2021/11/10 22:05:35 by ahamdaou ### ########.fr */
/* */
/* ************************************************************************** */
#include "errors.h"
struct termios *get_saved_tsettings(void)
{
static struct termios *tsettings;
if (!tsettings)
{
tsettings = (struct termios *)xmalloc(sizeof(struct termios));
tcgetattr(0, tsettings);
}
return (tsettings);
}