anchor.diff:  terminate(_Reason, _State) ->
       ok.
   
  -code_change(_, _, _) ->
  -    ok.
  +code_change(_, State, _) ->
  +    {ok, State}.
   
   %%% internal functions %%%
   
  -priorities(emerg)   -> 0;
  -priorities(alert)   -> 1;
  -priorities(crit)    -> 2;
  -priorities(err)     -> 3;
  -priorities(warning) -> 4;
  -priorities(notice)  -> 5;
  -priorities(info)    -> 6;
  -priorities(debug)   -> 7;
  -priorities(N) when is_integer(N) -> N;
  -priorities(_) -> erlang:error(badarg).
  -
  -facility(kern)      -> 0;
  -facility(user)      -> 8;
  -facility(mail)      -> 16;
  -facility(daemon)    -> 24;
  -facility(auth)      -> 32;
  -facility(syslog)    -> 40;
  -facility(lpr)       -> 48;
  -facility(news)      -> 56;
  -facility(uucp)      -> 64;
  -facility(cron)      -> 72;
  -facility(authpriv)  -> 80;
  -facility(ftp)       -> 88;
  -facility(netinfo)   -> 96;
  -facility(remoteauth)-> 104;
  -facility(install)   -> 112;
  -facility(ras)       -> 120;
  -facility(local0)    -> 16 * 8;
  -facility(local1)    -> 17 * 8;
  -facility(local2)    -> 18 * 8;
  -facility(local3)    -> 19 * 8;
  -facility(local4)    -> 20 * 8;
  -facility(local5)    -> 21 * 8;
  -facility(local6)    -> 22 * 8;
  -facility(local7)    -> 23 * 8;
  -facility(N) when is_integer(N) -> N;
  -facility(_) -> erlang:error(badarg).
  -
  -openlog_opt(pid)    -> 1;
  -openlog_opt(cons)   -> 2;
  -openlog_opt(odelay) -> 4;
  -openlog_opt(ndelay) -> 8;
  -openlog_opt(perror) -> 20;
  -openlog_opt(N) when is_integer(N) -> N;
  -openlog_opt(_) -> erlang:error(badarg).
   
   logopt([Queue]) -> openlog_opt(Queue);
   logopt([Tail|Queue]) ->
  
positive.code:          open/3,
           log/3,
           log/4,
           close/1
          ]).
  
  %% gen_server callbacks
  
negative.code: 
  -record(state, {}).
  
  -type priority() :: emerg | alert | crit | err |
                      warning | notice | info | debug | non_neg_integer().
  -type facility() :: kern | user | mail | daemon | auth | syslog |
                      lpr | news | uucp | cron | authpriv | ftp |
                      netinfo | remoteauth | install | ras |
                      local0 | local1 | local2 | local3 |
                      local4 | local5 | local6 | local7 | non_neg_integer().
  -type openlog_opt() :: pid | cons | odelay | ndelay | perror | pos_integer().
  -export_type([priority/0, facility/0, openlog_opt/0]).
  
  %%% API %%%
  
  -spec start() ->
      {ok, pid()} | ignore | {error, any()}.
  
  start() ->
      gen_server:start({local, ?MODULE}, ?MODULE, [], []).
  
  -spec start_link() ->
      {ok, pid()} | ignore | {error, any()}.
  
  start_link() ->
      gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
  
  -spec stop() ->
      ok.
  
  stop() ->
      gen_server:cast(?MODULE, stop).
  
  -spec open(Ident :: string(),
             Logopt :: list(openlog_opt()),
             Facility :: facility()) ->
      {ok, port()} |
      {error, any()}.
  
  open(Ident, Logopt, Facility) ->
      Log = erlang:open_port({spawn, ?DRV_NAME}, [binary]),
  