BRL-CAD
libtermio.h
Go to the documentation of this file.
1/* L I B T E R M I O . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @addtogroup libtermio
21 *
22 * @brief
23 * Externs for the BRL-CAD library LIBTERMIO
24 *
25 */
26/** @{ */
27/** @file libtermio.h */
28
29#ifndef LIBTERMIO_H
30#define LIBTERMIO_H
31
32#include "common.h"
33
34#if defined(HAVE_TERMIOS_H)
35# undef SYSV
36# undef BSD
37# include <termios.h>
38#else /* !defined(HAVE_TERMIOS_H) */
39# ifdef SYSV
40# undef BSD
41# include <termio.h>
42# include <memory.h>
43# endif /* SYSV */
44# ifdef BSD
45# undef SYSV
46# include <sys/ioctl.h>
47# endif /* BSD */
48#endif /* HAVE_TERMIOS_H */
49
50#ifndef TERMIO_EXPORT
51# if defined(TERMIO_DLL_EXPORTS) && defined(TERMIO_DLL_IMPORTS)
52# error "Only TERMIO_DLL_EXPORTS or TERMIO_DLL_IMPORTS can be defined, not both."
53# elif defined(TERMIO_DLL_EXPORTS)
54# define TERMIO_EXPORT COMPILER_DLLEXPORT
55# elif defined(TERMIO_DLL_IMPORTS)
56# define TERMIO_EXPORT COMPILER_DLLIMPORT
57# else
58# define TERMIO_EXPORT
59# endif
60#endif
61
62__BEGIN_DECLS
63
64void clr_Cbreak(int fd);
65TERMIO_EXPORT void set_Cbreak(int fd);
66void clr_Raw(int fd);
67TERMIO_EXPORT void set_Raw(int fd);
68void set_Echo(int fd);
69TERMIO_EXPORT void clr_Echo(int fd);
70void set_Tabs(int fd);
71void clr_Tabs(int fd);
72void set_HUPCL(int fd);
73void clr_CRNL(int fd);
74unsigned short get_O_Speed(int fd);
75TERMIO_EXPORT void save_Tty(int fd);
76TERMIO_EXPORT void reset_Tty(int fd);
77int save_Fil_Stat(int fd);
78int reset_Fil_Stat(int fd);
79int set_O_NDELAY(int fd);
81 char *msg,
82#if defined(BSD)
83 struct sgttyb *tio_ptr
84#elif defined(SYSV)
85 struct termio *tio_ptr
86#elif defined(HAVE_TERMIOS_H)
87 struct termios *tio_ptr
88#else
89 void *tio_ptr
90#endif
91 );
92
93__END_DECLS
94
95#endif /* LIBTERMIO_H */
96
97/** @} */
98/*
99 * Local Variables:
100 * mode: C
101 * tab-width: 8
102 * indent-tabs-mode: t
103 * c-file-style: "stroustrup"
104 * End:
105 * ex: shiftwidth=4 tabstop=8
106 */
Header file for the BRL-CAD common definitions.
void save_Tty(int fd)
void set_Tabs(int fd)
void set_Raw(int fd)
unsigned short get_O_Speed(int fd)
void prnt_Tio(char *msg, void *tio_ptr)
void clr_Raw(int fd)
void set_Echo(int fd)
void clr_Echo(int fd)
int save_Fil_Stat(int fd)
void clr_Cbreak(int fd)
int set_O_NDELAY(int fd)
void clr_CRNL(int fd)
void clr_Tabs(int fd)
void reset_Tty(int fd)
void set_Cbreak(int fd)
void set_HUPCL(int fd)
int reset_Fil_Stat(int fd)