For Euphoria

From TotalcmdWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
-- Contents of file wcxhead.e (Language: Euphoria <http://www.rapideuphoria.com/>)
-- It contains definitions of error codes, flags and structures.

global constant

-- Error codes returned to calling application
E_END_ARCHIVE    = 10,        -- No more files in archive
E_NO_MEMORY      = 11,        -- Not enough memory
E_BAD_DATA       = 12,        -- Data is bad
E_BAD_ARCHIVE    = 13,        -- CRC error in archive data
E_UNKNOWN_FORMAT = 14,        -- Archive format unknown
E_EOPEN          = 15,        -- Cannot open existing file
E_ECREATE        = 16,        -- Cannot create file
E_ECLOSE         = 17,        -- Error closing file
E_EREAD          = 18,        -- Error reading from file
E_EWRITE         = 19,        -- Error writing to file
E_SMALL_BUF      = 20,        -- Buffer too small
E_EABORTED       = 21,        -- Function aborted by user
E_NO_FILES       = 22,        -- No files found
E_TOO_MANY_FILES = 23,        -- Too many files to pack
E_NOT_SUPPORTED  = 24,        -- Function not supported


-- Flags for unpacking
PK_OM_LIST    =        0,
PK_OM_EXTRACT =        1,

-- Flags for ProcessFile
PK_SKIP    =           0,     -- Skip this file
PK_TEST    =           1,     -- Test file integrity
PK_EXTRACT =           2,     -- Extract file to disk

-- Flags passed through ChangeVolProc
PK_VOL_ASK    =        0,     -- Ask user for location of next volume
PK_VOL_NOTIFY =        1,     -- Notify app that next volume will be unpacked


-- Flags for packing

-- For PackFiles
PK_PACK_MOVE_FILES =   1,     -- Delete original after packing
PK_PACK_SAVE_PATHS =   2,     -- Save path names of files

-- Returned by GetPackerCaps
PK_CAPS_NEW        =   1,     -- Can create new archives
PK_CAPS_MODIFY     =   2,     -- Can modify exisiting archives
PK_CAPS_MULTIPLE   =   4,     -- Archive can contain multiple files
PK_CAPS_DELETE     =   8,     -- Can delete files
PK_CAPS_OPTIONS    =  16,     -- Supports the options dialogbox
PK_CAPS_MEMPACK    =  32,     -- Supports packing in memory
PK_CAPS_BY_CONTENT =  64,     -- Detect archive type by content
PK_CAPS_SEARCHTEXT = 128,     -- Allow searching for text in archives
                              --   created with this plugin
PK_CAPS_HIDE       = 256,     -- Show as normal files (hide packer icon),
                              --   open with [Ctrl]+[PgDn], not Enter

-- Flags for packing in memory
MEM_OPTIONS_WANTHEADERS = 1,  -- Return archive headers with packed data

-- Errors returned by PackToMem
MEMPACK_OK   =            0,  -- Function call finished OK, but there is more data
MEMPACK_DONE =            1   -- Function call finished OK, there is no more data


-- Structures

global constant      -- struct OpenArchiveData
   OPEN_ARCNAME      =  0,    -- C_POINTER
   OPEN_OPENMODE     =  4,    -- C_LONG
   OPEN_OPENRESULT   =  8,    -- C_LONG
   OPEN_CMTBUF       = 12,    -- C_POINTER
   OPEN_CMTBUFSIZE   = 16,    -- C_LONG
   OPEN_CMTSIZE      = 20,    -- C_LONG
   OPEN_CMTSTATE     = 24,    -- C_LONG
SIZEOF_ARCHIVEDATA   = 28


global constant      -- struct HeaderData
   HEADER_ARCNAME    =   0,   -- 260 chars
   HEADER_FILENAME   = 260,   -- 260 chars
   HEADER_FLAGS      = 520,   -- C_LONG
   HEADER_PACKSIZE   = 524,   -- C_LONG
   HEADER_UNPSIZE    = 528,   -- C_LONG
   HEADER_HOSTOS     = 532,   -- C_LONG  (for compatibility with unrar.dll only, should be set to zero)
   HEADER_FILECRC    = 536,   -- C_LONG  (32-bit CRC (cyclic redundancy check) checksum of the file.
                              --          If not available, set to zero.)
   HEADER_FILETIME   = 540,   -- C_LONG
   HEADER_UNPVER     = 544,   -- C_LONG
   HEADER_METHOD     = 548,   -- C_LONG
   HEADER_FILEATTR   = 552,   -- C_LONG
   HEADER_CMTBUF     = 556,   -- C_POINTER
   HEADER_CMTBUFSIZE = 560,   -- C_LONG
   HEADER_CMTSIZE    = 564,   -- C_LONG
   HEADER_CMTSTATE   = 568,   -- C_LONG
SIZEOF_HEADERDATA    = 572


global constant      -- struct PackDefaultParams
   PARAMS_SIZE                =   0,   -- C_LONG
   PARAMS_INTERFACEVERSIONLOW =   4,   -- C_ULONG
   PARAMS_INTERFACEVERSIONHI  =   8,   -- C_ULONG
   PARAMS_DEFAULTININAME      =  12,   -- 260 chars
SIZEOF_DEFAULTPARAMS          = 272



Back to Packer plugins developer guide