[问题] FileHeader 的结构???

楼主: VElysian (くるみ)   2008-08-25 20:05:02
下面是我从 https://opensvn.csie.org/pttbbs/trunk/ 找到的 FileHeader
并且计算其长度如下:
#define IDLEN 12 /* Length of bid/uid */
#define TTLEN 64 /* Length of title */
#define FNLEN 28 /* Length of filename */
typedef struct fileheader_t
{ /* 128 bytes */
───────────────────────────────────────
型态 名称 长度 解释
───────────────────────────────────────
01 char filename[FNLEN] 28 ( 1~ 28)
02 time4_t modified 2 ( 29~ 30)
03 char pad 1 ( 31~ 31)
04 char recommend 1 ( 32~ 32)
05 char owner[IDLEN + 2] 14 ( 33~ 46)
06 char date[6] 6 ( 47~ 52)
07 char title[TTLEN + 1] 65 ( 53~117)
08 char pad2 1 (118~118)
09 union multi 8 (119~126)
10 unsigned char filemode 1 (127~127)
11 char pad3[3] 1 (128~128)
───────────────────────────────────────
} PACKSTRUCT fileheader_t
───────────────────────────────────────
有一个地方我觉得怪怪的,
我对照了一下信件备份中的 .DIR 档,发现作者的字段好像是从位置 35 开始的...
请问为什么会这样呢?? 是我算错了吗???
另外再问一下上面每一个变量的功用以及应该要如何读取。 谢谢。 ^_^

Links booklink

Contact Us: admin [ a t ] ucptt.com