/* PDCurses */12#include <curspriv.h>34/*man-start**************************************************************56beep7----89### Synopsis1011int beep(void);12int flash(void);1314### Description1516beep() sounds the audible bell on the terminal, if possible; if not,17it calls flash().1819flash() "flashes" the screen, by inverting the foreground and20background of every cell, pausing, and then restoring the original21attributes.2223### Return Value2425These functions return ERR if called before initscr(), otherwise OK.2627### Portability28X/Open ncurses NetBSD29beep Y Y Y30flash Y Y Y3132**man-end****************************************************************/3334int beep(void)35{36PDC_LOG(("beep() - called\n"));3738if (!SP)39return ERR;4041if (SP->audible)42PDC_beep();43else44flash();4546return OK;47}4849int flash(void)50{51int z, y, x;5253PDC_LOG(("flash() - called\n"));5455if (!curscr)56return ERR;5758/* Reverse each cell; wait; restore the screen */5960for (z = 0; z < 2; z++)61{62for (y = 0; y < LINES; y++)63for (x = 0; x < COLS; x++)64curscr->_y[y][x] ^= A_REVERSE;6566wrefresh(curscr);6768if (!z)69napms(50);70}7172return OK;73}747576