From cddaa9cc9f4ab9c20bacd485f42ea334fc0ec948 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Thu, 20 Jan 2005 06:23:18 +0000
Subject: [PATCH] Requires xpbeep.h for BEEP macro

---
 src/conio/cterm.c    | 3 ++-
 src/sbbs3/sbbsdefs.h | 1 +
 src/sbbs3/sexyz.c    | 1 +
 src/stp/stp.c        | 1 +
 src/tone/tone.c      | 3 ++-
 5 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/conio/cterm.c b/src/conio/cterm.c
index 4f118c1e5b..555ca347b3 100644
--- a/src/conio/cterm.c
+++ b/src/conio/cterm.c
@@ -36,6 +36,7 @@
 
 #include <genwrap.h>
 #include <ciolib.h>
+#include <xpbeep.h>
 #include <keys.h>
 
 #include "cterm.h"
@@ -169,7 +170,7 @@ void playnote(int notenum, int notelen, int dotted)
 			break;
 	}
 	duration-=pauselen;
-	BEEP((note_frequency[notenum]+500)/1000,duration);
+	BEEP(((double)note_frequency[notenum])/1000,duration);
 	SLEEP(pauselen);
 }
 
diff --git a/src/sbbs3/sbbsdefs.h b/src/sbbs3/sbbsdefs.h
index a1d8f3bd73..d816fe68fc 100644
--- a/src/sbbs3/sbbsdefs.h
+++ b/src/sbbs3/sbbsdefs.h
@@ -43,6 +43,7 @@
 #include "gen_defs.h"	/* uchar, ushort, uint, ulong, etc. */
 #include "nodedefs.h"	/* node_t */
 #include "fidodefs.h"	/* fmsghdr_t, fpkthdr_t, FIDO_*, etc. */
+#include "xpbeep.h"		/* BEEP() */
 
 /*************/
 /* Constants */
diff --git a/src/sbbs3/sexyz.c b/src/sbbs3/sexyz.c
index 58cd098d32..9aef36703a 100644
--- a/src/sbbs3/sexyz.c
+++ b/src/sbbs3/sexyz.c
@@ -62,6 +62,7 @@
 #include "ini_file.h"
 #include "eventwrap.h"
 #include "threadwrap.h"
+#include "xpbeep.h"
 
 /* sbbs */
 #include "ringbuf.h"
diff --git a/src/stp/stp.c b/src/stp/stp.c
index be3e7039b5..80e2de8f09 100644
--- a/src/stp/stp.c
+++ b/src/stp/stp.c
@@ -48,6 +48,7 @@
 #include <stdarg.h>
 #include <sys/stat.h>
 
+#include "xpbeep.h"
 #include "conwrap.h"
 #include "genwrap.h"
 #include "dirwrap.h"
diff --git a/src/tone/tone.c b/src/tone/tone.c
index 8f50631410..59c09cdd8a 100644
--- a/src/tone/tone.c
+++ b/src/tone/tone.c
@@ -41,7 +41,8 @@
 #include <stdlib.h>
 #include <ctype.h>
 
-#include "genwrap.h"	/* BEEP */
+#include "xpbeep.h"	/* BEEP */
+#include "genwrap.h"
 #include "dirwrap.h"	/* getfname */
 #include "conwrap.h"	/* kbhit */
 
-- 
GitLab