]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/comp_parse.c
ncurses 4.2
[ncurses.git] / ncurses / comp_parse.c
index 45e347a28b84e530e1c22cc85d176cc23f4630e9..1b7ae1e8bb0976a00dd7eee3ccffa7467ec7f652 100644 (file)
@@ -1,23 +1,35 @@
+/****************************************************************************
+ * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ *                                                                          *
+ * Permission is hereby granted, free of charge, to any person obtaining a  *
+ * copy of this software and associated documentation files (the            *
+ * "Software"), to deal in the Software without restriction, including      *
+ * without limitation the rights to use, copy, modify, merge, publish,      *
+ * distribute, distribute with modifications, sublicense, and/or sell       *
+ * copies of the Software, and to permit persons to whom the Software is    *
+ * furnished to do so, subject to the following conditions:                 *
+ *                                                                          *
+ * The above copyright notice and this permission notice shall be included  *
+ * in all copies or substantial portions of the Software.                   *
+ *                                                                          *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+ *                                                                          *
+ * Except as contained in this notice, the name(s) of the above copyright   *
+ * holders shall not be used in advertising or otherwise to promote the     *
+ * sale, use or other dealings in this Software without prior written       *
+ * authorization.                                                           *
+ ****************************************************************************/
 
-/***************************************************************************
-*                            COPYRIGHT NOTICE                              *
-****************************************************************************
-*                ncurses is copyright (C) 1992-1995                        *
-*                          Zeyd M. Ben-Halim                               *
-*                          zmbenhal@netcom.com                             *
-*                          Eric S. Raymond                                 *
-*                          esr@snark.thyrsus.com                           *
-*                                                                          *
-*        Permission is hereby granted to reproduce and distribute ncurses  *
-*        by any means and for any fee, whether alone or as part of a       *
-*        larger distribution, in source or in binary form, PROVIDED        *
-*        this notice is included with any such distribution, and is not    *
-*        removed from any of its header files. Mention of ncurses in any   *
-*        applications linked with it is highly appreciated.                *
-*                                                                          *
-*        ncurses comes AS IS with no warranty, implied or expressed.       *
-*                                                                          *
-***************************************************************************/
+/****************************************************************************
+ *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
+ *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
+ ****************************************************************************/
 
 
 
@@ -43,7 +55,7 @@
 #include <term.h>
 #include <term_entry.h>
 
-MODULE_ID("$Id: comp_parse.c,v 1.18 1996/12/21 14:24:06 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.21 1998/02/11 12:14:00 tom Exp $")
 
 static void sanity_check(TERMTYPE *);
 
@@ -487,6 +499,30 @@ static void sanity_check(TERMTYPE *tp)
      ANDMISSING(label_off,                   label_on)
      PAIRED(display_clock,                   remove_clock)
      ANDMISSING(set_color_pair,              initialize_pair)
+
+     /* Some checks that we should make, but don't want to confuse people
+      * with.  Put those under the tic -v option so we can still get them.
+      */
+     if (_nc_tracing) {
+
+       /*
+        * From XSI & O'Reilly, we gather that sc/rc are required if csr is
+        * given, because the cursor position after the scrolling operation is
+        * performed is undefined.
+        */
+         ANDMISSING(change_scroll_region,        save_cursor)
+         ANDMISSING(change_scroll_region,        restore_cursor)
+
+         /*
+         * Some non-curses applications (e.g., jove) get confused if we have
+         * both ich/ich1 and smir/rmir.  Let's be nice and warn about that,
+         * too, even though ncurses handles it.
+          */
+         if ((PRESENT(enter_insert_mode) || PRESENT(exit_insert_mode))
+          && (PRESENT(insert_character)  || PRESENT(parm_ich))) {
+           _nc_warning("non-curses applications may be confused by ich/ich1 with smir/rmir");
+         }
+     }
 #undef PAIRED
 #undef ANDMISSING
 }