Added return from main as warning suppression. Of course, this _adds_ a

warning under Borland. (sigh)
This commit is contained in:
William McBrine
2006-02-16 07:29:09 +00:00
parent 10f77b82ac
commit f78ce3db72
2 changed files with 6 additions and 22 deletions

View File

@@ -1,18 +1,10 @@
/* $Id: rain.c,v 1.1 2006/02/16 06:11:39 wmcbrine Exp $ */
/* $Id: rain.c,v 1.2 2006/02/16 07:29:09 wmcbrine Exp $ */
#include <curses.h>
#include <signal.h>
#include <stdlib.h>
/* rain 11/3/1980 EPS/CITHEP */
static void onsig(int n)
{
curs_set(1);
endwin();
exit(EXIT_FAILURE);
}
static float ranf(void)
{
long r = (rand() & 077777);
@@ -47,10 +39,6 @@ int main(int argc, char *argv[])
float r;
float c;
for (j = SIGHUP; j <= SIGTERM; j++)
if (signal(j, SIG_IGN) != SIG_IGN)
signal(j, onsig);
#ifdef XCURSES
Xinitscr(argc, argv);
#else
@@ -140,4 +128,6 @@ int main(int argc, char *argv[])
}
napms(50);
}
return EXIT_SUCCESS; /* unreachable */
}

View File

@@ -34,11 +34,10 @@ Options:
traces will be dumped. The program stops and waits for one character of
input at the beginning and end of the interval.
$Id: worm.c,v 1.1 2006/02/16 06:11:39 wmcbrine Exp $
$Id: worm.c,v 1.2 2006/02/16 07:29:09 wmcbrine Exp $
*/
#include <curses.h>
#include <signal.h>
#include <stdlib.h>
static chtype flavor[] = {
@@ -115,12 +114,6 @@ static void cleanup(void)
endwin();
}
static void onsig(int sig)
{
cleanup();
exit(EXIT_FAILURE);
}
static float ranf(void)
{
long r = (rand() & 077777);
@@ -189,7 +182,6 @@ int main(int argc, char *argv[])
}
}
signal(SIGINT, onsig);
#ifdef XCURSES
Xinitscr(argc, argv);
#else
@@ -437,4 +429,6 @@ int main(int argc, char *argv[])
napms(10);
refresh();
}
return EXIT_SUCCESS; /* unreachable */
}