OSDN Git Service

Merge branch 'master' of github.com:jca02266/lha
[lha/lha.git] / src / pm2.c
index a90e203..c9e2e3a 100644 (file)
--- a/src/pm2.c
+++ b/src/pm2.c
@@ -1,9 +1,30 @@
 /***********************************************************
        pm2.c -- extract pmext2 coding
 ***********************************************************/
+/*
+  Copyright (c) 1999 Maarten ter Huurne
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+*/
 #include "lha.h"
-#include "pm2hist.h"
-#include "pm2tree.h"
 
 static off_t nextcount;
 static unsigned long lastupdate;
@@ -76,7 +97,7 @@ decode_c_pm2(void)
             break;
         }
     }
-    gettree1 = tree_get(&tree1);        /* value preserved for decode_p */
+    gettree1 = tree1_get();        /* value preserved for decode_p */
     if (gettree1 >= 29) {
         error("Bad table");
         exit(1);
@@ -104,7 +125,7 @@ decode_p_pm2(void)
         delta = 0;
     }
     else if (gettree1 < 28) {   /* n-byte repeat with offset 0..8191 */
-        gettree2 = tree_get(&tree2);
+        gettree2 = tree2_get();
         if (gettree2 == 0) {
             nbits = 6;
             delta = 0;