$stripped=0;
&init;
-$rc_file = join('/', $ENV{'HOME'}, ".search");
+if (exists $ENV{'HOME'}) {
+ $rc_file = join('/', $ENV{'HOME'}, ".search");
+}
+else {
+ $rc_file = "";
+}
&check_args;
{
## initialize variables that might be reset by command-line args
$DOREP=0; ## set true by -dorep (redo multi-hardlink files)
+ $DOREP=1 if $^O eq 'MSWin32';
$DO_SORT=0; ## set by -sort (sort files in a dir before checking)
$FIND_ONLY=0; ## set by -find (don't search files)
$LIST_ONLY=0; ## set true by -l (list filenames only)
local($line_num, $ln, $tag) = 0;
local($use_default, @default) = 0;
- { package magic; $\17 = 0; } ## turn off warnings for when we run EXPR's
+ { package magic; $^W= 0; } ## turn off warnings for when we run EXPR's
unless (open(RC, "$file")) {
$use_default=1;
## no RC file -- use this default.
@default = split(/\n/,<<'--------INLINE_LITERAL_TEXT');
magic: 32 : $H =~ m/[\x00-\x06\x10-\x1a\x1c-\x1f\x80\xff]{2}/
- option: -skip '.a .COM .elc .EXE .gz .o .pbm .xbm .dvi'
- option: -iskip '.tarz .zip .z .lzh .jpg .jpeg .gif .uu'
+ option: -skip '.a .elc .gz .o .pbm .xbm .dvi'
+ option: -iskip '.com .exe .lib .pdb .tarz .zip .z .lzh .jpg .jpeg .gif .uu'
<!~> option: -skip '~ #'
--------INLINE_LITERAL_TEXT
}
}
## skip things that are empty
- unless (-s _) {
+ unless (-s _ || -d _) {
warn qq/skip (empty): $file\n/ if $WHY;
next;
}
}
## _never_ redo a directory
- if (defined $dir_done{$id}) {
+ if (defined $dir_done{$id} and $^O ne 'MSWin32') {
warn qq/skip (did as "$dir_done{$id}"): $file\n/ if $WHY;
next;
}