Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
/*************************************************************************\
2
* Copyright (C) Michael Kerrisk, 2015. *
3
* *
4
* This program is free software. You may use, modify, and redistribute it *
5
* under the terms of the GNU Lesser General Public License as published *
6
* by the Free Software Foundation, either version 3 or (at your option) *
7
* any later version. This program is distributed without any warranty. *
8
* See the files COPYING.lgpl-v3 and COPYING.gpl-v3 for details. *
9
\*************************************************************************/
10
11
/* This file contains an additional function written by Robert Lowe
12
[email protected] */
13
14
/* Header file for Listing 62-3 */
15
16
/* tty_functions.h
17
18
Header file for tty_functions.c.
19
*/
20
#ifndef TTY_FUNCTIONS_H
21
#define TTY_FUNCTIONS_H
22
23
#include <termios.h>
24
25
int ttySetCbreak(int fd, struct termios *prevTermios);
26
27
int ttySetRaw(int fd, struct termios *prevTermios);
28
29
/* the following segment was added by Robert Lowe */
30
typedef struct {
31
int rows;
32
int cols;
33
} ttySize;
34
35
ttySize ttyGetSize(int fd);
36
#endif
37
38