anchor.diff:  %%
   %% %CopyrightBegin%
   %%
  -%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
  +%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
   %%
   %% The contents of this file are subject to the Erlang Public License,
   %% Version 1.1, (the "License"); you may not use this file except in
  
positive.code:     io:format(Dev, "~p event = ~p~n", [Name, Event]).
  
  channels(NumCh) ->
      #state{alloc=[], free=lists:seq(1,NumCh)}.
  
  alloc(#state{free=[]}=Channels) ->
      {{error, "no channels available"}, Channels};
  alloc(#state{alloc=Allocated, free=[H|T]}) ->
      {H, #state{alloc=[H|Allocated], free=T}}.
  
  free(Ch, #state{alloc=Alloc, free=Free}=Channels) ->
      case lists:member(Ch, Alloc) of
          true ->
              #state{alloc=lists:delete(Ch, Alloc), free=[Ch|Free]};
          false ->
              Channels
      end.
  
negative.code:     ?MODULE ! {free, Ch},
      ok.
  
  init([Parent,NumCh]) ->
      register(?MODULE, self()),
      Chs = channels(NumCh),
  