anchor.diff:  	    {error, load_table}
       end.
   
  -
  -
  -%%% --------------------------------------------------------------------
  -%%% Dictionary making
  -%%% --------------------------------------------------------------------
  -
  -%%% Assume this function is called from the Makefile in the priv dir.
  -make([File]) ->
  -    {ok, Dir} = file:get_cwd(),
  -    mk_dict(Dir ++ "/" ++ atom_to_list(File)),
  -    init:stop().
  -
  -
  -mk_dict(File) ->
  -    Res = parse_dict(File),
  -    Dir = dir(?MODULE),
  -    mk_outfiles(Res, Dir, o2u(File)).
  -
  -mk_outfiles(Res, Dir, File) ->
  -    {Hrl, Map} = open_files(Dir, File),
  -    emit(Res, Hrl, Map),
  -    close_files(Hrl, Map).
  -
  -emit([A|T], Hrl, Map) when is_record(A, attribute) ->
  -    io:format(Hrl, "-define( ~s , ~w ).~n",
  -	      [A#attribute.name, A#attribute.id]),
  -    io:format(Map, "{attribute, ~w, ~w, \"~s\"}.~n",
  -	      [A#attribute.id, A#attribute.type, A#attribute.name]),
  -    emit(T, Hrl, Map);
  -emit([V|T], Hrl, Map) when is_record(V, vendor) ->
  -    io:format(Hrl, "-define( ~s , ~w ).~n",
  -	      [V#vendor.name, V#vendor.type]),
  -    io:format(Map, "{vendor, ~w, \"~s\"}.~n",
  -	      [V#vendor.type, V#vendor.name]),
  -    emit(T, Hrl, Map);
  -emit([_|T], Hrl, Map) ->
  -    emit(T, Hrl, Map);
  -emit([], _, _) ->
  -    true.
  -
  -open_files(Dir, File) ->
  -    [Name|_] = lists:reverse(string:tokens(File, "/")),
  -    Hfile = Dir ++ "/include/" ++ Name ++ ".hrl",
  -    {ok,Hrl} = file:open(Hfile, [write]),
  -    Mfile = Dir ++ "/priv/" ++ Name ++ ".map",
  -    {ok,Map} = file:open(Mfile, [write]),
  -    io:format("Creating files: ~n  <~s>~n  <~s>~n", [Hfile, Mfile]),
  -    {Hrl, Map}.
  -
  -close_files(Hrl, Map) ->
  -    file:close(Hrl),
  -    file:close(Map).
  -
  -parse_dict(File) when is_list(File) ->
  -    {ok,B} = file:read_file(File),
  -    F = fun(Line,{undefined = Vendor, AccList}) ->
  -                case pd(string:tokens(Line,"\s\t\r")) of
  -                    {ok,E} -> {Vendor, [E|AccList]};
  -                    {begin_vendor, VName} -> {{vendor, VName}, AccList};
  -                    _      -> {Vendor, AccList}
  -                end;
  -           (Line, {{vendor, VName} = Vendor, AccList}) ->
  -                case pd(string:tokens(Line, "\s\t\r"), VName) of
  -                    {end_vendor} -> {undefined, AccList};
  -                    {ok,E} -> {Vendor, [E|AccList]};
  -                    _ -> {Vendor, AccList}
  -                end
  -	end,
  -    {_, L} = lists:foldl(F,{undefined, []},string:tokens(b2l(B),"#\n")),
  -    L.
  -
  -pd(["BEGIN-VENDOR", Name]) ->
  -    {begin_vendor, Name};
  -pd(["VENDOR", Name, Id]) ->
  -    put({vendor,Name}, l2i(Id)),
  -    {ok, #vendor{type = l2i(Id), name = Name}};
  -pd(["ATTRIBUTE", Name, Id, Type]) ->
  -    {ok,#attribute{name = d2u(Name), id = id2i(Id), type = l2a(Type)}};
  -pd(["ATTRIBUTE", Name, Id, Type, Vendor]) ->
  -    case get({vendor, Vendor}) of
  -        undefined ->
  -            %% No vendor defined, line must have some other "crap" after Type.
  -            {ok,#attribute{name = d2u(Name), id = id2i(Id), type = l2a(Type)}};
  -        VendId ->
  -            {ok,#attribute{name = d2u(Name), id = {VendId,id2i(Id)},type = l2a(Type)}}
  -    end;
  -pd(_X) ->
  -    %%io:format("Skipping: ~p~n", [_X]),
  -    false.
  -
  -pd(["END-VENDOR", _Name], _VName) ->
  -    {end_vendor};
  -pd(["ATTRIBUTE", Name, Id, Type], VName) ->
  -    case get({vendor, VName}) of
  -        undefined ->
  -            %% No vendor defined, line must have some other "crap" after Type.
  -            {ok,#attribute{name = d2u(Name), id = id2i(Id), type = l2a(Type)}};
  -        VendId ->
  -            {ok,#attribute{name = d2u(Name), id = {VendId,id2i(Id)},type = l2a(Type)}}
  -    end;
  -pd(_X, _VName) ->
  -    %%io:format("Skipping: ~p~n", [_X]),
  -    false.
  -
  -
   priv_dir() ->
       dir(?MODULE) ++ "/priv".
   
  
positive.code:          start/0,start_link/0,
           lookup/1
          ]).
  -export([
           load_tables/1,
           mk_dict/1,
           parse_dict/1,
           make/1
          ]).
  
  %% gen_server callbacks
  -export([
  
negative.code:     [_,_|R] = lists:reverse(string:tokens(P,"/")),
      lists:foldl(fun(X,Acc) -> Acc ++ [$/|X] end, "", lists:reverse(R)).
  
  