Cygwin なんでも掲示板

一覧最新記事過去一覧 | 検索FAQアンテナHOME
(新規投稿・発言はできません)

No.385  Re[2]:LHA1.14 との相性?
発言者: BOK
発言日: 2002 05/16 09:10
 
リスティングや、部分解凍でChecksumエラーが発生していました。ヘッダの取り込み部分を統一?して解消しました。
以下、変更箇所です。オリジナルソースは1.14i

では。


*** lhlist.c        2002-05-16 09:05:32+09        1.1
--- lhlist.c        2002-05-16 09:04:50+09
***************
*** 325,331 ****
                }

                if (afp != stdin)
!                         fseek(afp, hdr.packed_size, SEEK_CUR);
                else {
                        i = hdr.packed_size;
                        while (i--)
--- 325,331 ----
                }

                if (afp != stdin)
!                         fseek(afp, pos+hdr.packed_size, SEEK_SET);
                else {
                        i = hdr.packed_size;
                        while (i--)

*** lhext.c        2002-05-14 09:31:25+09        1.1
--- lhext.c        2002-05-14 09:34:26+09
***************
*** 399,415 ****
        /* extract each files */
        while (get_header(afp, &hdr)) {
                if (need_file(hdr.name)) {
-                         pos = ftell(afp);
                        extract_one(afp, &hdr);
                        fseek(afp, pos + hdr.packed_size, SEEK_SET);
!                 } else {
!                         if (afp != stdin)
!                                 fseek(afp, hdr.packed_size, SEEK_CUR);
!                         else {
!                                 int i = hdr.packed_size;
!                                 while (i--)
!                                         fgetc(afp);
!                         }
                }
        }

--- 399,415 ----
        /* extract each files */
        while (get_header(afp, &hdr)) {
                if (need_file(hdr.name)) {
                        extract_one(afp, &hdr);
+                 }
+
+                 if (afp != stdin) {
+                         pos = ftell(afp);
                        fseek(afp, pos + hdr.packed_size, SEEK_SET);
!                 }
!                 else {
!                         int i = hdr.packed_size;
!                         while (i--)
!                                 fgetc(afp);
                }
        }


▼関連発言

381:LHA1.14 との相性? [BOK] 05/15
 └383:Re:LHA1.14 との相性? [名無し] 05/15
  └385:Re[2]:LHA1.14 との相性? [BOK] 05/16
   └391:Re[3]:LHA1.14 との相性? [BOK] 05/20 <

Pass 保存

早田のホームページへ
CGIROOM