home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 332_01 / beep.c < prev    next >
C/C++ Source or Header  |  1990-01-06  |  2KB  |  47 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 (bl@infovox.se)    */
  11. /****************************************************************/
  12. /* 1.4:  Use short wherever possible. Portability        */
  13. /*     improvements:                    900114    */
  14. /* 1.3:     MSC -W3, Turbo'C' -w -w-pro checkes:        881005    */
  15. /* 1.2:     Rcsid[] string for maintenance:        881002    */
  16. /* 1.0:     Release:                    870515    */
  17. /****************************************************************/
  18.  
  19. #include <curses.h>
  20. #include <curspriv.h>
  21.  
  22. char _curses_beep_rcsid[] = "@(#)beep.c       v.1.4  - 900114";
  23.  
  24. /****************************************************************/
  25. /* Beep() sounds the terminal bell.                */
  26. /****************************************************************/
  27.  
  28. void    beep()
  29.   {
  30.   _cursesputc('\007',0);
  31.   } /* beep */
  32.  
  33. /****************************************************************/
  34. /* Flash() flashes the terminal screen.                */
  35. /****************************************************************/
  36.  
  37. void    flash()
  38.   {
  39.   short i;
  40.  
  41.   _cursesscroll(0,0,LINES-1,COLS-1,0,0x70);
  42.   for (i=0;i<10000;)
  43.     i++;
  44.   _cursesscroll(0,0,LINES-1,COLS-1,0,0x0);
  45.   wrefresh(curscr);
  46.   } /* flash */
  47.