home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CURSES.LZH / BEEP.C < prev    next >
C/C++ Source or Header  |  1980-01-01  |  2KB  |  45 lines

  1. /****************************************************************/
  2. /*                                */
  3. /* Beep() and flash() routines of the PCcurses package        */
  4. /*                                */
  5. /****************************************************************/
  6. /* This version of curses is based on ncurses, a curses version    */
  7. /* originally written by Pavel Curtis at Cornell University.    */
  8. /* I have made substantial changes to make it run on IBM PC's,    */
  9. /* and therefore consider myself free to make it public domain.    */
  10. /*        Bjorn Larsson (...mcvax!enea!infovax!bl)    */
  11. /****************************************************************/
  12. /* 1.0:    Release:                    870515    */
  13. /* 1.2:    Rcsid[] string for maintenance:            881002    */
  14. /* 1.3:    MSC -W3, Turbo'C' -w -w-pro checkes:        881005    */
  15. /****************************************************************/
  16.  
  17. #include <curses.h>
  18. #include <curspriv.h>
  19.  
  20. char _curses_beep_rcsid[] = "@(#)beep.c v1.3 - 881005";
  21.  
  22. /****************************************************************/
  23. /* Beep() sounds the terminal bell.                */
  24. /****************************************************************/
  25.  
  26. void    beep()
  27.   {
  28.   _cursesputc('\007',0);
  29.   } /* beep */
  30.  
  31. /****************************************************************/
  32. /* Flash() flashes the terminal screen.                */
  33. /****************************************************************/
  34.  
  35. void    flash()
  36.   {
  37.   int i;
  38.  
  39.   _cursesscroll(0,0,LINES-1,COLS-1,0,0x70);
  40.   for (i=0;i<10000;)
  41.     i++;
  42.   _cursesscroll(0,0,LINES-1,COLS-1,0,0x0);
  43.   wrefresh(curscr);
  44.   } /* flash */
  45.