From 1c50d6836601b8a6258dd6e299b3f299aa8d4a0f Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 15 Nov 2008 16:21:23 +0100 Subject: Packed size info support --- unrar/unrar.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'unrar') diff --git a/unrar/unrar.c b/unrar/unrar.c index 47e3cb3..b35f37e 100644 --- a/unrar/unrar.c +++ b/unrar/unrar.c @@ -1,5 +1,5 @@ /* UNRAR plugin for Tux Commander - * version 0.3.3, designed for unrar v3.8.2 + * version 0.3.4, designed for unrar v3.8.2 * Copyright (C) 2008 Tomas Bzatek * Check for updates on tuxcmd.sourceforge.net * @@ -55,8 +55,8 @@ enum HOST_SYSTEM { }; -#define VERSION "0.3.3" -#define BUILD_DATE "2008-11-14" +#define VERSION "0.3.4" +#define BUILD_DATE "2008-11-15" #define DEFAULT_BLOCK_SIZE 65536 @@ -80,10 +80,10 @@ struct TVFSGlobs { struct PathTree *files; struct VfsFilelistData *vfs_filelist; - u_int64_t total_size; + int64_t total_size; - u_int64_t extract_file_size; - u_int64_t extract_done; + int64_t extract_file_size; + int64_t extract_done; gboolean extract_cancelled; TVFSAskQuestionCallback callback_ask_question; @@ -370,7 +370,8 @@ TVFSResult VFSOpen(struct TVFSGlobs *globs, char *sName) struct TVFSItem *item = (struct TVFSItem*)malloc(sizeof(struct TVFSItem)); memset(item, 0, sizeof(struct TVFSItem)); - item->iSize = (u_int64_t)((u_int64_t)(header->UnpSizeHigh * 0x100000000) + (u_int64_t)header->UnpSize); + item->iSize = (int64_t)((int64_t)(header->UnpSizeHigh * 0x100000000) + (int64_t)header->UnpSize); + item->iPackedSize = (int64_t)((int64_t)(header->PackSizeHigh * 0x100000000) + (int64_t)header->PackSize); globs->total_size += item->iSize; if ((header->Flags & 0x00e0 /* LHD_WINDOWMASK */ ) == 0x00e0 /* LHD_DIRECTORY */) item->ItemType = vDirectory; @@ -710,7 +711,7 @@ TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char if (strcmp(ssrc, asrc) == 0) { // fprintf(stderr, "(II) VFSCopyOut: extract_file_path(sDstName) = '%s', extract_file_name(sDstName) = '%s' \n", extract_file_path(sDstName), extract_file_name(sDstName)); globs->extract_done = 0; - globs->extract_file_size = (u_int64_t)((u_int64_t)(header->UnpSizeHigh * 0x100000000) + (u_int64_t)header->UnpSize); + globs->extract_file_size = (int64_t)((int64_t)(header->UnpSizeHigh * 0x100000000) + (int64_t)header->UnpSize); globs->extract_cancelled = FALSE; int res2 = RARProcessFile(handle, RAR_EXTRACT, NULL, (char *)sDstName); -- cgit v1.2.3