Improve cdecl usage message

This commit is contained in:
Pragmatic Software 2014-06-05 21:45:25 +00:00
parent a6b66cb351
commit 6740522fae
2 changed files with 7 additions and 7 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 615, BUILD_REVISION => 616,
BUILD_DATE => "2014-06-03", BUILD_DATE => "2014-06-05",
}; };
1; 1;

View File

@ -2,17 +2,17 @@
# quick and dirty by :pragma # quick and dirty by :pragma
my $command = join(' ', @ARGV);
if ($#ARGV < 0) { my @args = split(' ', $command); # because @ARGV may be one quoted argument
print "For help with cdecl, see http://linux.die.net/man/1/cdecl\n"; if (@args < 2) {
print "Usage: cdecl <explain|declare|cast|set|...> <code>, see http://linux.die.net/man/1/cdecl\n";
die; die;
} }
my $command = join(' ', @ARGV);
$command = quotemeta($command); $command = quotemeta($command);
$command =~ s/\\ / /g; $command =~ s/\\ / /g;
#print "[$command]\n";
my $result = `/usr/bin/cdecl -c $command`; my $result = `/usr/bin/cdecl -c $command`;
chomp $result; chomp $result;