projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bad use of library, copying string over itself
[exim.git]
/
src
/
src
/
exiqgrep.src
diff --git
a/src/src/exiqgrep.src
b/src/src/exiqgrep.src
index 2c52f137fc9a3d3f60b0928df5d683fdd68705ed..c4f7c4b58aac30f11964b775b9429c6e7e5aea62 100644
(file)
--- a/
src/src/exiqgrep.src
+++ b/
src/src/exiqgrep.src
@@
-18,7
+18,10
@@
# Version 1.2
use strict;
# Version 1.2
use strict;
+BEGIN { pop @INC if $INC[-1] eq '.' };
+
use Getopt::Std;
use Getopt::Std;
+use File::Basename;
# Have this variable point to your exim binary.
my $exim = 'BIN_DIRECTORY/exim';
# Have this variable point to your exim binary.
my $exim = 'BIN_DIRECTORY/exim';
@@
-43,6
+46,13
@@
if ($^O eq 'darwin') { # aka MacOS X
$base = 62;
};
$base = 62;
};
+if ($ARGV[0] eq '--version') {
+ print basename($0) . ": $0\n",
+ "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
+ "perl(runtime): $]\n";
+ exit 0;
+}
+
getopts('hf:r:y:o:s:C:zxlibRca',\%opt);
if ($ARGV[0]) { &help; exit;}
if ($opt{h}) { &help; exit;}
getopts('hf:r:y:o:s:C:zxlibRca',\%opt);
if ($ARGV[0]) { &help; exit;}
if ($opt{h}) { &help; exit;}
@@
-87,7
+97,7
@@
EOF
}
sub collect() {
}
sub collect() {
- open(QUEUE,"$exim $eargs |") or die("Error open
n
ing pipe: $!\n");
+ open(QUEUE,"$exim $eargs |") or die("Error opening pipe: $!\n");
while(<QUEUE>) {
chomp();
my $line = $_;
while(<QUEUE>) {
chomp();
my $line = $_;