⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defines.h

📁 open arj source
💻 H
📖 第 1 页 / 共 3 页
字号:
/* * $Id: defines.h,v 1.6 2003/07/15 16:35:17 andrew_belov Exp $ * --------------------------------------------------------------------------- * Various macros, OS-independent types, and so on, are to be declared here. * */#ifndef DEFINES_INCLUDED#define DEFINES_INCLUDED#include <limits.h>/* Nonspecific limits */#ifndef UCHAR_MAX #define UCHAR_MAX               255#endif#ifndef CHAR_BIT #define CHAR_BIT                  8#endif#ifndef LONG_MAX #define LONG_MAX        0x7FFFFFFFL#endif/* Archive header definitions */#define MAXMETHOD                  4    /* v 0.14+ */#define ARJ_VERSION               11    /* Current revision */#define ARJ_ANSI_VERSION           9    /* Version that introduced ANSI CP                                           (ARJ32 v 3.00-18/12/1998 ONLY!) */#define ARJ_M_VERSION              6    /* ARJ version that supports archive                                           last modification date. */#define ARJ_X_VERSION              1    /* decoder version */#define ARJ_G_VERSION              9    /* enhanced garble version */#define ARJ_NEWCRYPT_VERSION      10    /* New encryption standard version */#define ARJ_XD_VERSION             3    /* Version of decoder that supports                                           directories */#define ARJ_XU_VERSION            11    /* Version of decoder with UNIX support */#define ARJ_X_SUPPORTED           11    /* Currently supported level                                           (8 in official branch as of v 2.76) */#define ARJ_X_SFX                 11    /* Level supported by ARJSFX                                           (5 in official branch as of v 2.76) */#define ARJSEC_VERSION             2    /* Current ARJ-SECURITY version */#define DEFAULT_METHOD             1#define DEFAULT_TYPE               0    /* if type_sw is selected */#define HEADER_ID             0xEA60#define HEADER_ID_HI            0xEA#define HEADER_ID_LO            0x60#define FIRST_HDR_SIZE            30#define FIRST_HDR_SIZE_V          34#define EA_ID                    'E'    /* EA ID in extended header */#define UXSPECIAL_ID             'U'    /* UNIX special file ID */#define OWNER_ID                 'O'    /* Owner ID */#define OWNER_ID_NUM             'o'    /* Numeric owner ID *//* NLS */#define LANG_en                    0    /* English */#define LANG_fr                    1    /* French */#define LANG_de                    2    /* German */#define LANG_ru                    3    /* Russian *//* Registration-related data */#define REG_ID                0xABC0    /* Indicates a registered ARJSFX */#define UNREG_ID              0x1234    /* Indicates an unregistered ARJSFX */#define REG_HDR_SHIFT             20    /* Bytes to skip after signature */#define REG_HDR_LEN               32    /* Header size */#define REG_KEY1_SHIFT (REG_HDR_SHIFT+REG_HDR_LEN)#define REG_KEY1_LEN              10    /* Registration key #1 */#define REG_KEY2_SHIFT (REG_KEY1_SHIFT+REG_KEY1_LEN)#define REG_KEY2_LEN              10    /* Registration key #2 */#define REG_NAME_SHIFT (REG_KEY2_SHIFT+REG_KEY2_LEN)#define REG_NAME_LEN             100    /* Registration name */#define STD_REG_LEN              152    /* Length of the registration field */#define ARJSEC_RECORD_SIZE       120    /* Size of ARJ-SECURITY tail */#define ARJSEC_ITER             1021    /* # of encryption iterations *//* Explicit delays */#define BAD_CRC_DELAY              5    /* Integrity violations */#define SECURITY_DELAY             5    /* ARJ-SECURITY violations */#define STD_CHANGE_VOL_DELAY      10    /* Default delay when changing                                           volumes *//* Header flags */#define GARBLED_FLAG            0x01#define OLD_SECURED_FLAG        0x02#define ANSICP_FLAG             0x02    /* Matches with the ARJSEC v 1.x */#define VOLUME_FLAG             0x04#define EXTFILE_FLAG            0x08#define PROT_FLAG               0x08    /* Main header only (v 3.02+) */#define PATHSYM_FLAG            0x10#define BACKUP_FLAG             0x20#define SECURED_FLAG            0x40#define DUAL_NAME_FLAG          0x80    /* ARJ v 2.55+ ("-hf1" mode) *//* Extended header flags.   The following encryption flags can NOT be OR'ed together! */#define ENCRYPT_OLD                0    /* Standard encryption in pre-2.60 */#define ENCRYPT_STD                1    /* Standard ARJ encryption */#define ENCRYPT_GOST256            2    /* GOST 256-bit encryption (2.55+) */#define ENCRYPT_GOST256L           3    /* GOST 256-bit encryption (2.62d+)                                           allows 64-byte long passwords */#define ENCRYPT_GOST40             4    /* GOST 40-bit encryption (2.61+) */#define ENCRYPT_UNK               16    /* To be encrypted *//* Relocated flags */#define SFXSTUB_FLAG               1    /* Indicates SFXSTUB presence *//* Limits to ARJ archives */#define COMMENT_MAX             2048#define EXTENSION_MAX              9    /* For internal procedures */#define HEADERSIZE_MAX             (FIRST_HDR_SIZE+10+FILENAME_MAX+COMMENT_MAX)#define CHAPTERS_MAX             250    /* Limited by 1 byte for chapter # */#define RESERVED_CHAPTER       32764    /* For special markers */#define HIGHEST_CHAPTER (RESERVED_CHAPTER+1)#define MAX_FILE_SIZE       LONG_MAX    /* Size of compressed file *//* Encoding/decoding constants */#define CODE_BIT                  16#define THRESHOLD                  3#define DICSIZ                 26624#ifdef TILED #define FDICSIZ              DICSIZ#else #define FDICSIZ               32768    /* decode_f() dictionary size */#endif#define DICSIZ_MAX             32750#define BUFSIZ_DEFAULT         16384#define MAXDICBIT                 16#define MATCHBIT                   8#define MAXMATCH                 256#define NC (UCHAR_MAX+MAXMATCH+2-THRESHOLD)#define NP             (MAXDICBIT+1)#define CBIT                       9#define NT              (CODE_BIT+3)#define PBIT                       5#define TBIT                       5#if NT>NP#define NPT NT#else#define NPT NP#endif#define CTABLESIZE              4096#define PTABLESIZE               256#define STRTP                      9#define STOPP                     13#define STRTL                      0#define STOPL                      7#define PUTBIT_SIZE              512#define MIN_CRITICAL_BUFSIZ      512    /* The minimum size allowed by the                                           implementation */#define MIN_BUFSIZ              2048#define MAX_BUFSIZ       FAR_BLK_MAX#define MAX_USER_BUFSIZ        65535    /* This one is here for compatibility:                                           even if compiler doesn't allow such                                           large values, the user should know                                           nothing. */#define BUFSIZ_INCREMENT           6/* Message section defines */#define MSGTEXT_MAX              512    /* Maximum length of individual msg                                           (for copying far messages). It's                                           allowed for near FMSGs to be                                           larger *//* Search defines */#define SEARCH_STR_MAX            20    /* Maximum number of search patterns *//* Extended wildcard return status */#define XW_NONE                    0    /* No wildcards */#define XW_OK                      1    /* Indicates successful parsing */#define XW_PREM_END                2    /* Premature end of string */#define XW_OWC                     3    /* Open * wildcard */#define XW_UNPROC                  4    /* Unexpected unprocessed character */#define XW_MISMATCH                5    /* Comparision mismatch */#define XW_TERM                    6    /* Wildcard termination */#define XWP_NONE                   0    /* Parsing was pointless */#define XWP_TERM                  -1    /* Terminating '^' */#define XWP_MDASH                 -2    /* Dash clause: -] or - */#define XWP_OBRACKET              -3    /* Open bracket: [ */#define XWP_NBRACKET              -4    /* Null bracket pair: [] *//* Block operations */#define BOP_NONE                   0    /* No action */#define BOP_LIST                   1    /* List files to stdout ("arj s") */#define BOP_SEARCH                 2    /* Search for a pattern ("arj w") */#define BOP_COMPARE                3    /* Compare against disk files */#define BOP_DISPLAY                5    /* List without pause *//* Changing it would result in loss of compatibility: */#define CRC_MASK         0xFFFFFFFFL/* Console definitions */#define CONSOLE_LINE_LENGTH       80    /* Length of output lines *//* File types and limitations */#define ARJT_BINARY                0#define ARJT_TEXT                  1#define ARJT_COMMENT               2#define ARJT_DIR                   3#define ARJT_LABEL                 4#define ARJT_CHAPTER               5    /* Chapter mark - ARJ v 2.50+ */#define ARJT_UXSPECIAL             6    /* UNIX special file - ARJ v 2.77+ */#define TEXT_LCHAR                 7    /* Minimum displayable character */#define TEXT_UCHAR               127    /* Maximum displayable character */#define MIN_TEXT_SIZE            128    /* Minimum size for text files *//* ARJ commands */#define ARJ_CMD_ADD       ((int)'A')    /* Add files to archive */#define ARJ_CMD_EXEC      ((int)'B')    /* Execute command */#define ARJ_CMD_COMMENT   ((int)'C')    /* Comment archive files */#define ARJ_CMD_DELETE    ((int)'D')    /* Delete files from archive */#define ARJ_CMD_EXTR_NP   ((int)'E')    /* Extract, removing paths */#define ARJ_CMD_FRESHEN   ((int)'F')    /* Freshen files in archive */#define ARJ_CMD_GARBLE    ((int)'G')    /* Garble files in archive */#define ARJ_CMD_CHK_INT   ((int)'I')    /* Check integrity */#define ARJ_CMD_JOIN      ((int)'J')    /* Join archives */#define ARJ_CMD_REM_BAK   ((int)'K')    /* Remove obsolete backup files */#define ARJ_CMD_LIST      ((int)'L')    /* List archive contents */#define ARJ_CMD_MOVE      ((int)'M')    /* Move files to archive */#define ARJ_CMD_RENAME    ((int)'N')    /* Rename files in archive */#define ARJ_CMD_ORDER     ((int)'O')    /* Order archive files */#define ARJ_CMD_PRINT     ((int)'P')    /* List contents */#define ARJ_CMD_RECOVER   ((int)'Q')    /* Recover damaged archive */#define ARJ_CMD_REMPATH   ((int)'R')    /* Remove paths from filenames */#define ARJ_CMD_SAMPLE    ((int)'S')    /* List to screen w/pause */#define ARJ_CMD_TEST      ((int)'T')    /* Test an archive */#define ARJ_CMD_UPDATE    ((int)'U')    /* Update files in archive */#define ARJ_CMD_V_LIST    ((int)'V')    /* Verbosely list contents of archive */#define ARJ_CMD_WHERE     ((int)'W')    /* Text search */#define ARJ_CMD_EXTRACT   ((int)'X')    /* Extract files from archive */#define ARJ_CMD_COPY      ((int)'Y')    /* Copy archive with new options */#define ARJ_CMD_SECURE    ((int)'Z')    /* Create a security envelope */#define ARJ_CMD_ADDC      ((int)'1')    /* Add a file to chapter archive */#define ARJ_CMD_CNVC      ((int)'2')    /* Convert archive to a chapter one */#define ARJ_CMD_DELC      ((int)'3')    /* Delete a chapter */#define ARJDISP_CMD_START ((int)'+')    /* Put ARJDISP banner */#define ARJDISP_CMD_END   ((int)'-')    /* Clear ARJDISP screen *//* Command line limits */#define CMDLINE_MAX              512    /* Length of command-line options *//* ARJ errorlevels */#define ARJ_ERL_SUCCESS            0#define ARJ_ERL_WARNING            1#define ARJ_ERL_FATAL_ERROR        2#define ARJ_ERL_CRC_ERROR          3#define ARJ_ERL_ARJSEC_ERROR       4#define ARJ_ERL_DISK_FULL          5#define ARJ_ERL_CANTOPEN           6#define ARJ_ERL_USER_ERROR         7

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -