TFarStandardFunctions

Far Manager

TFarStandardFunctions

The FarStandardFunctions stucture for Delphi:
TFarStandardFunctions = packed record
  StructSize: integer;
  atoi: TFarStdAToI;
  atoi64: TFarStdAToI64;
  itoa: TFarStdIToA;
  itoa64: TFarStdIToA64;

  sprintf: pointer;
  sscanf:  pointer;
  qsort: TFarStdQSort;
  bsearch: TFarStdBSearch;
  qsortex: TFarStdQSortEx;

  Reserved: packed array[0..8] of DWORD;

  LIsLower:    TFarStdLocalIsLower;
  LIsUpper:    TFarStdLocalIsUpper;
  LIsAlpha:    TFarStdLocalIsAlpha;
  LIsAlphanum: TFarStdLocalIsAlphaNum;
  LUpper:      TFarStdLocalUpper;
  LLower:      TFarStdLocalLower;
  LUpperBuf:   TFarStdLocalUpperBuf;
  LLowerBuf:   TFarStdLocalLowerBuf;
  LStrupr:     TFarStdLocalStrUpr;
  LStrlwr:     TFarStdLocalStrLwr;
  LStricmp:    TFarStdLocalStrICmp;
  LStrnicmp:   TFarStdLocalStrNICmp;

  Unquote: TFarStdUnquote;
  ExpandEnvironmentStr: TFarStdExpandEnvironmentStr;
  LTrim: TFarStdLTrim;
  RTrim: TFarStdRTrim;
  Trim: TFarStdTrim;
  TruncStr: TFarStdTruncStr;
  TruncPathStr: TFarStdTruncPathStr;
  QuoteSpaceOnly: TFarStdQuoteSpaceOnly;
  PointToName: TFarStdPointToName;
  GetPathRoot: TFarStdGetPathRoot;
  AddEndSlash: TFarStdAddEndSlash;
  CopyToClipboard: TFarStdCopyToClipboard;
  PasteFromClipboard: TFarStdPasteFromClipboard;
  FarKeyToName: TFarStdKeyToKeyName;
  FarNameToKey: TFarStdKeyNameToKey;
  FarInputRecordToKey: TFarStdInputRecordToKey;
  XLAT: TFarStdXLAT;
  GetFileOwner: TFarStdGetFileOwner;
  GetNumberOfLinks: TFarStdGetNumberOfLinks;
  FarRecurseSearch: TFarRecursiveSearch;
  MkTemp: TFarStdMkTemp;
  DeleteBuffer: TFarStdDeleteBuffer;
  ProcessName: TFarStdProcessName;
  MkLink: TFarStdMkLink;
  ConvertNameToReal: TFarStdConvertNameToReal;
  GetReparsePointInfo: TFarStdGetReparsePointInfo;
end;
PFarStandardFunctions = ^TFarStandardFunctions;

Where:

TFarStdatoi = function(
  S: PChar): integer; stdcall;

TFarStdAToI64 = function(
  S: PChar): int64; stdcall;

TFarStdIToA = function(
  Value: integer;
  Str: PChar;
  Radix: integer): PChar; stdcall;

TFarStdIToA64 = function(
  Value: int64;
  Str: PChar;
  Radix: integer): PChar; stdcall;

  TFarStdQSortFunc = function(
    Param1: pointer;
    Param2: pointer): integer; cdecl;

TFarStdQSort = procedure(
  Base: pointer;
  NElem: size_t;
  Width: size_t;
  fcmp: TFarStdQSortFunc); stdcall;

TFarStdBSearch = procedure(
  Key: pointer;
  Base: pointer;
  NElem: size_t;
  Width: size_t;
  fcmp: TFarStdQSortFunc); stdcall;

TFarStdLocalIsLower = function(
  Ch: integer): integer; stdcall;

TFarStdLocalIsUpper = function(
  Ch: integer): integer; stdcall;

TFarStdLocalIsAlpha = function(
  Ch: integer): integer; stdcall;

TFarStdLocalIsAlphaNum = function(
  Ch: integer): integer; stdcall;

TFarStdLocalUpper = function(
  LowerChar: integer): integer; stdcall;

TFarStdLocalLower = function(
  UpperChar: integer): integer; stdcall;

TFarStdLocalUpperBuf = procedure(
  Buf: PChar;
  Length: integer); stdcall;

TFarStdLocalLowerBuf = procedure(
  Buf: PChar;
  Length: integer); stdcall;

TFarStdLocalStrUpr = procedure(
  s1: PChar); stdcall;

TFarStdLocalStrLwr= procedure(
  s1: PChar); stdcall;

TFarStdLocalStrICmp = function(
  s1: PChar;
  s2: PChar): integer; stdcall;

TFarStdLocalStrNICmp = function(
  s1: PChar;
  s2: PChar;
  n: integer): integer; stdcall;

TFarStdUnquote = procedure(
  Str: PChar); stdcall;

TFarStdExpandEnvironmentStr = function(
  Src: PChar;
  Dst: PChar;
  Size: DWORD): DWORD; stdcall;

TFarStdLTrim = function(
  Str: PChar): PChar; stdcall;

TFarStdRTrim = function(
  Str: PChar): PChar; stdcall;

TFarStdTrim = function(
  Str: PChar): PChar; stdcall;

TFarStdTruncStr = function(
  Str: PChar;
  MaxLength: integer): PChar; stdcall;

TFarStdTruncPathStr = function(
  Str: PChar;
  MaxLength: integer): PChar; stdcall;

TFarStdQuoteSpaceOnly = function(
  Str: PChar): PChar; stdcall;

TFarStdPointToName = function(
  Path: PChar): PChar; stdcall;

TFarStdGetPathRoot = procedure(
  Path: PChar;
  Root: PChar); stdcall;

TFarStdAddEndSlash = function(
  Path: PChar): integer; stdcall;

TFarStdCopyToClipboard = function(
  Data: PChar): integer; stdcall;

TFarStdPasteFromClipboard = function: PChar; stdcall;

TFarStdKeyToKeyName = function(
  Key: integer; KeyName: PChar; Size: integer): BOOL; stdcall;

TFarStdKeyNameToKey = function(
  Name: PChar): integer; stdcall;

TFarStdInputRecordToKey = function(
  var R: INPUT_RECORD): integer; stdcall;

TFarStdXLAT = function(
  Line: PChar;
  StartPos: integer;
  EndPos: integer;
  TableSet: PCharTableSet;
  Flags: DWORD): PChar; stdcall;

TFarStdGetFileOwner = function(
  Computer: PChar;
  Name: PChar;
  Owner: PChar): integer; stdcall;

TFarStdGetNumberOfLinks = function(
  Name: PChar): integer; stdcall;

TFRSFunction = function(
  var FindData: TWin32FindDataEx;
  FullName: PChar): integer; stdcall;

TFarRecursiveSearch = procedure(
  InitDir: PChar;
  Mask: PChar;
  Func: TFRSFunction;
  Flags: DWORD); stdcall;

TFarStdMkTemp = function(
  Dest: PChar;
  Template: PChar): PChar; stdcall;

TFarStdDeleteBuffer = procedure(
  Buffer: PChar); stdcall;

TFarStdProcessName = function(
  Param1: PChar;
  Param2: PChar;
  Flags: DWORD): integer;

TFarStdMkLink = function(
  const Src: PChar;
  const Dest: PChar;
  Flags: DWORD): integer;

TFarStdConvertNameToReal = function(
  const Src: PChar;
  Dest: PChar;
  DestSize: integer): integer;

TFarStdGetReparsePointInfo = function(
  const Src: PChar;
  Dest: PChar;
  DestSize: integer): integer;