mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 15:57:12 +00:00
d5b4190c36
2. Fixed DXDebug so that it actually works as advertised with and without trailing \n. 3. Added deduping of WWV spots as well (at for date,time,sfi,k and i) dups 4. Replaced the 0 in "02-Dec-1998" with ' ' so it reads " 2-Dec-1998", it seems hard to credit it but some 'programs' out there that connect to clusters have problems with the leading '0'! 5. In the same vain, included a strictly AK1A compatible sh/heading, apparently this is necessary for the same reason as 4. 6. Started contrib tree stored the old show/heading in contrib/g0rdi/show. 7. Because I now correctly dedupe spots and wwv (there's a hostage to fortune..) I have added a merge command.
73 lines
959 B
Perl
73 lines
959 B
Perl
#
|
|
# The system variables - those indicated will need to be changed to suit your
|
|
# circumstances (and callsign)
|
|
#
|
|
# Copyright (c) 1998 - Dirk Koopman G1TLH
|
|
#
|
|
# $Id$
|
|
#
|
|
|
|
package DXDebug;
|
|
|
|
require Exporter;
|
|
@ISA = qw(Exporter);
|
|
@EXPORT = qw(dbg dbgadd dbgsub dbglist isdbg);
|
|
@EXPORT_OK = qw(dbg dbgadd dbgsub dbglist isdbg);
|
|
|
|
use strict;
|
|
use vars qw(%dbglevel $fp);
|
|
|
|
use FileHandle;
|
|
use DXUtil;
|
|
use DXLog ();
|
|
use Carp;
|
|
|
|
%dbglevel = ();
|
|
$fp = DXLog::new('debug', 'dat', 'd');
|
|
|
|
sub dbg
|
|
{
|
|
my $l = shift;
|
|
if ($dbglevel{$l}) {
|
|
my @in = @_;
|
|
my $t = time;
|
|
for (@in) {
|
|
s/\n$//o;
|
|
s/\a//og; # beeps
|
|
print "$_\n" if defined \*STDOUT;
|
|
$fp->writeunix($t, "$t^$_");
|
|
}
|
|
}
|
|
}
|
|
|
|
sub dbgadd
|
|
{
|
|
my $entry;
|
|
|
|
foreach $entry (@_) {
|
|
$dbglevel{$entry} = 1;
|
|
}
|
|
}
|
|
|
|
sub dbgsub
|
|
{
|
|
my $entry;
|
|
|
|
foreach $entry (@_) {
|
|
delete $dbglevel{$entry};
|
|
}
|
|
}
|
|
|
|
sub dbglist
|
|
{
|
|
return keys (%dbglevel);
|
|
}
|
|
|
|
sub isdbg
|
|
{
|
|
my $s = shift;
|
|
return $dbglevel{$s};
|
|
}
|
|
1;
|
|
__END__
|