]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_flash.c
ncurses 5.7 - patch 20100116
[ncurses.git] / ncurses / base / lib_flash.c
index eb6fa6540d2bceb5bb990b40034c11e3ac5e64e7..03f11d923b6de3a539495fbd7c4d6dd15dac84d0 100644 (file)
  */
 
 #include <curses.priv.h>
-#include <term.h>              /* beep, flash */
 
-MODULE_ID("$Id: lib_flash.c,v 1.7 2009/02/15 00:35:15 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_flash.c,v 1.11 2009/10/24 22:02:14 tom Exp $")
 
 /*
  *     flash()
@@ -58,8 +61,11 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
 {
     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");
@@ -70,7 +76,7 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
        res = putp(bell);
        _nc_flush();
     }
-
+#endif
     returnCode(res);
 }