From 04cde57a77609a2e8c8b2cc860737983584af630 Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Sun, 12 May 2002 15:08:37 +0000
Subject: [PATCH] Version 0.1.12 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 asterisk.h                 |  2 ++
 include/asterisk/options.h |  1 +
 include/asterisk/term.h    | 61 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100755 include/asterisk/term.h

diff --git a/asterisk.h b/asterisk.h
index 07106fbf6e..6af34dcf3d 100755
--- a/asterisk.h
+++ b/asterisk.h
@@ -40,4 +40,6 @@ extern int init_logger(void);
 extern int init_framer(void);
 /* Provided by logger.c */
 extern int reload_logger(void);
+/* Provided by term.c */
+extern int term_init(void);
 #endif
diff --git a/include/asterisk/options.h b/include/asterisk/options.h
index 375b216a18..56b23908c1 100755
--- a/include/asterisk/options.h
+++ b/include/asterisk/options.h
@@ -24,6 +24,7 @@ extern int option_nofork;
 extern int option_quiet;
 extern int option_console;
 extern int option_initcrypto;
+extern int option_nocolor;
 extern int fully_booted;
 extern char defaultlanguage[];
 
diff --git a/include/asterisk/term.h b/include/asterisk/term.h
new file mode 100755
index 0000000000..1b8f51eecd
--- /dev/null
+++ b/include/asterisk/term.h
@@ -0,0 +1,61 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Handy terminal functions for vt* terms
+ * 
+ * Copyright (C) 1999, Mark Spencer
+ *
+ * Mark Spencer <markster@linux-support.net>
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License
+ */
+
+#ifndef _ASTERISK_TERM_H
+#define _ASTERISK_TERM_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+#define ESC 0x1b
+#define ATTR_RESET	0
+#define ATTR_BRIGHT 1
+#define ATTR_DIM	2
+#define ATTR_UNDER	4
+#define ATTR_BLINK	5
+#define ATTR_REVER	7
+#define ATTR_HIDDEN 8
+
+#define COLOR_BLACK 	30
+#define COLOR_GRAY  	30 | 128
+#define COLOR_RED		31
+#define COLOR_BRRED		31 | 128
+#define COLOR_GREEN		32
+#define COLOR_BRGREEN	32 | 128
+#define COLOR_BROWN		33
+#define COLOR_YELLOW	33 | 128
+#define COLOR_BLUE		34 
+#define COLOR_BRBLUE	34 | 128
+#define COLOR_MAGENTA	35
+#define COLOR_BRMAGENTA 35 | 128
+#define COLOR_CYAN      36
+#define COLOR_BRCYAN    36 | 128
+#define COLOR_WHITE     37
+#define COLOR_BRWHITE   37 | 128
+
+extern char *term_color(char *outbuf, char *inbuf, int fgcolor, int bgcolor, int maxout);
+
+extern char *term_prompt(char *outbuf, char *inbuf, int maxout);
+
+extern char *term_prep(void);
+
+extern char *term_end(void);
+
+extern char *term_quit(void);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif
-- 
GitLab