summaryrefslogtreecommitdiff
path: root/xd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xd.c')
-rw-r--r--xd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xd.c b/xd.c
index c64251c..fe4dcc7 100644
--- a/xd.c
+++ b/xd.c
@@ -30,6 +30,9 @@ static const char id[]="$Id$";
#include <ctype.h>
#include <math.h>
#include <errno.h>
+#include <time.h>
+
+#include <unistd.h>
#include <X11/X.h>
#include <X11/Xlib.h>
@@ -286,7 +289,7 @@ static unsigned long blue;
static int mouse_x;
static int mouse_y;
-static int mouse_b;
+static unsigned int mouse_b;
static double sintab[3600];
static double costab[3600];
@@ -1830,8 +1833,8 @@ static void TunnelDemo(void)
for(f=0;f<points;f++)
{
- new->x[f]=(RND(radius>>1)+radius>>1)*si[f];
- new->y[f]=(RND(radius>>1)+radius>>1)*co[f];
+ new->x[f]=(RND(radius/2)+radius/2)*si[f];
+ new->y[f]=(RND(radius/2)+radius/2)*co[f];
}
new->r=radius;