anchor.diff:      [Sep,do_emit(A)|call_args(As, ", ")];
   call_args([], _) -> [].
   
  -fopen(F) ->
  +open_output_file(F) ->
       case file:open(F, [write,raw,delayed_write]) of
  -	{ok, Fd} -> 
  +	{ok,Fd} ->
  +	    put(gen_file_out, Fd),
   	    Fd;
   	{error, Reason} ->
   	    io:format("** Can't open file ~p ~n", [F]),
   	    exit({error,Reason})
       end.
  +
  +close_output_file() ->
  +    ok = file:close(erase(gen_file_out)).
   
   pgen_hrl(Erules,Module,TypeOrVal,Options,_Indent) ->
       put(currmod,Module),
  
positive.code: 	  "%%%",nl,
  	  "%%% Run-time functions.",nl,
  	  "%%%",nl]),
      asn1ct_func:generate(Fid),
      file:close(Fid),
      _ = erase(gen_file_out),
      _ = erase(outfile),
      asn1ct:verbose("--~p--~n",[{generated,ErlFile}],Options).
  
  
negative.code: 
  open_hrl(OutFile,Module) ->
      File = lists:concat([OutFile,".hrl"]),
      open_output_file(File),
      gen_hrlhead(Module).
  
  %% EMIT functions ************************
  