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
* Revision: $Revision: 1.1 $
12
* Change Log
13
* $Log: tty_functions.h,v $
14
* Revision 1.1 2016/03/17 16:02:02 pngwen
15
* Initial revision
16
*
17
*/
18
19
/* This file contains an additional function written by Robert Lowe
20
[email protected] */
21
22
/* Header file for Listing 62-3 */
23
24
/* tty_functions.h
25
26
Header file for tty_functions.c.
27
*/
28
#ifndef TTY_FUNCTIONS_H
29
#define TTY_FUNCTIONS_H
30
31
#include <termios.h>
32
33
int ttySetCbreak(int fd, struct termios *prevTermios);
34
35
int ttySetRaw(int fd, struct termios *prevTermios);
36
37
/* the following segment was added by Robert Lowe */
38
typedef struct {
39
int rows;
40
int cols;
41
} ttySize;
42
43
ttySize ttyGetSize(int fd);
44
#endif
45
46