]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_flash.c
ncurses 5.7 - patch 20100327
[ncurses.git] / ncurses / base / lib_flash.c
index 68fea1349d7a42934e3a3de08e0d5db5683cb6fe..03f11d923b6de3a539495fbd7c4d6dd15dac84d0 100644 (file)
  */
 
 #include <curses.priv.h>
  */
 
 #include <curses.priv.h>
-#include <term.h>              /* beep, flash */
 
 #ifndef CUR
 
 #ifndef CUR
-#define CUR SP_TERMTYPE 
+#define CUR SP_TERMTYPE
 #endif
 
 #endif
 
-MODULE_ID("$Id: lib_flash.c,v 1.9 2009/05/10 00:48:29 tom Exp $")
+MODULE_ID("$Id: lib_flash.c,v 1.11 2009/10/24 22:02:14 tom Exp $")
 
 /*
  *     flash()
 
 /*
  *     flash()
@@ -62,8 +61,11 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
 {
     int res = ERR;
 
 {
     int res = ERR;
 
-    T((T_CALLED("flash()")));
-
+    T((T_CALLED("flash(%p)"), (void *) SP_PARM));
+#ifdef USE_TERM_DRIVER
+    if (SP_PARM != 0)
+       res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
+#else
     /* FIXME: should make sure that we are not in altchar mode */
     if (flash_screen) {
        TPUTS_TRACE("flash_screen");
     /* FIXME: should make sure that we are not in altchar mode */
     if (flash_screen) {
        TPUTS_TRACE("flash_screen");
@@ -74,7 +76,7 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
        res = putp(bell);
        _nc_flush();
     }
        res = putp(bell);
        _nc_flush();
     }
-
+#endif
     returnCode(res);
 }
 
     returnCode(res);
 }