Re: fileheader

看板PttCurrent作者時間21年前 (2004/12/06 22:04), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/5 (看更多)
※ 引述《in2.bbs@ptt.cc (敬請期待 :P)》之銘言: : ※ 引述《lxb.bbs@bbs.hkday.net (努力! 根性戰隊)》之銘言: : : 由於 hkday 已改用了重新編制的 fileheader, 而 cptt 的版本也有了不同, : : 且列如下: : : ptt (April) ptt (Dec) hkday(Dec) : : ======================================================================== : : sizeof(fileheader_t) 128 bytes 128 bytes 128 bytes : : fhdr.filename 1 - 33 1 - 33 1 - 33 : : fhdr.recommend 34 34 34 : : fhdr.owner 35 - 48 35 - 48 35 - 48 : : fhdr.date 49 - 54 (char) 49 - 54 (char) 49 - 52 (time_t) : time_t 在 64-bit 的模式下 (ex AMD64) 會是 8 bytes 長, : 放在這邊似乎有危險 :p 放心,fileheader_t是放在struct裡再寫進去file, 而不會直接引用以上的數字來定位。 所以在64-bit的模式下,time_t變大, 整個結構也會同時變大,最終也不會出現危險的情況。 唯一不相容的, 是舊的.DIR要轉換一下才可以放在64-bit模式用。 但除非一大早就預留了64-bit,這些轉換很難避免吧。 -- Ferryman, if you please, take me across the raging sea. 1 5 |5 - 5 6 | 4 - 1 1 |44 3 4 5 | 3 - For a few gems, I take your boat. 1 1|5 5 5 5 6 | 4 - I cannot swim. I cannot float. 1 1 |4 3 4 3 2 | 1 - - | 0 - || -- ※ 發信站: 香港地(hkday.net) ◆ From: 218.254.198.186
文章代碼(AID): #11j6S000 (PttCurrent)
討論串 (同標題文章)
文章代碼(AID): #11j6S000 (PttCurrent)