aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-28 22:14:10 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-01 11:43:38 -0700
commit2d8107cf054e83ebd7bb045e01ea0755ad65fa20 (patch)
treebd6218cd4e951872e4fef5b3f8a983184842331a
parent898bc8932dc080e14046402c1a510c1da15202ae (diff)
downloadsyslinux-2d8107cf054e83ebd7bb045e01ea0755ad65fa20.tar.gz
syslinux-2d8107cf054e83ebd7bb045e01ea0755ad65fa20.tar.xz
syslinux-2d8107cf054e83ebd7bb045e01ea0755ad65fa20.zip
cmenu: refactor beep function
Use \007 to make the system beep. Note "\007" works, but not '\007'. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
-rw-r--r--com32/cmenu/libmenu/com32io.c8
-rw-r--r--com32/cmenu/libmenu/com32io.h8
2 files changed, 6 insertions, 10 deletions
diff --git a/com32/cmenu/libmenu/com32io.c b/com32/cmenu/libmenu/com32io.c
index 7daf67a5..f59baebb 100644
--- a/com32/cmenu/libmenu/com32io.c
+++ b/com32/cmenu/libmenu/com32io.c
@@ -105,14 +105,6 @@ unsigned char sleep(unsigned int msec)
return REG_AH(outreg);
}
-void beep()
-{
- REG_AH(inreg) = 0x0E;
- REG_AL(inreg) = 0x07;
- REG_BH(inreg) = 0;
- __intcall(0x10, &inreg, &outreg);
-}
-
void scrollupwindow(char top, char left, char bot, char right, char attr,
char numlines)
{
diff --git a/com32/cmenu/libmenu/com32io.h b/com32/cmenu/libmenu/com32io.h
index 1d27cfb3..a73b9f3d 100644
--- a/com32/cmenu/libmenu/com32io.h
+++ b/com32/cmenu/libmenu/com32io.h
@@ -22,6 +22,12 @@
#define CSI "\e["
+/* Beep: "" are required, not '' */
+static inline beep()
+{
+ return fputs("\007", stdout);
+}
+
/* BIOS Assisted output routines */
void cswprint(const char *str, char attr, char left);
@@ -107,8 +113,6 @@ static inline char getvideomode(void) // Get the current video mode
unsigned char sleep(unsigned int msec); // Sleep for specified time
-void beep(); // A Bell
-
unsigned char checkkbdbuf(); // Check to see if there is kbd buffer is non-empty?
static inline void clearkbdbuf() // Clear the kbd buffer (how many chars removed?)