X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUtil.pm;h=0b3de9511e964f41c6834f025bcf4e60b1dc2f2d;hb=ee8c2e94a865274a859ffc3e57d043e24dcf39df;hp=b1d2b6292bef8873596676a14b58402570759836;hpb=b85ee0ca2b03ee2c5be20bd430cfa00757b7ebdb;p=spider.git diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index b1d2b629..0b3de951 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -16,7 +16,7 @@ require Exporter; @ISA = qw(Exporter); @EXPORT = qw(atime ztime cldate cldatetime slat slong yesno promptf parray parraypairs shellregex readfilestr writefilestr - print_all_fields cltounix iscallsign unpad is_callsign + print_all_fields cltounix unpad is_callsign is_freq is_digits is_pctext is_pcflag insertitem deleteitem ); @@ -183,12 +183,13 @@ sub print_all_fields my ($priv, $ans) = promptf($ref->field_prompt($field), $ref->{$field}); my @tmp; if (length $ans > 79) { - my ($p, $a) = split /: /, $ans; + my ($p, $a) = split /: /, $ans, 2; my $l = (length $p) + 2; my $al = 79 - $l; + my $bit; while (length $a > $al ) { - $a =~ s/^(.{$al})//; - push @tmp, "$p: $1"; + ($bit, $a) = unpack "A$al A*", $a; + push @tmp, "$p: $bit"; $p = ' ' x ($l - 2); } push @tmp, "$p: $a" if length $a;