summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-11-15 16:21:23 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-11-15 16:21:23 +0100
commit1c50d6836601b8a6258dd6e299b3f299aa8d4a0f (patch)
tree137c71a069d96a5695a2c73f11916b6ef6399fbd
parent4fd3fefa6db8b77915bc67d4623ef3176a431004 (diff)
downloadtuxcmd-modules-1c50d6836601b8a6258dd6e299b3f299aa8d4a0f.tar.xz
Packed size info supportv0.6.59
-rw-r--r--common/vfs_types.h7
-rw-r--r--gvfs/gvfs.c5
-rw-r--r--libarchive/libarchive.c9
-rw-r--r--unrar/unrar.c17
-rw-r--r--zip/zip.cpp9
5 files changed, 26 insertions, 21 deletions
diff --git a/common/vfs_types.h b/common/vfs_types.h
index 29b51b4..5e09ab6 100644
--- a/common/vfs_types.h
+++ b/common/vfs_types.h
@@ -138,9 +138,10 @@ enum TVFSItemType {
struct TVFSItem {
char *FName;
- char *FDisplayName;
- u_int64_t iSize;
- __time_t m_time; // numbers should be located before the other variables (bug?)
+ char *FDisplayName; // valid UTF-8 string
+ int64_t iSize;
+ int64_t iPackedSize; // set to -1 if plugin doesn't support this feature
+ __time_t m_time; // numbers should be located before the other variables (bug?)
__time_t a_time;
__time_t c_time;
__mode_t iMode;
diff --git a/gvfs/gvfs.c b/gvfs/gvfs.c
index a5734cf..7e0f74b 100644
--- a/gvfs/gvfs.c
+++ b/gvfs/gvfs.c
@@ -31,8 +31,8 @@
-#define VERSION "0.1.4"
-#define BUILD_DATE "2008-10-28"
+#define VERSION "0.1.5"
+#define BUILD_DATE "2008-11-15"
#define DEFAULT_BLOCK_SIZE 0x10000 /* 64kB */
#define CONST_DEFAULT_QUERY_INFO_ATTRIBUTES G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_STANDARD_NAME "," \
@@ -619,6 +619,7 @@ g_file_info_to_TVFSItem (GFileInfo *info, struct TVFSItem *Item)
Item->FDisplayName = g_strdup (g_file_info_get_display_name (info));
Item->sLinkTo = g_file_info_get_symlink_target (info) == NULL ? NULL : g_strdup (g_file_info_get_symlink_target (info));
Item->iSize = g_file_info_get_size (info);
+ Item->iPackedSize = -1;
Item->iMode = g_file_info_get_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_MODE);
Item->m_time = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
diff --git a/libarchive/libarchive.c b/libarchive/libarchive.c
index be6326b..efdf379 100644
--- a/libarchive/libarchive.c
+++ b/libarchive/libarchive.c
@@ -1,5 +1,5 @@
/* libarchive plugin for Tux Commander
- * version 0.1.1, designed for libarchive 2.5.5
+ * version 0.1.2, designed for libarchive 2.5.5
* Copyright (C) 2008 Tomas Bzatek <tbzatek@users.sourceforge.net>
* Check for updates on tuxcmd.sourceforge.net
*
@@ -47,8 +47,8 @@
-#define VERSION "0.1.1"
-#define BUILD_DATE "2008-10-28"
+#define VERSION "0.1.2"
+#define BUILD_DATE "2008-11-15"
#define DEFAULT_BLOCK_SIZE 65536
@@ -237,7 +237,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)archive_entry_size(entry);
+ item->iSize = (int64_t)archive_entry_size(entry);
+ item->iPackedSize = -1; /* no support */
globs->total_size += item->iSize;
mode_t mode = archive_entry_mode(entry);
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 <tbzatek@users.sourceforge.net>
* 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);
diff --git a/zip/zip.cpp b/zip/zip.cpp
index 75cb37a..14698ea 100644
--- a/zip/zip.cpp
+++ b/zip/zip.cpp
@@ -1,5 +1,5 @@
/* ZIP plugin for Tux Commander
- * version 0.5.2, designed for ZipArchive v3.2.0
+ * version 0.5.3, designed for ZipArchive v3.2.0
* Copyright (C) 2008 Tomas Bzatek <tbzatek@users.sourceforge.net>
* Check for updates on tuxcmd.sourceforge.net
*
@@ -47,8 +47,8 @@
-#define VERSION "0.5.2"
-#define BUILD_DATE "2008-11-14"
+#define VERSION "0.5.3"
+#define BUILD_DATE "2008-11-15"
#define DEFAULT_BLOCK_SIZE 65536
@@ -205,7 +205,8 @@ void build_global_filelist(struct TVFSGlobs *globs)
struct TVFSItem *item = (struct TVFSItem*)malloc(sizeof(struct TVFSItem));
memset(item, 0, sizeof(struct TVFSItem));
- item->iSize = (u_int64_t)fh->m_uUncomprSize;
+ item->iSize = (int64_t)fh->m_uUncomprSize;
+ item->iPackedSize = (int64_t)fh->m_uComprSize;
if (fh->IsDirectory())
item->ItemType = vDirectory;
else item->ItemType = vRegular;