summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testTerminal.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-04-23 00:20:12 (GMT)
committerBrad King <brad.king@kitware.com>2006-04-23 00:20:12 (GMT)
commit071e26712c3d0075cdbbaac6259a105be00ddf30 (patch)
treefee70ae60d99d323080c0b3f62c99c7c38000bd8 /Source/kwsys/testTerminal.c
parentb663e221da5f765c9d77d9d30c253787263625e6 (diff)
downloadCMake-071e26712c3d0075cdbbaac6259a105be00ddf30.zip
CMake-071e26712c3d0075cdbbaac6259a105be00ddf30.tar.gz
CMake-071e26712c3d0075cdbbaac6259a105be00ddf30.tar.bz2
ENH: Adding 'Terminal' component to hold support routines for dealing with interactive terminals. Currently only a cfprintf function is provided to print color messages.
Diffstat (limited to 'Source/kwsys/testTerminal.c')
-rw-r--r--Source/kwsys/testTerminal.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/kwsys/testTerminal.c b/Source/kwsys/testTerminal.c
new file mode 100644
index 0000000..fc04bbc
--- /dev/null
+++ b/Source/kwsys/testTerminal.c
@@ -0,0 +1,31 @@
+/*=========================================================================
+
+ Program: KWSys - Kitware System Library
+ Module: $RCSfile$
+
+ Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#include "kwsysPrivate.h"
+#include KWSYS_HEADER(Terminal.h)
+
+/* Work-around CMake dependency scanning limitation. This must
+ duplicate the above list of headers. */
+#if 0
+# include "Terminal.h.in"
+#endif
+
+int main()
+{
+ kwsysTerminal_cfprintf(kwsysTerminal_Color_ForegroundYellow |
+ kwsysTerminal_Color_BackgroundBlue |
+ kwsysTerminal_Color_AssumeTTY,
+ stdout, "Hello %s!", "World");
+ fprintf(stdout, "\n");
+ return 0;
+}