anchor.diff:  
   %%%-----------------------------------------------------------------
   %%% Utility functions.
  -
  -append([I | Is], R) when is_list(R) -> append(Is, [I | R]);
  -append([], R) -> R.
  -
   
   %% Converts a list of mode atoms into a mode word for the driver.
   %% Returns {Mode, Portopts, Setopts} where Portopts is a list of 
  
positive.code:     list_dir_int(Port, Dir).
  
  list_dir_int(Port, Dir) ->
      drv_command(Port, [?FILE_READDIR, pathname(Dir)], []).
  
  
  
  %%%-----------------------------------------------------------------
  %%% Functions to communicate with the driver
  
negative.code: %% Receives the response from a driver port.
  %% Returns: {ok, ListOrBinary}|{error, Reason}
  
  drv_get_response(Port, undefined) ->
      drv_get_response(Port);
  drv_get_response(Port, Fun) when is_function(Fun, 1) ->
      Fun(Port).
  
  drv_get_response(Port) ->
      erlang:bump_reductions(100),
  