From: minima Date: Tue, 25 Jul 2000 12:35:25 +0000 (+0000) Subject: 1. Ignore \n in ax25 mode for C client. X-Git-Tag: R_1_43~39 X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=43d1c9f4ff26d0ee9afbb54e7fb90701a9d4e694;p=spider.git 1. Ignore \n in ax25 mode for C client. 2. remove extra space at the end of a DX spot announce when no grid square is output. --- diff --git a/Changes b/Changes index a54aa85c..7b6c83e2 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +25Jul00======================================================================= +1. ignore \n in ax25 mode for C client. +2. remove extra space at the end of a DX spot announce when no grid square +is output. 20Jul00======================================================================= 1. Finally managed to update my source with the sourceforge one 2. added user->qra cleaning in various places diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 0a1c83dd..02807937 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -247,7 +247,7 @@ sub normal my $user = DXUser->get_current($spot[4]); if ($user) { my $qra = $user->qra; - if (!DXBearing::is_qra) { + unless ($qra && DXBearing::is_qra($qra)) { my $lat = $user->lat; my $long = $user->long; if (defined $lat && defined $long) { diff --git a/perl/Spot.pm b/perl/Spot.pm index fcf2d261..1938fbe7 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -172,9 +172,9 @@ sub formatb my $t = ztime($dx[2]); my $ref = DXUser->get_current($dx[4]); my $loc = $ref->qra if $ref && $ref->qra; - $loc = substr($ref->qra, 0, 4) if $loc; + $loc = ' ' . substr($ref->qra, 0, 4) if $loc; $loc = "" unless $loc; - return sprintf "DX de %-7.7s%11.1f %-12.12s %-30s %s $loc", "$dx[4]:", $dx[0], $dx[1], $dx[3], $t ; + return sprintf "DX de %-7.7s%11.1f %-12.12s %-30s %s$loc", "$dx[4]:", $dx[0], $dx[1], $dx[3], $t ; } # format a spot for user output in list mode diff --git a/src/client.c b/src/client.c index 7864e9d1..3404be9d 100644 --- a/src/client.c +++ b/src/client.c @@ -387,6 +387,8 @@ int fcb_handler(sel_t *sp, int in, int out, int err) default: if (nl == '\n' && *p == '\r') { /* ignore \r in telnet mode (ugh) */ p++; + } else if (nl == '\r' && *p == '\n') { /* and ignore \n in ax25 mode (double ugh) */ + p++; } else if (*p == nl) { if (mp->inp == mp->data) *mp->inp++ = ' ';