]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_options.c
ncurses 5.3
[ncurses.git] / ncurses / tinfo / lib_options.c
index b58602af72bbec024892408cc4fa5874406222d7..05bd47685dd617543bd937d9f086667d24d9da7d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998,1999,2000,2001,2002 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,9 +42,9 @@
 
 #include <term.h>
 
 
 #include <term.h>
 
-MODULE_ID("$Id: lib_options.c,v 1.39 2000/03/12 00:19:11 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.46 2002/02/02 19:40:54 tom Exp $")
 
 
-int
+NCURSES_EXPORT(int)
 idlok(WINDOW *win, bool flag)
 {
     T((T_CALLED("idlok(%p,%d)"), win, flag));
 idlok(WINDOW *win, bool flag)
 {
     T((T_CALLED("idlok(%p,%d)"), win, flag));
@@ -56,7 +56,7 @@ idlok(WINDOW *win, bool flag)
        returnCode(ERR);
 }
 
        returnCode(ERR);
 }
 
-void
+NCURSES_EXPORT(void)
 idcok(WINDOW *win, bool flag)
 {
     T((T_CALLED("idcok(%p,%d)"), win, flag));
 idcok(WINDOW *win, bool flag)
 {
     T((T_CALLED("idcok(%p,%d)"), win, flag));
@@ -67,7 +67,7 @@ idcok(WINDOW *win, bool flag)
     returnVoid;
 }
 
     returnVoid;
 }
 
-int
+NCURSES_EXPORT(int)
 halfdelay(int t)
 {
     T((T_CALLED("halfdelay(%d)"), t));
 halfdelay(int t)
 {
     T((T_CALLED("halfdelay(%d)"), t));
@@ -80,7 +80,7 @@ halfdelay(int t)
     returnCode(OK);
 }
 
     returnCode(OK);
 }
 
-int
+NCURSES_EXPORT(int)
 nodelay(WINDOW *win, bool flag)
 {
     T((T_CALLED("nodelay(%p,%d)"), win, flag));
 nodelay(WINDOW *win, bool flag)
 {
     T((T_CALLED("nodelay(%p,%d)"), win, flag));
@@ -95,7 +95,7 @@ nodelay(WINDOW *win, bool flag)
        returnCode(ERR);
 }
 
        returnCode(ERR);
 }
 
-int
+NCURSES_EXPORT(int)
 notimeout(WINDOW *win, bool f)
 {
     T((T_CALLED("notimout(%p,%d)"), win, f));
 notimeout(WINDOW *win, bool f)
 {
     T((T_CALLED("notimout(%p,%d)"), win, f));
@@ -107,7 +107,7 @@ notimeout(WINDOW *win, bool f)
        returnCode(ERR);
 }
 
        returnCode(ERR);
 }
 
-void
+NCURSES_EXPORT(void)
 wtimeout(WINDOW *win, int delay)
 {
     T((T_CALLED("wtimeout(%p,%d)"), win, delay));
 wtimeout(WINDOW *win, int delay)
 {
     T((T_CALLED("wtimeout(%p,%d)"), win, delay));
@@ -115,9 +115,10 @@ wtimeout(WINDOW *win, int delay)
     if (win) {
        win->_delay = delay;
     }
     if (win) {
        win->_delay = delay;
     }
+    returnVoid;
 }
 
 }
 
-int
+NCURSES_EXPORT(int)
 keypad(WINDOW *win, bool flag)
 {
     T((T_CALLED("keypad(%p,%d)"), win, flag));
 keypad(WINDOW *win, bool flag)
 {
     T((T_CALLED("keypad(%p,%d)"), win, flag));
@@ -129,7 +130,7 @@ keypad(WINDOW *win, bool flag)
        returnCode(ERR);
 }
 
        returnCode(ERR);
 }
 
-int
+NCURSES_EXPORT(int)
 meta(WINDOW *win GCC_UNUSED, bool flag)
 {
     /* Ok, we stay relaxed and don't signal an error if win is NULL */
 meta(WINDOW *win GCC_UNUSED, bool flag)
 {
     /* Ok, we stay relaxed and don't signal an error if win is NULL */
@@ -149,7 +150,7 @@ meta(WINDOW *win GCC_UNUSED, bool flag)
 
 /* curs_set() moved here to narrow the kernel interface */
 
 
 /* curs_set() moved here to narrow the kernel interface */
 
-int
+NCURSES_EXPORT(int)
 curs_set(int vis)
 {
     int cursor = SP->_cursor;
 curs_set(int vis)
 {
     int cursor = SP->_cursor;
@@ -191,7 +192,7 @@ curs_set(int vis)
     returnCode(cursor == -1 ? 1 : cursor);
 }
 
     returnCode(cursor == -1 ? 1 : cursor);
 }
 
-int
+NCURSES_EXPORT(int)
 typeahead(int fd)
 {
     T((T_CALLED("typeahead(%d)"), fd));
 typeahead(int fd)
 {
     T((T_CALLED("typeahead(%d)"), fd));
@@ -206,7 +207,7 @@ typeahead(int fd)
 **
 */
 
 **
 */
 
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
 static int
 has_key_internal(int keycode, struct tries *tp)
 {
 static int
 has_key_internal(int keycode, struct tries *tp)
 {
@@ -216,10 +217,10 @@ has_key_internal(int keycode, struct tries *tp)
        return (TRUE);
     else
        return (has_key_internal(keycode, tp->child)
        return (TRUE);
     else
        return (has_key_internal(keycode, tp->child)
-           || has_key_internal(keycode, tp->sibling));
+               || has_key_internal(keycode, tp->sibling));
 }
 
 }
 
-int
+NCURSES_EXPORT(int)
 has_key(int keycode)
 {
     T((T_CALLED("has_key(%d)"), keycode));
 has_key(int keycode)
 {
     T((T_CALLED("has_key(%d)"), keycode));
@@ -234,7 +235,7 @@ has_key(int keycode)
  * flush, then the next wgetch may get the escape sequence that corresponds to
  * the terminal state _before_ switching modes.
  */
  * flush, then the next wgetch may get the escape sequence that corresponds to
  * the terminal state _before_ switching modes.
  */
-int
+NCURSES_EXPORT(int)
 _nc_keypad(bool flag)
 {
     if (flag && keypad_xmit) {
 _nc_keypad(bool flag)
 {
     if (flag && keypad_xmit) {
@@ -251,5 +252,6 @@ _nc_keypad(bool flag)
        _nc_init_keytry();
        SP->_tried = TRUE;
     }
        _nc_init_keytry();
        SP->_tried = TRUE;
     }
+    SP->_keypad_on = flag;
     return (OK);
 }
     return (OK);
 }