From 64b566c942c42af78044827d9ebc1fc9d388351e Mon Sep 17 00:00:00 2001 From: adamw Date: Mon, 28 Jul 2014 13:03:29 +0000 Subject: Rename old-style patch-xy patches in astro to reflect what files they modify. --- astro/ephem/files/patch-Makefile | 18 ++++++ astro/ephem/files/patch-aa | 18 ------ astro/ephem/files/patch-ab | 19 ------ astro/ephem/files/patch-ac | 19 ------ astro/ephem/files/patch-ad | 99 ------------------------------ astro/ephem/files/patch-ae | 41 ------------- astro/ephem/files/patch-af | 59 ------------------ astro/ephem/files/patch-ag | 44 -------------- astro/ephem/files/patch-ah | 36 ----------- astro/ephem/files/patch-ai | 115 ----------------------------------- astro/ephem/files/patch-aj | 19 ------ astro/ephem/files/patch-compiler.c_2 | 19 ++++++ astro/ephem/files/patch-formats.c | 19 ++++++ astro/ephem/files/patch-io.c | 99 ++++++++++++++++++++++++++++++ astro/ephem/files/patch-listing.c | 41 +++++++++++++ astro/ephem/files/patch-main.c | 59 ++++++++++++++++++ astro/ephem/files/patch-objx.c | 44 ++++++++++++++ astro/ephem/files/patch-plot.c | 36 +++++++++++ astro/ephem/files/patch-time.c | 115 +++++++++++++++++++++++++++++++++++ astro/ephem/files/patch-version.c | 19 ++++++ 20 files changed, 469 insertions(+), 469 deletions(-) create mode 100644 astro/ephem/files/patch-Makefile delete mode 100644 astro/ephem/files/patch-aa delete mode 100644 astro/ephem/files/patch-ab delete mode 100644 astro/ephem/files/patch-ac delete mode 100644 astro/ephem/files/patch-ad delete mode 100644 astro/ephem/files/patch-ae delete mode 100644 astro/ephem/files/patch-af delete mode 100644 astro/ephem/files/patch-ag delete mode 100644 astro/ephem/files/patch-ah delete mode 100644 astro/ephem/files/patch-ai delete mode 100644 astro/ephem/files/patch-aj create mode 100644 astro/ephem/files/patch-compiler.c_2 create mode 100644 astro/ephem/files/patch-formats.c create mode 100644 astro/ephem/files/patch-io.c create mode 100644 astro/ephem/files/patch-listing.c create mode 100644 astro/ephem/files/patch-main.c create mode 100644 astro/ephem/files/patch-objx.c create mode 100644 astro/ephem/files/patch-plot.c create mode 100644 astro/ephem/files/patch-time.c create mode 100644 astro/ephem/files/patch-version.c (limited to 'astro/ephem') diff --git a/astro/ephem/files/patch-Makefile b/astro/ephem/files/patch-Makefile new file mode 100644 index 000000000000..fc428282aad2 --- /dev/null +++ b/astro/ephem/files/patch-Makefile @@ -0,0 +1,18 @@ +*** Makefile.orig Sat Mar 14 23:21:45 1992 +--- Makefile Fri Apr 25 12:30:57 1997 +*************** +*** 1,6 **** + # Makefile for ephem, v 4.28 + +! CFLAGS = -O + + EPHEM= aa_hadec.o altj.o altmenus.o anomaly.o cal_mjd.o circum.o comet.o \ + compiler.o constel.o eq_ecl.o flog.o formats.o io.o listing.o main.o \ +--- 1,7 ---- + # Makefile for ephem, v 4.28 + +! #CFLAGS = -O +! CFLAGS+= -DPREFIX=\"${PREFIX}\" + + EPHEM= aa_hadec.o altj.o altmenus.o anomaly.o cal_mjd.o circum.o comet.o \ + compiler.o constel.o eq_ecl.o flog.o formats.o io.o listing.o main.o \ diff --git a/astro/ephem/files/patch-aa b/astro/ephem/files/patch-aa deleted file mode 100644 index fc428282aad2..000000000000 --- a/astro/ephem/files/patch-aa +++ /dev/null @@ -1,18 +0,0 @@ -*** Makefile.orig Sat Mar 14 23:21:45 1992 ---- Makefile Fri Apr 25 12:30:57 1997 -*************** -*** 1,6 **** - # Makefile for ephem, v 4.28 - -! CFLAGS = -O - - EPHEM= aa_hadec.o altj.o altmenus.o anomaly.o cal_mjd.o circum.o comet.o \ - compiler.o constel.o eq_ecl.o flog.o formats.o io.o listing.o main.o \ ---- 1,7 ---- - # Makefile for ephem, v 4.28 - -! #CFLAGS = -O -! CFLAGS+= -DPREFIX=\"${PREFIX}\" - - EPHEM= aa_hadec.o altj.o altmenus.o anomaly.o cal_mjd.o circum.o comet.o \ - compiler.o constel.o eq_ecl.o flog.o formats.o io.o listing.o main.o \ diff --git a/astro/ephem/files/patch-ab b/astro/ephem/files/patch-ab deleted file mode 100644 index 10d6dd212b7c..000000000000 --- a/astro/ephem/files/patch-ab +++ /dev/null @@ -1,19 +0,0 @@ -*** compiler.c.orig Tue Apr 15 01:07:37 1997 ---- compiler.c Tue Apr 15 01:33:14 1997 -*************** -*** 9,15 **** - - #include - #include -! #ifdef VMS - #include - #endif - #include "screen.h" ---- 9,15 ---- - - #include - #include -! #if defined(VMS) || defined(unix) - #include - #endif - #include "screen.h" diff --git a/astro/ephem/files/patch-ac b/astro/ephem/files/patch-ac deleted file mode 100644 index da8e096589ce..000000000000 --- a/astro/ephem/files/patch-ac +++ /dev/null @@ -1,19 +0,0 @@ -*** formats.c.orig Tue Apr 15 01:07:37 1997 ---- formats.c Tue Apr 15 01:33:15 1997 -*************** -*** 5,11 **** - #include - #include - #include -! #ifdef VMS - #include - #endif - #include "astro.h" ---- 5,11 ---- - #include - #include - #include -! #if defined(VMS) || defined(unix) - #include - #endif - #include "astro.h" diff --git a/astro/ephem/files/patch-ad b/astro/ephem/files/patch-ad deleted file mode 100644 index 7fb411a1c962..000000000000 --- a/astro/ephem/files/patch-ad +++ /dev/null @@ -1,99 +0,0 @@ ---- io.c.orig Sat Mar 14 23:22:07 1992 -+++ io.c Sun Jan 21 20:46:00 2007 -@@ -28,6 +28,17 @@ - * need to #define VMS since it is inherent in the compiler. - */ - -+#include -+#include -+#include -+ -+static on_alrm(); -+static chk_arrow (register char c); -+static tload(); -+static char *egetstr (char *name, char **sptr); -+static setuptty(); -+ -+ - /* unless you are on VMS define one of these... */ - #define UNIX - /* #define TURBO_C */ -@@ -35,8 +46,8 @@ - /* then if you defined UNIX you must use one of these ways to do non-blocking - * tty reads - */ --#define USE_FIONREAD --/* #define USE_NDELAY */ -+/* #define USE_FIONREAD */ -+#define USE_NDELAY - /* #define USE_ATTSELECT */ - /* #define USE_BSDSELECT */ - -@@ -56,7 +67,7 @@ - #ifdef UNIX - #include - #ifdef USE_TERMIO --#include -+#include - #endif - #ifdef USE_SGTTY - #include -@@ -73,7 +84,7 @@ - static int tloaded; - static int ttysetup; - #ifdef USE_TERMIO --static struct termio orig_tio; -+static struct termios orig_tio; - #endif - #ifdef USE_SGTTY - static struct sgttyb orig_sgtty; -@@ -199,11 +210,19 @@ - seqa[0] = c; - if (l > 1) { - extern unsigned alarm(); -+ int ch_read, ch_expected, seqa_i; - /* cautiously read rest of arrow sequence */ - got_alrm = 0; - (void) signal (SIGALRM, on_alrm); - alarm(2); -- read (0, seqa+1, l-1); -+ /* to make the arrow keys work with FreeBSD ... */ -+ ch_expected = l-1; -+ seqa_i = 1; -+ while ((ch_read = read (0, seqa+seqa_i, ch_expected)) > 0 && -+ ch_read < ch_expected) { -+ ch_expected -= ch_read; -+ seqa_i += ch_read; -+ } - alarm(0); - if (got_alrm) - return (c); -@@ -232,7 +251,7 @@ - } - - #ifdef USE_TERMIO -- ioctl (0, TCSETA, &orig_tio); -+ tcsetattr(0, TCSANOW, &orig_tio); - #endif - #ifdef USE_SGTTY - ioctl (0, TIOCSETP, &orig_sgtty); -@@ -321,16 +340,16 @@ - setuptty() - { - #ifdef USE_TERMIO -- struct termio tio; -+ struct termios tio; - -- ioctl (0, TCGETA, &orig_tio); -+ tcgetattr(0, &orig_tio); - tio = orig_tio; - tio.c_iflag &= ~ICRNL; /* leave CR unchanged */ - tio.c_oflag &= ~OPOST; /* no output processing */ - tio.c_lflag &= ~(ICANON|ECHO); /* no input processing, no echo */ - tio.c_cc[VMIN] = 1; /* return after each char */ - tio.c_cc[VTIME] = 0; /* no read timeout */ -- ioctl (0, TCSETA, &tio); -+ tcsetattr(0, TCSANOW, &tio); - #endif - #ifdef USE_SGTTY - struct sgttyb sg; diff --git a/astro/ephem/files/patch-ae b/astro/ephem/files/patch-ae deleted file mode 100644 index 9d0155db37e4..000000000000 --- a/astro/ephem/files/patch-ae +++ /dev/null @@ -1,41 +0,0 @@ ---- listing.c.orig Sat Mar 14 23:22:09 1992 -+++ listing.c Sun Jan 21 20:48:40 2007 -@@ -6,21 +6,36 @@ - * format of the listing file is one line per screen update. - */ - -+#include - #include - #include - #include "screen.h" - --extern char *strcpy(); -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include -+#endif -+ -+#if defined(VMS) || defined(unix) -+#include -+#endif - - #ifdef VMS - #include --#include - #else -+#ifndef BSD - extern char *sys_errlist[]; -+#endif - extern errno; - #endif - - #define errsys (sys_errlist[errno]) -+ -+static lst_reset(); -+static lst_select_fields(); -+static lst_turn_off(); -+static lst_turn_on(); -+static lst_file(); -+static display_listing_file(FILE *lfp); - - - #define TRACE(x) {FILE *fp = fopen("trace","a"); fprintf x; fclose(fp);} diff --git a/astro/ephem/files/patch-af b/astro/ephem/files/patch-af deleted file mode 100644 index 4264880d6fa6..000000000000 --- a/astro/ephem/files/patch-af +++ /dev/null @@ -1,59 +0,0 @@ ---- main.c.orig Sat Mar 14 23:22:10 1992 -+++ main.c Sun Jan 21 20:51:46 2007 -@@ -16,15 +16,26 @@ - #include - #include - #include --#ifdef VMS -+#if defined(VMS) || defined(unix) - #include - #endif -+#include - #include "astro.h" - #include "circum.h" - #include "screen.h" -+#include -+#include - --extern char *strncpy(); --extern char *getenv(); -+static read_cfgfile(); -+static void on_fpe(); -+static read_fieldargs(int ac, char *av[]); -+static crack_fieldset(char *buf); -+static chg_fld(char *bp, int *fld); -+static print_tminc(int force); -+static print_alt(int howmuch); -+static print_nstep(int force); -+static print_spause(int force); -+static toggle_body(int p); - - /* shorthands for fields of a Now structure, now. - * first undo the ones for a Now pointer from circum.h. -@@ -51,7 +62,11 @@ - - static jmp_buf fpe_err_jmp; /* used to recover from SIGFPE */ - static char *cfgfile; /* !0 if -c used */ -+#ifdef unix -+static char cfgdef[] = PREFIX "/share/ephem/ephem.cfg"; /* default configuration file name */ -+#else - static char cfgdef[] = "ephem.cfg"; /* default configuration file name */ -+#endif - static Now now; /* where when and how, right now */ - static double tminc; /* hrs to inc time by each loop; RTC means use clock */ - static int nstep; /* steps to go before stopping */ -@@ -1006,12 +1021,12 @@ - */ - slp_sync() - { -- extern long time(); -+ /*extern long time();*/ - - if (spause > 0 && !plot_ison() && !srch_ison() && !listing_ison()) { - int n; - if (tminc == RTC) { -- long t; -+ time_t t; - (void) time (&t); - n = spause - (t % spause); - } else diff --git a/astro/ephem/files/patch-ag b/astro/ephem/files/patch-ag deleted file mode 100644 index bb82891283dc..000000000000 --- a/astro/ephem/files/patch-ag +++ /dev/null @@ -1,44 +0,0 @@ ---- objx.c.orig Sat Mar 14 23:22:15 1992 -+++ objx.c Sun Jan 21 20:59:07 2007 -@@ -6,17 +6,20 @@ - #include - #include - #include --#ifdef VMS -+#if defined(VMS) || defined(unix) - #include - #endif -+#include - #include "astro.h" - #include "circum.h" - #include "screen.h" - --extern char *strcat(), *strcpy(), *strncpy(), *getenv(); -- - static char *dbfile; /* !0 if set by -d option */ -+#ifdef unix -+static char dbfdef[] = PREFIX "/share/ephem/ephem.db"; /* default database file name */ -+#else - static char dbfdef[] = "ephem.db"; /* default database file name */ -+#endif - - /* structures to describe objects of various types. - */ -@@ -95,6 +98,17 @@ - - #define DY 0 /* decimal year flag for set_year() */ - #define YMD 1 /* year/mon/day flag for set_year() */ -+ -+static nxt_db(char buf[], int blen, FILE *fp); -+static obj_dfixed(Obj *op, int ac, char *av[]); -+static obj_delliptical(Obj *op, int ac, char *av[]); -+static obj_dhyperbolic(Obj *op, int ac, char *av[]); -+static obj_dparabolic(Obj *op, int ac, char *av[]); -+static set_double(char *av[], int vn, char *pr, double *fp); -+static set_name(char *av[], char *np); -+static set_year(char *av[], int vn, char *pr, int type, double *yp); -+static crack_year(char *bp, double *p); -+static set_mag(char *av[], int vn, Mag *mp); - - /* run when Objx or y is picked from menu. - * we tell which by the planet code. diff --git a/astro/ephem/files/patch-ah b/astro/ephem/files/patch-ah deleted file mode 100644 index 7e386e66623b..000000000000 --- a/astro/ephem/files/patch-ah +++ /dev/null @@ -1,36 +0,0 @@ ---- plot.c.orig Sat Mar 14 23:22:20 1992 -+++ plot.c Sun Jan 21 21:06:06 2007 -@@ -10,16 +10,31 @@ - */ - - #include -+#include - #include - #include "screen.h" - --extern char *strcpy(); -+static plt_select_fields(); -+static plt_turn_off(); -+static plt_turn_on(); -+static plt_file(); -+static plot_cartesian(FILE *pfp); -+static plot_polar(FILE *pfp); -+ -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include -+#endif -+ -+#if defined(VMS) || defined(unix) -+#include -+#endif - - #ifdef VMS - #include --#include - #else -+#ifndef BSD - extern char *sys_errlist[]; -+#endif - extern errno; - #endif - diff --git a/astro/ephem/files/patch-ai b/astro/ephem/files/patch-ai deleted file mode 100644 index 007efb6fa346..000000000000 --- a/astro/ephem/files/patch-ai +++ /dev/null @@ -1,115 +0,0 @@ -*** time.c.orig Sun Mar 15 07:22:29 1992 ---- time.c Sun Jan 3 17:28:45 1999 -*************** -*** 13,37 **** - * returning 0. - */ - -- #define TZB -- - #ifdef VMS - #undef TZA - #undef TZB - #endif - - #include - #include - - #include "astro.h" - #include "circum.h" - - extern char *strncpy(); - #ifndef VMS - extern long time(); - #endif - -! static long c0; - static double mjd0; - - /* save current mjd and corresponding system clock for use by inc_mjd(). ---- 13,42 ---- - * returning 0. - */ - - #ifdef VMS - #undef TZA - #undef TZB - #endif - - #include -+ #include - #include - -+ #if (defined(__unix__) || defined(unix)) && !defined(USG) -+ #include -+ #endif -+ - #include "astro.h" - #include "circum.h" - -+ #if !(defined(BSD) && BSD >= 199306) - extern char *strncpy(); - #ifndef VMS - extern long time(); - #endif -+ #endif - -! static time_t c0; - static double mjd0; - - /* save current mjd and corresponding system clock for use by inc_mjd(). -*************** -*** 49,57 **** - time_fromsys (np) - Now *np; - { - extern struct tm *gmtime(), *localtime(); - struct tm *tp; -! long c; - double day, hr; - - (void) time (&c); ---- 54,64 ---- - time_fromsys (np) - Now *np; - { -+ #if !(defined(BSD) && BSD >= 199306) - extern struct tm *gmtime(), *localtime(); -+ #endif - struct tm *tp; -! time_t c; - double day, hr; - - (void) time (&c); -*************** -*** 62,68 **** ---- 69,80 ---- - sex_dec (tp->tm_hour, tp->tm_min, tp->tm_sec, &hr); - mjd = day + hr/24.0; - tp = localtime (&c); -+ #ifdef __FreeBSD__ -+ tz = -tp->tm_gmtoff/3600; -+ strcpy(tznm, tp->tm_zone); -+ #else - settzstuff (tp->tm_isdst ? 1 : 0, np); -+ #endif - } else { - /* if gmtime() doesn't work, we assume the timezone stuff won't - * either, so we just use what it is and leave it alone. Some -*************** -*** 114,120 **** - double inc; - { - if (inc == RTC) { -! long c; - (void) time (&c); - mjd = mjd0 + (c - c0)/SPD; - } else ---- 126,132 ---- - double inc; - { - if (inc == RTC) { -! time_t c; - (void) time (&c); - mjd = mjd0 + (c - c0)/SPD; - } else diff --git a/astro/ephem/files/patch-aj b/astro/ephem/files/patch-aj deleted file mode 100644 index 6737bfb06113..000000000000 --- a/astro/ephem/files/patch-aj +++ /dev/null @@ -1,19 +0,0 @@ -*** version.c.orig Wed Apr 23 12:38:55 1997 ---- version.c Wed Apr 23 12:39:29 1997 -*************** -*** 214,220 **** - "Jupiter's moons based on information in \"Astronomical Formulae for", - "Calculators\" by Jean Meeus. Richmond, Va., U.S.A., Willmann-Bell, (c) 1982.", - */ -! "See the manual (Man.txt) for a list of references.", - "", - "type any key to continue..." - }; ---- 214,220 ---- - "Jupiter's moons based on information in \"Astronomical Formulae for", - "Calculators\" by Jean Meeus. Richmond, Va., U.S.A., Willmann-Bell, (c) 1982.", - */ -! "See the manual (" PREFIX "/share/ephem/Man.txt) for a list of references.", - "", - "type any key to continue..." - }; diff --git a/astro/ephem/files/patch-compiler.c_2 b/astro/ephem/files/patch-compiler.c_2 new file mode 100644 index 000000000000..10d6dd212b7c --- /dev/null +++ b/astro/ephem/files/patch-compiler.c_2 @@ -0,0 +1,19 @@ +*** compiler.c.orig Tue Apr 15 01:07:37 1997 +--- compiler.c Tue Apr 15 01:33:14 1997 +*************** +*** 9,15 **** + + #include + #include +! #ifdef VMS + #include + #endif + #include "screen.h" +--- 9,15 ---- + + #include + #include +! #if defined(VMS) || defined(unix) + #include + #endif + #include "screen.h" diff --git a/astro/ephem/files/patch-formats.c b/astro/ephem/files/patch-formats.c new file mode 100644 index 000000000000..da8e096589ce --- /dev/null +++ b/astro/ephem/files/patch-formats.c @@ -0,0 +1,19 @@ +*** formats.c.orig Tue Apr 15 01:07:37 1997 +--- formats.c Tue Apr 15 01:33:15 1997 +*************** +*** 5,11 **** + #include + #include + #include +! #ifdef VMS + #include + #endif + #include "astro.h" +--- 5,11 ---- + #include + #include + #include +! #if defined(VMS) || defined(unix) + #include + #endif + #include "astro.h" diff --git a/astro/ephem/files/patch-io.c b/astro/ephem/files/patch-io.c new file mode 100644 index 000000000000..7fb411a1c962 --- /dev/null +++ b/astro/ephem/files/patch-io.c @@ -0,0 +1,99 @@ +--- io.c.orig Sat Mar 14 23:22:07 1992 ++++ io.c Sun Jan 21 20:46:00 2007 +@@ -28,6 +28,17 @@ + * need to #define VMS since it is inherent in the compiler. + */ + ++#include ++#include ++#include ++ ++static on_alrm(); ++static chk_arrow (register char c); ++static tload(); ++static char *egetstr (char *name, char **sptr); ++static setuptty(); ++ ++ + /* unless you are on VMS define one of these... */ + #define UNIX + /* #define TURBO_C */ +@@ -35,8 +46,8 @@ + /* then if you defined UNIX you must use one of these ways to do non-blocking + * tty reads + */ +-#define USE_FIONREAD +-/* #define USE_NDELAY */ ++/* #define USE_FIONREAD */ ++#define USE_NDELAY + /* #define USE_ATTSELECT */ + /* #define USE_BSDSELECT */ + +@@ -56,7 +67,7 @@ + #ifdef UNIX + #include + #ifdef USE_TERMIO +-#include ++#include + #endif + #ifdef USE_SGTTY + #include +@@ -73,7 +84,7 @@ + static int tloaded; + static int ttysetup; + #ifdef USE_TERMIO +-static struct termio orig_tio; ++static struct termios orig_tio; + #endif + #ifdef USE_SGTTY + static struct sgttyb orig_sgtty; +@@ -199,11 +210,19 @@ + seqa[0] = c; + if (l > 1) { + extern unsigned alarm(); ++ int ch_read, ch_expected, seqa_i; + /* cautiously read rest of arrow sequence */ + got_alrm = 0; + (void) signal (SIGALRM, on_alrm); + alarm(2); +- read (0, seqa+1, l-1); ++ /* to make the arrow keys work with FreeBSD ... */ ++ ch_expected = l-1; ++ seqa_i = 1; ++ while ((ch_read = read (0, seqa+seqa_i, ch_expected)) > 0 && ++ ch_read < ch_expected) { ++ ch_expected -= ch_read; ++ seqa_i += ch_read; ++ } + alarm(0); + if (got_alrm) + return (c); +@@ -232,7 +251,7 @@ + } + + #ifdef USE_TERMIO +- ioctl (0, TCSETA, &orig_tio); ++ tcsetattr(0, TCSANOW, &orig_tio); + #endif + #ifdef USE_SGTTY + ioctl (0, TIOCSETP, &orig_sgtty); +@@ -321,16 +340,16 @@ + setuptty() + { + #ifdef USE_TERMIO +- struct termio tio; ++ struct termios tio; + +- ioctl (0, TCGETA, &orig_tio); ++ tcgetattr(0, &orig_tio); + tio = orig_tio; + tio.c_iflag &= ~ICRNL; /* leave CR unchanged */ + tio.c_oflag &= ~OPOST; /* no output processing */ + tio.c_lflag &= ~(ICANON|ECHO); /* no input processing, no echo */ + tio.c_cc[VMIN] = 1; /* return after each char */ + tio.c_cc[VTIME] = 0; /* no read timeout */ +- ioctl (0, TCSETA, &tio); ++ tcsetattr(0, TCSANOW, &tio); + #endif + #ifdef USE_SGTTY + struct sgttyb sg; diff --git a/astro/ephem/files/patch-listing.c b/astro/ephem/files/patch-listing.c new file mode 100644 index 000000000000..9d0155db37e4 --- /dev/null +++ b/astro/ephem/files/patch-listing.c @@ -0,0 +1,41 @@ +--- listing.c.orig Sat Mar 14 23:22:09 1992 ++++ listing.c Sun Jan 21 20:48:40 2007 +@@ -6,21 +6,36 @@ + * format of the listing file is one line per screen update. + */ + ++#include + #include + #include + #include "screen.h" + +-extern char *strcpy(); ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include ++#endif ++ ++#if defined(VMS) || defined(unix) ++#include ++#endif + + #ifdef VMS + #include +-#include + #else ++#ifndef BSD + extern char *sys_errlist[]; ++#endif + extern errno; + #endif + + #define errsys (sys_errlist[errno]) ++ ++static lst_reset(); ++static lst_select_fields(); ++static lst_turn_off(); ++static lst_turn_on(); ++static lst_file(); ++static display_listing_file(FILE *lfp); + + + #define TRACE(x) {FILE *fp = fopen("trace","a"); fprintf x; fclose(fp);} diff --git a/astro/ephem/files/patch-main.c b/astro/ephem/files/patch-main.c new file mode 100644 index 000000000000..4264880d6fa6 --- /dev/null +++ b/astro/ephem/files/patch-main.c @@ -0,0 +1,59 @@ +--- main.c.orig Sat Mar 14 23:22:10 1992 ++++ main.c Sun Jan 21 20:51:46 2007 +@@ -16,15 +16,26 @@ + #include + #include + #include +-#ifdef VMS ++#if defined(VMS) || defined(unix) + #include + #endif ++#include + #include "astro.h" + #include "circum.h" + #include "screen.h" ++#include ++#include + +-extern char *strncpy(); +-extern char *getenv(); ++static read_cfgfile(); ++static void on_fpe(); ++static read_fieldargs(int ac, char *av[]); ++static crack_fieldset(char *buf); ++static chg_fld(char *bp, int *fld); ++static print_tminc(int force); ++static print_alt(int howmuch); ++static print_nstep(int force); ++static print_spause(int force); ++static toggle_body(int p); + + /* shorthands for fields of a Now structure, now. + * first undo the ones for a Now pointer from circum.h. +@@ -51,7 +62,11 @@ + + static jmp_buf fpe_err_jmp; /* used to recover from SIGFPE */ + static char *cfgfile; /* !0 if -c used */ ++#ifdef unix ++static char cfgdef[] = PREFIX "/share/ephem/ephem.cfg"; /* default configuration file name */ ++#else + static char cfgdef[] = "ephem.cfg"; /* default configuration file name */ ++#endif + static Now now; /* where when and how, right now */ + static double tminc; /* hrs to inc time by each loop; RTC means use clock */ + static int nstep; /* steps to go before stopping */ +@@ -1006,12 +1021,12 @@ + */ + slp_sync() + { +- extern long time(); ++ /*extern long time();*/ + + if (spause > 0 && !plot_ison() && !srch_ison() && !listing_ison()) { + int n; + if (tminc == RTC) { +- long t; ++ time_t t; + (void) time (&t); + n = spause - (t % spause); + } else diff --git a/astro/ephem/files/patch-objx.c b/astro/ephem/files/patch-objx.c new file mode 100644 index 000000000000..bb82891283dc --- /dev/null +++ b/astro/ephem/files/patch-objx.c @@ -0,0 +1,44 @@ +--- objx.c.orig Sat Mar 14 23:22:15 1992 ++++ objx.c Sun Jan 21 20:59:07 2007 +@@ -6,17 +6,20 @@ + #include + #include + #include +-#ifdef VMS ++#if defined(VMS) || defined(unix) + #include + #endif ++#include + #include "astro.h" + #include "circum.h" + #include "screen.h" + +-extern char *strcat(), *strcpy(), *strncpy(), *getenv(); +- + static char *dbfile; /* !0 if set by -d option */ ++#ifdef unix ++static char dbfdef[] = PREFIX "/share/ephem/ephem.db"; /* default database file name */ ++#else + static char dbfdef[] = "ephem.db"; /* default database file name */ ++#endif + + /* structures to describe objects of various types. + */ +@@ -95,6 +98,17 @@ + + #define DY 0 /* decimal year flag for set_year() */ + #define YMD 1 /* year/mon/day flag for set_year() */ ++ ++static nxt_db(char buf[], int blen, FILE *fp); ++static obj_dfixed(Obj *op, int ac, char *av[]); ++static obj_delliptical(Obj *op, int ac, char *av[]); ++static obj_dhyperbolic(Obj *op, int ac, char *av[]); ++static obj_dparabolic(Obj *op, int ac, char *av[]); ++static set_double(char *av[], int vn, char *pr, double *fp); ++static set_name(char *av[], char *np); ++static set_year(char *av[], int vn, char *pr, int type, double *yp); ++static crack_year(char *bp, double *p); ++static set_mag(char *av[], int vn, Mag *mp); + + /* run when Objx or y is picked from menu. + * we tell which by the planet code. diff --git a/astro/ephem/files/patch-plot.c b/astro/ephem/files/patch-plot.c new file mode 100644 index 000000000000..7e386e66623b --- /dev/null +++ b/astro/ephem/files/patch-plot.c @@ -0,0 +1,36 @@ +--- plot.c.orig Sat Mar 14 23:22:20 1992 ++++ plot.c Sun Jan 21 21:06:06 2007 +@@ -10,16 +10,31 @@ + */ + + #include ++#include + #include + #include "screen.h" + +-extern char *strcpy(); ++static plt_select_fields(); ++static plt_turn_off(); ++static plt_turn_on(); ++static plt_file(); ++static plot_cartesian(FILE *pfp); ++static plot_polar(FILE *pfp); ++ ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include ++#endif ++ ++#if defined(VMS) || defined(unix) ++#include ++#endif + + #ifdef VMS + #include +-#include + #else ++#ifndef BSD + extern char *sys_errlist[]; ++#endif + extern errno; + #endif + diff --git a/astro/ephem/files/patch-time.c b/astro/ephem/files/patch-time.c new file mode 100644 index 000000000000..007efb6fa346 --- /dev/null +++ b/astro/ephem/files/patch-time.c @@ -0,0 +1,115 @@ +*** time.c.orig Sun Mar 15 07:22:29 1992 +--- time.c Sun Jan 3 17:28:45 1999 +*************** +*** 13,37 **** + * returning 0. + */ + +- #define TZB +- + #ifdef VMS + #undef TZA + #undef TZB + #endif + + #include + #include + + #include "astro.h" + #include "circum.h" + + extern char *strncpy(); + #ifndef VMS + extern long time(); + #endif + +! static long c0; + static double mjd0; + + /* save current mjd and corresponding system clock for use by inc_mjd(). +--- 13,42 ---- + * returning 0. + */ + + #ifdef VMS + #undef TZA + #undef TZB + #endif + + #include ++ #include + #include + ++ #if (defined(__unix__) || defined(unix)) && !defined(USG) ++ #include ++ #endif ++ + #include "astro.h" + #include "circum.h" + ++ #if !(defined(BSD) && BSD >= 199306) + extern char *strncpy(); + #ifndef VMS + extern long time(); + #endif ++ #endif + +! static time_t c0; + static double mjd0; + + /* save current mjd and corresponding system clock for use by inc_mjd(). +*************** +*** 49,57 **** + time_fromsys (np) + Now *np; + { + extern struct tm *gmtime(), *localtime(); + struct tm *tp; +! long c; + double day, hr; + + (void) time (&c); +--- 54,64 ---- + time_fromsys (np) + Now *np; + { ++ #if !(defined(BSD) && BSD >= 199306) + extern struct tm *gmtime(), *localtime(); ++ #endif + struct tm *tp; +! time_t c; + double day, hr; + + (void) time (&c); +*************** +*** 62,68 **** +--- 69,80 ---- + sex_dec (tp->tm_hour, tp->tm_min, tp->tm_sec, &hr); + mjd = day + hr/24.0; + tp = localtime (&c); ++ #ifdef __FreeBSD__ ++ tz = -tp->tm_gmtoff/3600; ++ strcpy(tznm, tp->tm_zone); ++ #else + settzstuff (tp->tm_isdst ? 1 : 0, np); ++ #endif + } else { + /* if gmtime() doesn't work, we assume the timezone stuff won't + * either, so we just use what it is and leave it alone. Some +*************** +*** 114,120 **** + double inc; + { + if (inc == RTC) { +! long c; + (void) time (&c); + mjd = mjd0 + (c - c0)/SPD; + } else +--- 126,132 ---- + double inc; + { + if (inc == RTC) { +! time_t c; + (void) time (&c); + mjd = mjd0 + (c - c0)/SPD; + } else diff --git a/astro/ephem/files/patch-version.c b/astro/ephem/files/patch-version.c new file mode 100644 index 000000000000..6737bfb06113 --- /dev/null +++ b/astro/ephem/files/patch-version.c @@ -0,0 +1,19 @@ +*** version.c.orig Wed Apr 23 12:38:55 1997 +--- version.c Wed Apr 23 12:39:29 1997 +*************** +*** 214,220 **** + "Jupiter's moons based on information in \"Astronomical Formulae for", + "Calculators\" by Jean Meeus. Richmond, Va., U.S.A., Willmann-Bell, (c) 1982.", + */ +! "See the manual (Man.txt) for a list of references.", + "", + "type any key to continue..." + }; +--- 214,220 ---- + "Jupiter's moons based on information in \"Astronomical Formulae for", + "Calculators\" by Jean Meeus. Richmond, Va., U.S.A., Willmann-Bell, (c) 1982.", + */ +! "See the manual (" PREFIX "/share/ephem/Man.txt) for a list of references.", + "", + "type any key to continue..." + }; -- cgit