GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
intr_char.c
Go to the documentation of this file.
1
#include <grass/gis.h>
2
3
#include <grass/config.h>
4
#ifndef __MINGW32__
5
#if defined(HAVE_TERMIOS_H)
6
# include <termios.h>
7
# define TYPE termios
8
# define C c_cc[VINTR]
9
#elif defined(HAVE_TERMIO_H)
10
# include <termio.h>
11
# define TYPE termio
12
# define C c_cc[VINTR]
13
# define GET TCGETA
14
#else
15
# include <sgtty.h>
16
# define TYPE tchars
17
# define C t_intrc
18
# define GET TIOCGETC
19
#endif
20
#endif
21
33
char
G_intr_char
(
void
)
34
{
35
char
c = 0;
36
37
#ifndef __MINGW32__
38
struct
TYPE
buf;
39
40
#ifdef HAVE_TERMIOS_H
41
tcgetattr(2, &buf);
42
#else
43
ioctl(2,
GET
, &buf);
44
#endif
45
c = buf.C;
46
#endif
47
return
c;
48
}
G_intr_char
char G_intr_char(void)
return interrupt char
Definition:
intr_char.c:33
TYPE
#define TYPE
Definition:
intr_char.c:16
GET
#define GET
Definition:
intr_char.c:18
lib
gis
intr_char.c
Generated on Sat Jan 2 2016 01:46:48 for GRASS Programmer's Manual by
1.8.5