main must return int.

This commit is contained in:
joerg 2012-01-20 17:05:53 +00:00
parent 867cfa52e1
commit c6ba63766a
2 changed files with 16 additions and 6 deletions

View file

@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.4 2005/12/29 20:27:14 joerg Exp $
$NetBSD: distinfo,v 1.5 2012/01/20 17:05:53 joerg Exp $
SHA1 (xworm102.tar.gz) = 452eca230e2ced215bce4e6211e36430d0ec20d2
RMD160 (xworm102.tar.gz) = 57370a5fe48791512434024c5da2dd2c2f7a7d7a
Size (xworm102.tar.gz) = 20415 bytes
SHA1 (patch-aa) = afdc57c408d1659d20bbb6c73e507df28619a7c7
SHA1 (patch-ab) = d5f67a435ec3ed96bb8a6b2ab5493b501a679016
SHA1 (patch-ab) = 7a03bf78102a8ea2377d652aaeecabb4a6e95975

View file

@ -1,14 +1,15 @@
$NetBSD: patch-ab,v 1.2 2005/12/29 20:27:14 joerg Exp $
$NetBSD: patch-ab,v 1.3 2012/01/20 17:05:53 joerg Exp $
--- xworm.c.orig 1997-05-07 16:25:57.000000000 +0000
+++ xworm.c
@@ -3,13 +3,20 @@
@@ -3,13 +3,21 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#include <sys/time.h>
+#endif
+#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <stdio.h>
@ -26,7 +27,16 @@ $NetBSD: patch-ab,v 1.2 2005/12/29 20:27:14 joerg Exp $
#define maxQ 5000 /* max queue */
#define NCOLORS 15 /* number of colours */
@@ -551,16 +558,24 @@ void AllocColours(void){
@@ -137,7 +145,7 @@ void vec_line(int,int,int,int);
int vec_wrline(char *,int,int,int);
int vec_wrlineX(char *,int,int,int,float);
-void main(int argc, char **argv) {
+int main(int argc, char **argv) {
memset(&timeout, 0, sizeof(struct timeval));
@@ -551,16 +559,24 @@ void AllocColours(void){
colormap = DefaultColormap(display, screen);
if (!XAllocColorCells(display, colormap, True, NULL, 0, pixels, npixels)) {
fprintf(stderr, "failed to allocate all %d colours\n", NCOLORS);
@ -60,7 +70,7 @@ $NetBSD: patch-ab,v 1.2 2005/12/29 20:27:14 joerg Exp $
}
Bool predproc (display,event,arg)
@@ -773,7 +788,7 @@ float rnd(int x) { /* This routine retur
@@ -773,7 +789,7 @@ float rnd(int x) { /* This routine retur
void rgrid(void){
FILE *fpg;
if ((fpg=fopen(gridfile,"rb")) == NULL) {