ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Urlader/urlib.h
(Generate patch)

Comparing Urlader/urlib.h (file contents):
Revision 1.2 by root, Mon Jan 2 09:23:04 2012 UTC vs.
Revision 1.5 by root, Fri Jan 6 07:56:36 2012 UTC

1#ifndef URLIB_H_ 1#ifndef URLIB_H_
2#define URLIB_H_ 2#define URLIB_H_
3 3
4#define URLADER "urlader" 4#define URLADER "urlader"
5#define URLADER_VERSION "1.0" /* a decimal number, not a version string */ 5#define URLADER_VERSION "1.0" /* a decimal number, not a version string */
6
7#define MAX_ARGC 32 /* maximum number of arguments */
8#define MAX_ARGS 256 /* maximum TOTAL length of arguments */
9 6
10enum 7enum
11{ 8{
12 T_NULL, // 5 9 T_NULL, // 5
13 T_META, // 1 : exe_id, exe_ver 10 T_META, // 1 : exe_id, exe_ver
23 F_LZF = 0x01, 20 F_LZF = 0x01,
24 F_EXEC = 0x10, 21 F_EXEC = 0x10,
25 F_NULL = 0 22 F_NULL = 0
26}; 23};
27 24
28#define TAIL_MAGIC "sChMoRPAcK_0" 25#define TAIL_MAGIC "ScHmOrp_PaCk_000"
29 26
30struct u_pack_hdr 27struct u_pack_hdr
31{ 28{
32 unsigned char type; 29 unsigned char type;
33 unsigned char flags; 30 unsigned char flags;
37 34
38#define u_16(ptr) (((ptr)[0] << 8) | (ptr)[1]) 35#define u_16(ptr) (((ptr)[0] << 8) | (ptr)[1])
39#define u_32(ptr) (((ptr)[0] << 24) | ((ptr)[1] << 16) | ((ptr)[2] << 8) | (ptr)[3]) 36#define u_32(ptr) (((ptr)[0] << 24) | ((ptr)[1] << 16) | ((ptr)[2] << 8) | (ptr)[3])
40 37
41struct u_pack_tail { 38struct u_pack_tail {
42 unsigned char max_filesize[4]; 39 unsigned char max_uncompressed[4]; /* maximum uncompressed file size */
43 unsigned char size[4]; 40 unsigned char size[4]; /* how many bytes to seke backwards from end(!) of tail */
41 unsigned char reserved[8]; /* must be 0 */
44 char magic[12]; 42 char magic[16];
43 char md5_head[16]; /* md5(urlader) or 0, if there is no checksum */
44 char md5_pack[16]; /* md5(pack) or 0, if there is no checksum */
45}; 45};
46 46
47#endif 47#endif
48 48

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines