summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-02-12 13:59:34 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-02-12 15:12:53 +0400
commit25cd744af7218c33866dbdbd5ecf42fa142a1256 (patch)
tree1d344ee869d343282ce15de3f3d35c60455cec60
parent1cf6908fa77485f424f72afdb8881fff153e5e6c (diff)
downloadutil-linux-25cd744af7218c33866dbdbd5ecf42fa142a1256.tar.gz
Define missed macros
OXTABS, TTYDEF_OFLAG, CDISCARD and others
-rw-r--r--include/ttyutils.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/ttyutils.h b/include/ttyutils.h
index 4f2fd884..cf0d2b33 100644
--- a/include/ttyutils.h
+++ b/include/ttyutils.h
@@ -57,6 +57,39 @@ extern int get_terminal_name(int fd, const char **path, const char **name,
#define UL_TTY_KEEPCFLAGS (1 << 1)
#define UL_TTY_UTF8 (1 << 2)
+#ifndef OXTABS
+#ifdef XTABS /* SMI uses XTABS. */
+#define OXTABS XTABS
+#else
+#define OXTABS 0
+#endif
+#endif
+
+
+#ifndef TTYDEF_IFLAG
+#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
+#endif
+
+#ifndef TTYDEF_OFLAG
+#define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS)
+#endif
+
+#ifndef TTYDEF_LFLAG
+#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE | ECHOKE | ECHOCTL)
+#endif
+
+#ifndef TTYDEF_CFLAG
+#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
+#endif
+
+#ifndef CDISCARD
+#define CDISCARD CTRL('o')
+#endif
+
+#ifndef CREPRINT
+#define CREPRINT CTRL('r')
+#endif
+
static inline void reset_virtual_console(struct termios *tp, int flags)
{
/* Use defaults of <sys/ttydefaults.h> for base settings */