1. Ignore \n in ax25 mode for C client.
authorminima <minima>
Tue, 25 Jul 2000 12:35:25 +0000 (12:35 +0000)
committerminima <minima>
Tue, 25 Jul 2000 12:35:25 +0000 (12:35 +0000)
2. remove extra space at the end of a DX spot announce when no grid square
is output.

Changes
perl/DXProt.pm
perl/Spot.pm
src/client.c

diff --git a/Changes b/Changes
index a54aa85c0d1bc7938850c606a716ab151b44650e..7b6c83e2fed56a9ac164a832b480618b039bff22 100644 (file)
--- 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
index 0a1c83ddbce0278dbac19abfa5fc76d4678096c0..0280793756c7556972f435bd897e64769adbe5ae 100644 (file)
@@ -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) {
index fcf2d261a154f9c2e74b37e168183b5039079431..1938fbe7e4280e27d0bff04c2d0cc6ab2a5e2462 100644 (file)
@@ -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
index 7864e9d13dc70cfab79b90f3f98e118ea7c7e47d..3404be9d9232b3600571118de6fec1e69180f67b 100644 (file)
@@ -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++ = ' ';