anchor.diff:  
       Res.
   
  -unix_free(Path) ->
  -    Cmd = ["df -k '",Path,"'"],
  -    DF0 = os:cmd(Cmd),
  -    io:format("$ ~s~n~s", [Cmd,DF0]),
  -    Lines = re:split(DF0, "\n", [trim,{return,list}]),
  -    Last = lists:last(Lines),
  -    RE = "^[^\\s]*\\s+\\d+\\s+\\d+\\s+(\\d+)",
  -    {match,[Avail]} = re:run(Last, RE, [{capture,all_but_first,list}]),
  -    list_to_integer(Avail).
  +disc_free(Path) ->
  +    Data = disksup:get_disk_data(),
  +    {_,Tot,Perc} = hd(lists:filter(
  +			fun({P,_Size,_Full}) ->
  +				lists:prefix(filename:nativename(P),
  +					     filename:nativename(Path))
  +			end, lists:reverse(lists:sort(Data)))),
  +    round(Tot * (1-(Perc/100))).
   
   memsize() ->
  -    case os:type() of
  -	{unix,openbsd} ->
  -	    bsd_memsize("hw.physmem");
  -	{unix,freebsd} ->
  -	    bsd_memsize("hw.physmem");
  -	{unix,darwin} ->
  -	    bsd_memsize("hw.memsize");
  -	{unix,linux} ->
  -	    Meminfo = os:cmd("cat /proc/meminfo"),
  -	    Re = "^MemTotal:\\s+(\\d+)\\s+kB\$",
  -	    ReOpts = [multiline,{capture,all_but_first,list}],
  -	    case re:run(Meminfo, Re, ReOpts) of
  -		{match,[Str]} ->
  -		    list_to_integer(Str) bsl 10;
  -		nomatch ->
  -		    0
  -	    end;
  -	{win32,_} ->
  -	    enough; % atom() > integer(); assume (64-bit) windows have enough
  -	_ ->
  -	    0
  -    end.
  -
  -bsd_memsize(MIB) ->
  -    Reply = os:cmd(["sysctl ",MIB]),
  -    try strip_prefix(MIB, Reply) of
  -	Str ->
  -	    Re = "^\\s*(?::|=)\\s*(\\d+)",
  -	    ReOpts =  [{capture,all_but_first,list}],
  -	    case re:run(Str, Re, ReOpts) of
  -		{match,[SizeStr]} ->
  -		    list_to_integer(SizeStr);
  -		nomatch ->
  -		    0
  -	    end
  -    catch
  -	error:_ ->
  -	    0
  -    end.
  -
  -strip_prefix([X|Prefix], [X|List]) ->
  -    strip_prefix(Prefix, List);
  -strip_prefix([], List) ->
  -    List.
  +    {Tot,_Used,_}  = memsup:get_memory_data(),
  +    Tot.
  
positive.code: 
  
  init_per_suite(Config) when is_list(Config) ->
      case os:type() of
  	{win32, _} ->
  	    Priv = ?config(priv_dir, Config),
  
negative.code: 	{{unix,sunos},OsVersion} when OsVersion < {5,5,1} ->
  	    {skip,"Only supported on Win32, Unix or SunOS >= 5.5.1"};
  	{{unix,_},_} ->
  	    N = disc_free(?config(priv_dir, Config)),
  	    io:format("Free disk: ~w KByte~n", [N]),
  	    if N < 5 * (1 bsl 20) ->
  		    %% Less than 5 GByte free
  