anchor.diff:  do_double_star(_Base, [], _Rest, Result, _Mod, _Root) ->
       Result.
   
  -do_star(Pattern, [X|Rest]) ->
  -    case wildcard_5(Pattern, [X|Rest]) of
  -	true  -> true;
  -	false -> do_star(Pattern, Rest)
  -    end;
  +do_star(Pattern, [_|Rest]=File) ->
  +    match_part(Pattern, File) orelse do_star(Pattern, Rest);
   do_star(Pattern, []) ->
  -    wildcard_5(Pattern, []).
  +    match_part(Pattern, []).
   
   do_alt([Alt|Rest], File) ->
  -    case wildcard_5(Alt, File) of
  -	true  -> true;
  -	false -> do_alt(Rest, File)
  -    end;
  +    match_part(Alt, File) orelse do_alt(Rest, File);
   do_alt([], _File) ->
       false.
   
  
positive.code:     case do_list_dir(Base0, Mod) of
  	{ok, Files} ->
  	    Base = prepare_base(Base0),
  	    Matches = wildcard_4(Pattern, Files, Base, []),
  	    do_wildcard_2(Matches, Rest, Result, Mod);
  	_ ->
  	    Result
  
negative.code: do_wildcard_3(Base, [], Result, _Mod) ->
      [Base|Result].
  
  do_wildcard_4(Pattern, Base, Files) ->
      case will_always_match(Pattern) of
  	false ->
  	    [Base++F || F <- Files, match_part(Pattern, F)];
  	true ->
  	    [Base++F || F <- Files]
      end.
  
  match_part([question|Rest1], [_|Rest2]) ->
      match_part(Rest1, Rest2);
  match_part([accept], _) ->
      true;
  match_part([double_star], _) ->
      true;
  match_part([star|Rest], File) ->
      do_star(Rest, File);
  match_part([{one_of, Ordset}|Rest], [C|File]) ->
      case ordsets:is_element(C, Ordset) of
  	true  -> match_part(Rest, File);
  	false -> false
      end;
  match_part([{alt, Alts}], File) ->
      do_alt(Alts, File);
  match_part([C|Rest1], [C|Rest2]) when is_integer(C) ->
      match_part(Rest1, Rest2);
  match_part([X|_], [Y|_]) when is_integer(X), is_integer(Y) ->
      false;
  match_part([], []) ->
      true;
  match_part([], [_|_]) ->
      false;
  match_part([_|_], []) ->
      false.
  
  will_always_match([accept]) -> true;
  will_always_match(_) -> false.
  
  prepare_base(Base0) ->
      Base1 = filename:join(Base0, "x"),
  