fixed booboos in the protocol checking
authorminima <minima>
Sun, 20 Aug 2000 18:42:52 +0000 (18:42 +0000)
committerminima <minima>
Sun, 20 Aug 2000 18:42:52 +0000 (18:42 +0000)
perl/DXProt.pm
perl/DXUtil.pm

index 1d9f1a622b5640de90e5bb8b3476bd607365d841..fb6ed2090c2c4b0dc2a21ddb4182efc676b3b612 100644 (file)
@@ -64,12 +64,12 @@ $baddxfn = "$main::data/baddx.pl";
  undef ,                                               # pc20 no validation
  [ qw(c m h) ],                                        # pc21
  undef ,                                               # pc22 no validation
- [ qw(d t n n n m c c h) ],            # pc23
+ [ qw(d n n n n m c c h) ],            # pc23
  [ qw(c p h) ],                                        # pc24
  [ qw(c c n n) ],                              # pc25
- [ qw(f c m d t c c) ],                        # pc26
- [ qw(d t n n n m c c) ],              # pc27
- [ qw(c c c c d t p m bp n p bp c) ], # pc28
+ [ qw(f m d t m c c) ],                        # pc26
+ [ qw(d n n n n m c c) ],              # pc27
+ [ qw(c c c c d t p m bp n p bp bc) ], # pc28
  [ qw(c c n m) ],                              # pc29
  [ qw(c c n) ],                                        # pc30
  [ qw(c c n) ],                                        # pc31
@@ -114,7 +114,7 @@ $baddxfn = "$main::data/baddx.pl";
  undef,                                                        # pc70
  undef,
  undef,
- [ qw(d n n n n n n n m m m c c) ],    # pc73
+ [ qw(d n n n n n n m m m c c h) ],    # pc73
  undef,
  undef,
  undef,
@@ -143,7 +143,7 @@ sub check
        shift;    # not interested in the first field
        for ($i = 0; $i < @_; $i++) {
                my ($blank, $act) = $$ref[$i] =~ /^(b?)(\w)$/;
-               next if $blank && $_[$i] eq ' ';
+               next if $blank && $_[$i] =~ /^[ \*]$/;
                if ($act eq 'c') {
                        return $i+1 unless is_callsign($_[$i]);
                } elsif ($act eq 'm') {
index 42ba922bae1b888e72f2851fd01144636330c8f7..286f6f223eb645cdd02f8fa835704a98d5deaaf2 100644 (file)
@@ -299,7 +299,7 @@ sub is_callsign
 # check that a PC protocol field is valid text
 sub is_pctext
 {
-       return $_[0] =~ /^[\x09\x20-\xA8\xE0-\xEF]+$/;
+       return $_[0] =~ /^[\x09\x20-\xFF]+$/;
 }
 
 # check that a PC prot flag is fairly valid (doesn't check the difference between 1/0 and */-)