X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fobj2buck.c;h=7fee3d54a145a663aad7ca1393697a2cdcd24d93;hb=997624f88f37bec5cb96cf9fc3b3cac05ccc6ed8;hp=afd4c1dff0d4c530037faf1417d19372088359c1;hpb=4aa712644886cd4ebb82803a19aba6d39eaec8c2;p=libucw.git diff --git a/lib/obj2buck.c b/lib/obj2buck.c index afd4c1df..7fee3d54 100644 --- a/lib/obj2buck.c +++ b/lib/obj2buck.c @@ -1,13 +1,16 @@ /* - * Generating V33 buckets + * Generating Buckets from Objects * * (c) 2004, Robert Spalek + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ #include "lib/lib.h" #include "lib/fastbuf.h" -#include "lib/obj2buck.h" #include "lib/bucket.h" +#include "lib/object.h" #include "charset/unistream.h" #include @@ -18,7 +21,19 @@ static uns use_v33; void attr_set_type(uns type) { - use_v33 = (type == BUCKET_TYPE_V33 || type == BUCKET_TYPE_V33_LIZARD); + switch (type) + { + case BUCKET_TYPE_PLAIN: + case BUCKET_TYPE_V30: + use_v33 = 0; + break; + case BUCKET_TYPE_V33: + case BUCKET_TYPE_V33_LIZARD: + use_v33 = 1; + break; + default: + die("Don't know how to generate buckets of type %08x", type); + } } inline byte *