anchor.diff:  %% Internal API.
   -export([start/0, start/1]).
   
  --include_lib("kernel/include/file.hrl").
  +%%-----------------------------------------------------------------------
   
   -define(SHEBANG,  "/usr/bin/env escript").
   -define(COMMENT,  "This is an -*- erlang -*- file").
   
  --record(state, {file,
  -                module,
  +%%-----------------------------------------------------------------------
  +
  +-type mode()   :: 'compile' | 'debug' | 'interpret' | 'run'.
  +-type source() :: 'archive' | 'beam' | 'text'.
  +
  +-record(state, {file         :: file:filename(),
  +                module       :: module(),
                   forms_or_bin,
  -                source,
  -                n_errors,
  -                mode,
  -                exports_main,
  -                has_records}).
  --record(sections, {type,
  -		   shebang,
  -		   comment,
  -		   emu_args,
  -		   body}).
  --record(extract_options, {compile_source}).
  +                source       :: source(),
  +                n_errors     :: non_neg_integer(),
  +                mode         :: mode(),
  +                exports_main :: boolean(),
  +                has_records  :: boolean()}).
   
   -type shebang() :: string().
   -type comment() :: string().
   -type emu_args() :: string().
  --type escript_filename() :: string().
  --type filename() :: string().
  +
  +-record(sections, {type,
  +		   shebang  :: shebang(),
  +		   comment  :: comment(),
  +		   emu_args :: emu_args(),
  +		   body}).
  +
  +-record(extract_options, {compile_source}).
  +
   -type zip_file() ::
  -	filename()
  -	| {filename(), binary()}
  -	| {filename(), binary(), #file_info{}}.
  +	  file:filename()
  +	| {file:filename(), binary()}
  +	| {file:filename(), binary(), file:file_info()}.
   -type zip_create_option() :: term().
   -type section() ::
   	  shebang
  
positive.code: 
  classify_line(Line) ->
      case Line of
          [$\#, $\! | _] ->
  	    shebang;
  	[$P, $K | _] ->
  	    archive;
  	[$F, $O, $R, $1 | _] ->
  	    beam;
  	[$%, $%, $\! | _] ->
  	    emu_args;
  	[$% | _] ->
  	    comment;
  	 _ ->
  	    undefined
     end.
  
  guess_type(Line) ->
  
negative.code:     {Name, Chars}.
  
  -spec script_name() -> string().
  
  script_name() ->
      [ScriptName|_] = init:get_plain_arguments(),
      ScriptName.
  