anchor.diff:  other possible license with no implications from the above license on them.
   }
   
  -{$Align Off}
  +{$ifndef FarAPI}
  +
  +{$Align On}
   {$RangeChecks Off}
   
  -{$ifdef CPUX86_64}
  +{$ifdef FPC}
    {$PACKRECORDS C}
  -{$endif CPUX86_64}
  -
  -Unit PluginW;
  +{$endif FPC}
  +
  +Unit Plugin3;
   
   interface
   
   uses Windows;
  -
  +{$endif FarAPI}
  +
  +{$ifndef ApiImpl}
   const
     FARMANAGERVERSION_MAJOR = 3;
     FARMANAGERVERSION_MINOR = 0;
  -  FARMANAGERVERSION_BUILD = 2943;
  +  FARMANAGERVERSION_REVISION = 0;
  +  FARMANAGERVERSION_BUILD = 2903;
   
   type
   //TFarChar = AnsiChar;
  
positive.code:     FreePluginDirList   : TFarApiFreePluginDirList;
      Viewer              : TFarApiViewer;
      Editor              : TFarApiEditor;
      CmpName             : TFarApiCmpName;
      Text                : TFarApiText;
      EditorControl       : TFarApiEditorControl;
  
  
negative.code:   MACROSTATE_RECORDING        = 3;
    MACROSTATE_RECORDING_COMMON = 4;
  
  
  {FARMACROPARSEERRORCODE}
  
  const
    MPEC_SUCCESS                =  0;
    MPEC_ERROR                  =  1;
  
  (*
  struct MacroParseResult
  {
    size_t StructSize;
    DWORD ErrCode;
    COORD ErrPos;
    const wchar_t *ErrSrc;
  };
  *)
  type
    PMacroParseResult = ^TMacroParseResult;
    TMacroParseResult = record
      StructSize :size_t;
      ErrCode :DWORD;
      ErrPos :COORD;
      ErrSrc :PFarChar;
    end;
  
  (*
  struct MacroSendMacroText
  {
    size_t StructSize;
    FARKEYMACROFLAGS Flags;
    INPUT_RECORD AKey;
    const wchar_t *SequenceText;
  };
  *)
  type
    PMacroSendMacroText = ^TMacroSendMacroText;
    TMacroSendMacroText = record
      StructSize :size_t;
      Flags :TFarKeyMacroFlags;
      AKey :TInputRecord;
      SequenceText :PFarChar;
    end;
  
  
  { FARADDKEYMACROFLAGS }
  
  type
    TFarAddKeyMacroFlags = Int64;
  
  const
    AKMFLAGS_NONE  = 0;
  
  (*
  typedef intptr_t (WINAPI *FARMACROCALLBACK)(void* Id,FARADDKEYMACROFLAGS Flags);
  *)
  type
    TFarMacroCallback = function(
      Id :Pointer;
      Flags :TFarAddKeyMacroFlags
    ) :TIntPtr; stdcall;
  
  (*
  struct MacroAddMacro
  {
    size_t StructSize;
    void* Id;
    const wchar_t *SequenceText;
    const wchar_t *Description;
    FARKEYMACROFLAGS Flags;
    INPUT_RECORD AKey;
    enum FARMACROAREA Area;
    FARMACROCALLBACK Callback;
  };
  *)
  type
    PMacroAddMacro = ^TMacroAddMacro;
    TMacroAddMacro = record
      StructSize :size_t;
      Id :Pointer;
      SequenceText :PFarChar;
      Description :PFarChar;
      Flags :TFarKeyMacroFlags;
      AKey :TInputRecord;
      Area :DWORD{FARMACROAREA};
      Callback :TFarMacroCallback;
    end;
  
  
  { FARMACROVARTYPE }
  
  const
    FMVT_UNKNOWN  = 0;
    FMVT_INTEGER  = 1;
    FMVT_STRING   = 2;
    FMVT_DOUBLE   = 3;
    FMVT_BOOLEAN  = 4;
    FMVT_BINARY   = 5;
  
  (*
  struct FarMacroValue
  {
    enum FARMACROVARTYPE Type;
    union
    {
      __int64        Integer;
      __int64        Boolean;
      double         Double;
      const wchar_t *String;
      struct
      {
        void *Data;
        size_t Length;
      } Binary;
    } Value;
  };
  *)
  type
    PFarBinaryValue = ^TFarBinaryValue;
    TFarBinaryValue = record
      Data :Pointer;
      Length :SIZE_T;
    end;
  
    PFarMacroValue = ^TFarMacroValue;
    TFarMacroValue = record
      fType :DWORD; {FARMACROVARTYPE}
      Value : record case byte of
        0 : (fInteger :Int64);
        1 : (fDouble :Double);
        2 : (fString :PFarChar);
        3 : (fBinary :TFarBinaryValue);
      end;
    end;
  
    PFarMacroValueArray = ^TFarMacroValueArray;
    TFarMacroValueArray = packed array[0..MaxInt div SizeOf(TFarMacroValue) - 1] of TFarMacroValue;
  
  
  { MACROPLUGINRETURNTYPE }
  
  const
    MPRT_NORMALFINISH  = 0;
    MPRT_ERRORFINISH   = 1;
    MPRT_ERRORPARSE    = 2;
    MPRT_KEYS          = 3;
    MPRT_PRINT         = 4;
    MPRT_PLUGINCALL    = 5;
    MPRT_PLUGINMENU    = 6;
    MPRT_PLUGINCONFIG  = 7;
    MPRT_PLUGINCOMMAND = 8;
  
  (*
  struct MacroPluginReturn
  {
    size_t Count;
    struct FarMacroValue *Values;
    enum MACROPLUGINRETURNTYPE ReturnType;
  };
  *)
  type
    PMacroPluginReturn = ^TMacroPluginReturn;
    TMacroPluginReturn = record
      Count :size_t;
      Values :PFarMacroValueArray;
      ReturnType :Integer; {MACROPLUGINRETURNTYPE}
    end;
  
  (*
  struct FarMacroCall
  {
    size_t StructSize;
    size_t Count;
    struct FarMacroValue *Values;
    void (WINAPI *Callback)(void *CallbackData, struct FarMacroValue *Values);
    void *CallbackData;
  };
  *)
  type
    PFarMacroCall = ^TFarMacroCall;
    TFarMacroCall = record
      StructSize :size_t;
      Count :size_t;
      Values :PFarMacroValueArray;
      Callback :Pointer;
      CallbackData :Pointer;
    end;
  
  (*
  struct FarGetValue
  {
    size_t StructSize;
    intptr_t Type;
    struct FarMacroValue Value;
  };
  *)
  type
    PFarGetValue = ^TFarGetValue;
    TFarGetValue = record
      StructSize :size_t;
      fType :TIntPtr;
      Value :TFarMacroValue;
    end;
  
  {------------------------------------------------------------------------------}
  
  { FARSETCOLORFLAGS }
  
  type
    TFarSetColorFlags = Int64;
  
  const
    FSETCLR_NONE    = 0;
    FSETCLR_REDRAW  = $00000001;
  
  (*
  struct FarSetColors
  {
    size_t StructSize;
    FARSETCOLORFLAGS Flags;
    size_t StartIndex;
    size_t ColorsCount;
    struct FarColor* Colors;
  };
  *)
  type
    PFarSetColors = ^TFarSetColors;
    TFarSetColors = record
      StructSize :size_t;
      Flags :TFarSetColorFlags;
      StartIndex :size_t;
      ColorCount :size_t;
      Colors :PFarColorArray;
    end;
  
  
  