96 lines
2.3 KiB
Diff
96 lines
2.3 KiB
Diff
diff --git astro.c astro.c
|
|
index 1fbff03..a98c8a3 100644
|
|
--- astro.c
|
|
+++ astro.c
|
|
@@ -26,6 +26,7 @@
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
#include <math.h>
|
|
#include <time.h>
|
|
|
|
diff --git astro.h astro.h
|
|
index 8923520..1719ccc 100644
|
|
--- astro.h
|
|
+++ astro.h
|
|
@@ -43,4 +43,4 @@ extern void phasehunt2( double sdate, double phases[2], double which[2] );
|
|
*/
|
|
extern double phase( double pdate, double* pphase, double* mage, double* dist, double* angdia, double* sudist, double* suangdia );
|
|
|
|
-#endif _ASTRO_H_
|
|
+#endif
|
|
diff --git date_parse.c date_parse.c
|
|
index 3ccfbee..0c665a0 100644
|
|
--- date_parse.c
|
|
+++ date_parse.c
|
|
@@ -334,7 +334,7 @@ date_parse( char* str )
|
|
** non-portability, and it's only used for local times that don't
|
|
** specify a zone - those don't occur in email and netnews.
|
|
*/
|
|
-#ifdef OS_SYSV
|
|
+#if defined(OS_SYSV) || defined(__linux)
|
|
tzset();
|
|
gmtoff = -timezone;
|
|
#else /* OS_SYSV */
|
|
diff --git phoon.c phoon.c
|
|
index 6b68465..05cdfae 100644
|
|
--- phoon.c
|
|
+++ phoon.c
|
|
@@ -218,7 +218,7 @@ putmoon( time_t t, int numlines, char* atfiller )
|
|
" `-. / . . .-' ",
|
|
" `--. . .--' ",
|
|
" `------------' "};
|
|
-
|
|
+
|
|
static char background24[24][49] = {
|
|
" .------------. ",
|
|
" .---' o . . `---. ",
|
|
@@ -510,19 +510,19 @@ main( int argc, char** argv )
|
|
if ( argv[argn][1] != 'l' || argv[argn][2] != '\0' )
|
|
{
|
|
fprintf( stderr, usage, argv[0] );
|
|
- exit( 1 );
|
|
+ return 1;
|
|
}
|
|
else
|
|
{
|
|
if ( argc - argn < 2 )
|
|
{
|
|
fprintf( stderr, usage, argv[0] );
|
|
- exit( 1 );
|
|
+ return 1;
|
|
}
|
|
if ( sscanf( argv[argn + 1], "%d", &numlines ) != 1 )
|
|
{
|
|
fprintf( stderr, usage, argv[0] );
|
|
- exit( 1 );
|
|
+ return 1;
|
|
}
|
|
argn += 2;
|
|
}
|
|
@@ -553,14 +553,14 @@ main( int argc, char** argv )
|
|
if ( t <= 0 )
|
|
{
|
|
fprintf( stderr, "illegal date/time: %s\n", buf );
|
|
- exit( 1 );
|
|
+ return 1;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Too many args! */
|
|
fprintf( stderr, usage, argv[0] );
|
|
- exit( 1 );
|
|
+ return 1;
|
|
}
|
|
|
|
/* Pseudo-randomly decide what the moon is made of, and print it. */
|
|
@@ -570,5 +570,5 @@ main( int argc, char** argv )
|
|
putmoon( t, numlines, "@" );
|
|
|
|
/* All done. */
|
|
- exit( 0 );
|
|
+ return 0;
|
|
}
|