pkgsrc/ham/predict/patches/patch-predict.c
mef 1369145940 (ham/predict) Updated to 2.2.6
Release 2.2.6:
By John A. Magliacane <kd2bd@amsat.org> (20-May-2020):

* The installer program has been replaced by a bash script that
  configures, compiles, and installs PREDICT and several companion
    client utility applications.

* The SingleTrack and MultiTrack displays have been modified for
  more consistent performance across a wider range of terminals.

* PREDICT's "vocalizer" now employs the Advanced Linux Sound
  Architecture (ALSA) environment instead of OSS in response
    to recent changes in v5.6 and later Linux kernels.

* The handling of geosynchronous and geostationary satellites
  has been improved, but still needs to be used with caution.

* 100 MHz normalized downlink Doppler shift information has been
  added to all -p and -f command-line outputs.

* The documentation and the transponder database file have been
  updated, and the format of the man page has been corrected.
2020-06-16 13:43:36 +00:00

53 lines
1.5 KiB
C

$NetBSD: patch-predict.c,v 1.3 2020/06/16 13:43:36 mef Exp $
sundry fixes to server mode:
provide default port if getservbyname fails
provide default proto if getprotobyname fails
fix inexplicable incorrect listen call
remove reference to exended ascii symbol for degrees
--- predict.c.orig 2006-05-14 23:19:56.000000000 +0000
+++ predict.c
@@ -1984,6 +1984,7 @@ int passivesock(char *service, char *pro
struct servent *pse;
struct protoent *ppe;
+ struct protoent ppedef = { 0, 0, 17 }; // udp
struct sockaddr_in sin;
int sd, type;
@@ -1996,14 +1997,12 @@ int passivesock(char *service, char *pro
else if ((sin.sin_port=htons((unsigned short)atoi(service)))==0)
{
- bailout("Can't get service");
- exit(-1);
+ sin.sin_port=htons(1210);
}
if ((ppe=getprotobyname(protocol))==0)
{
- bailout("Can't get protocol");
- exit(-1);
+ ppe = &ppedef;
}
if (strcmp(protocol,"udp")==0)
@@ -2025,7 +2024,7 @@ int passivesock(char *service, char *pro
exit(-1);
}
- if ((type=SOCK_STREAM && listen(s,qlen))<0)
+ if (type==SOCK_STREAM && listen(sd,qlen)<0)
{
bailout("Listen fail");
exit(-1);
@@ -5002,7 +5001,7 @@ char speak;
mvprintw(7+tshift,29,"%0.f ",(3600.0*sat_vel)*km2mi);
mvprintw(8+tshift,29,"%0.f ",3600.0*sat_vel);
- mvprintw(18+bshift,3,"%+6.2f%c ",eclipse_depth/deg2rad,176);
+ mvprintw(18+bshift,3,"%+6.2f ",eclipse_depth/deg2rad);
mvprintw(18+bshift,20,"%5.1f",256.0*(phase/twopi));
mvprintw(18+bshift,37,"%s",ephem);