summaryrefslogtreecommitdiff
path: root/astro/ephem/files/patch-ad
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2007-01-24 23:18:05 +0000
committerPav Lucistnik <pav@FreeBSD.org>2007-01-24 23:18:05 +0000
commit409980699ad842ffcaf52d6c4ecd6641b48ee262 (patch)
tree7e783f4aae1d0ed395586b179cdd2da5c890bbc3 /astro/ephem/files/patch-ad
parent- Update to 2.0.5 (diff)
- Fix build with gcc41
- Update maintainer's address PR: ports/108190 Submitted by: Slaven Rezic <slaven@rezic.de> (maintainer)
Notes
Notes: svn path=/head/; revision=183226
Diffstat (limited to 'astro/ephem/files/patch-ad')
-rw-r--r--astro/ephem/files/patch-ad132
1 files changed, 62 insertions, 70 deletions
diff --git a/astro/ephem/files/patch-ad b/astro/ephem/files/patch-ad
index 586cc5fcb7c4..462623199431 100644
--- a/astro/ephem/files/patch-ad
+++ b/astro/ephem/files/patch-ad
@@ -1,70 +1,62 @@
-*** io.c.orig Wed Apr 3 13:26:53 1996
---- io.c Wed Apr 3 15:13:25 1996
-***************
-*** 35,50 ****
- /* 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_ATTSELECT */
- /* #define USE_BSDSELECT */
-
- /* and then if you defined UNIX you must also use one of these ways to control
- * the tty modes.
- */
-! #define USE_TERMIO
-! /* #define USE_SGTTY */
-
- /* if you defined TURBO_C you might want this too if screen io looks garbled */
- /* #define USE_ANSISYS */
---- 35,50 ----
- /* 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_ATTSELECT */
- /* #define USE_BSDSELECT */
-
- /* and then if you defined UNIX you must also use one of these ways to control
- * the tty modes.
- */
-! /* #define USE_TERMIO */
-! #define USE_SGTTY
-
- /* if you defined TURBO_C you might want this too if screen io looks garbled */
- /* #define USE_ANSISYS */
-***************
-*** 199,209 ****
- seqa[0] = c;
- if (l > 1) {
- extern unsigned alarm();
- /* cautiously read rest of arrow sequence */
- got_alrm = 0;
- (void) signal (SIGALRM, on_alrm);
- alarm(2);
-! read (0, seqa+1, l-1);
- alarm(0);
- if (got_alrm)
- return (c);
---- 199,217 ----
- 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);
-! /* 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);
+--- 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 <signal.h>
++#include <string.h>
++#include <stdlib.h>
++
++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,16 +46,16 @@
+ /* 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 */
+
+ /* and then if you defined UNIX you must also use one of these ways to control
+ * the tty modes.
+ */
+-#define USE_TERMIO
+-/* #define USE_SGTTY */
++/* #define USE_TERMIO */
++#define USE_SGTTY
+
+ /* if you defined TURBO_C you might want this too if screen io looks garbled */
+ /* #define USE_ANSISYS */
+@@ -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);