blob: 60ce5920b20e4d563bd178bf6ce6f485d57977d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
* details. If they are missing then this copy is in violation of *
* the copyright conditions. */
/*
* beep.c
*
* Routines beep() and flash()
*
*/
#include "curses.priv.h"
#include "terminfo.h"
/*
* beep()
*
* Sound the current terminal's audible bell if it has one. If not,
* flash the screen if possible.
*
*/
int beep()
{
T(("beep() called"));
/* should make sure that we are not in altchar mode */
if (bell)
return(putp(bell));
else if (flash_screen)
return(putp(flash_screen));
else
return(ERR);
}
/*
* flash()
*
* Flash the current terminal's screen if possible. If not,
* sound the audible bell if one exists.
*
*/
int flash()
{
T(("flash() called"));
/* should make sure that we are not in altchar mode */
if (flash_screen)
return(putp(flash_screen));
else if (bell)
return(putp(bell));
else
return(ERR);
}
|