anchor.diff:  -author('mats cronqvist').
   
   %% the API
  --export([start/0,stop/0,unlink/0]).
  +-export([start/0,stop/0,state/0,unlink/0]).
   
   %% for application supervisor
   -export([start_link/0]).
  
positive.code: code_change(_OldVsn,State,_Extra) ->
    {ok,State}.
  
  handle_call(unlink,_From,State) ->
    {links,Links} = process_info(self(),links),
    lists:foreach(fun unlink/1,Links),
  
negative.code: -export([init/1,terminate/2,code_change/3,
           handle_call/3,handle_cast/2,handle_info/2]).
  
  %% declare the state
  -record(state,{dirname = dirname(),
                 filename = filename(),
                 tablename = tablename()}).
  
  %% add all records here, to kludge around the record kludge.
  rec_info(state) -> record_info(fields,state);
  rec_info(_)     -> [].
  
  %% the API
  start() ->
    application:start(?MODULE).
  
  