diff options
| author | Ian C <ianc@noddybox.co.uk> | 2017-05-17 19:57:35 +0000 | 
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2017-05-17 19:57:35 +0000 | 
| commit | a064278450e1daad1dfd4fee036d5d97ecd133ee (patch) | |
| tree | 30e4e153c1fc58417d0e379007a3c6564171d182 | |
| parent | 580a032202eed9ae2f31b3e57c707484a0a097d4 (diff) | |
Fixed compilation warnings and Makefile for FreeBSD.
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | xd.c | 9 | 
2 files changed, 8 insertions, 5 deletions
| @@ -29,9 +29,9 @@ HEADERS	=  OBJECTS	=	$(SOURCES:.c=.o) -LIBS	=	-lX11 -lm +LIBS	=	-L/usr/X11R6/lib -L/usr/local/lib -lX11 -lm -FLAGS	=	-g -I/usr/X11R6/include -L/usr/X11R6/lib +CFLAGS	=	-g -I/usr/X11R6/include -I/usr/local/include  $(TARGET): $(OBJECTS)  	$(CC) $(FLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) @@ -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; | 
