Compare commits

..

No commits in common. "3aee99f7f6537390ed7212fed466881a8502b15a" and "5de6672e2acc7c3c17f8fec5081fbea2715f0f08" have entirely different histories.

10 changed files with 7 additions and 75 deletions

View File

@ -48,8 +48,6 @@ if ($opts{buckets} eq "log2") {
);
} elsif ($opts{buckets} =~ /^days=(\d+)/) {
@bucket_max = map $_ * 86400, (1 .. $1);
} elsif ($opts{buckets} =~ /^hours=(\d+)/) {
@bucket_max = map $_ * 3600, (1 .. $1);
} else {
usage();
}

View File

@ -1,19 +1,11 @@
-include GNUmakevars
include GNUmakevars
all: chartab ctype-test
chartab: chartab.pl
cp $^ $@
chartab:
ctype-test:
clean:
rm chartab
install: $(BINDIR)/chartab $(BINDIR)/ctype-test
GNUmakevars: GNUmakevars.sh
sh ./$^ > $@
GNUmakerules: GNUmakerules.pl
perl ./$^ > $@
-include GNUmakerules
include GNUmakerules

View File

@ -1,8 +0,0 @@
#!/usr/bin/perl
use warnings;
use strict;
print "\$(BINDIR)/%: %\n";
print "\tinstall -m 755 \$^ \$@\n";
print "\$(MAN1DIR)/%: %\n";
print "\tinstall -m 644 \$^ \$@\n";

View File

@ -1,5 +0,0 @@
#!/bin/sh
prefix=${prefix:-/usr/local}
echo "BINDIR=$prefix/bin"
echo
echo "all:"

View File

@ -85,8 +85,8 @@ sub cleandir {
print STDERR "$0:", " " x $level, " cleandir $dir $since {\n";
}
if (!opendir(DIR, ".")) {
print STDERR "$0:", " " x $level, " cannot opendir $dir: $!\n";
return 0;
printf STDERR "$0:", " " x $level, " cannot opendir $dir: $!";
return;
}
my $std = lstat(".");
my $fs = $std->dev;

View File

@ -55,7 +55,6 @@ my $vertical; # use vertical output format
my $escape; # escape non-printable characters
my $xhtml; # produce XHTML output
my $style; # produce XHTML output
my $separator; # if set, produce CSV with this separator and double-quoted fields
GetOptions(
'help|?' => \$help,
@ -63,7 +62,6 @@ GetOptions(
'xhtml' => \$xhtml,
'escape' => \$escape,
'style:s' => \$style,
'separator:s' => \$separator,
) || pod2usage(2);
pod2usage(1) if $help;
@ -165,18 +163,6 @@ if ($xhtml) {
}
print "\n";
}
} elsif ($separator) {
no warnings 'uninitialized';
print join($separator, @{$sth->{NAME}}), "\n";
while (my @a = $sth->fetchrow_array()) {
for (@a) {
if (/[$separator"]/) {
s/"/""/g;
s/.*/"$&"/;
}
}
print join($separator, @a), "\n";
}
} else {
no warnings 'uninitialized';
print join("\t", @{$sth->{NAME}}), "\n";

View File

@ -22,7 +22,7 @@ cfg/%:
gethostbyname: gethostbyname.o hstrerror.o
fqdn: fqdn.pl
fqdn: fqdn.o hstrerror.o
hstrerror.o: cfg/have_hstrerror.h

View File

@ -1,27 +0,0 @@
#!/usr/bin/perl
use v5.26;
sub fqdn {
my ($h) = @_;
if ($h =~ /\./) {
return $h;
}
open(my $fh, '-|', '/usr/bin/host', $h);
while (<$fh>) {
if (/^(\S+\.\S+) has address/) {
return $1;
}
}
say STDERR "$0: cannot determine FQDN of $h";
return "$h.invalid";
}
if (!@ARGV) {
$ARGV[0] = `/bin/hostname -f`;
chomp($ARGV[0]);
}
for my $h (@ARGV) {
say fqdn($h);
}

View File

@ -2,10 +2,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "hstrerror.h"
char *cmnd;

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl
for my $i (0 .. 255) {
print fg(0), bg(15), sprintf("%3d", $i), " : ", bg($i), "x" x 10, rst(), " ", fg($i), "x" x 10, rst(), "\n";
print fg(0), bg(15), sprintf("%3d", $i), " : ", bg($i), "x" x 10, rst(), "\n";
}