Author: colossus
Date: 2006-07-27 07:28:39 +0000 (Thu, 27 Jul 2006)
New Revision: 22529
Modified:
xarchiver/trunk/configure.in.in
xarchiver/trunk/src/callbacks.c
xarchiver/trunk/src/callbacks.h
xarchiver/trunk/src/iso.c
Log:
Modified configure.in.in to allow the support to 64bit during compilation.
Added some further iso info in the iso properties window.
Modified: xarchiver/trunk/configure.in.in
===================================================================
--- xarchiver/trunk/configure.in.in 2006-07-26 12:25:23 UTC (rev 22528)
+++ xarchiver/trunk/configure.in.in 2006-07-27 07:28:39 UTC (rev 22529)
@@ -61,6 +61,7 @@
dnl *** Work-around system-specific limitations ***
dnl ***********************************************
AC_SYS_LARGEFILE()
+CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
dnl **********************************
dnl *** Check for standard headers ***
Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c 2006-07-26 12:25:23 UTC (rev 22528)
+++ xarchiver/trunk/src/callbacks.c 2006-07-27 07:28:39 UTC (rev 22529)
@@ -29,6 +29,7 @@
extern GList *ArchiveType;
extern GList *ArchiveSuffix;
extern gboolean cli;
+struct iso_primary_descriptor ipd;
#ifndef HAVE_STRCASESTR
/*
@@ -810,8 +811,22 @@
gboolean isISO ( FILE *ptr )
{
- if ( DetectImage(ptr) > 0 )
+ int offset_image;
+ if ((offset_image = DetectImage(ptr)) > 0 )
+ {
+ fseek ( ptr , offset_image, SEEK_SET );
+ fread ( &ipd, 1, sizeof(ipd), ptr );
+ ipd.system_id[31] = '\0';
+ ipd.volume_id[31] = '\0';
+ ipd.copyright_file_id[36] = '\0';
+ ipd.abstract_file_id[36] = '\0';
+ ipd.bibliographic_file_id[36] = '\0';
+ ipd.volume_set_id[127] = '\0';
+ ipd.publisher_id[127] = '\0';
+ ipd.preparer_id[127] = '\0';
+ ipd.application_id[127] = '\0';
return TRUE;
+ }
else
return FALSE;
}
@@ -1276,6 +1291,13 @@
g_free (text);
/* Image type */
gtk_entry_set_text ( GTK_ENTRY (image_type_entry),archive->tmp);
+ /* System ID */
+ gtk_entry_set_text ( GTK_ENTRY (system_id_entry),ipd.system_id);
+ /* Volume ID */
+ gtk_entry_set_text ( GTK_ENTRY (volume_id_entry),ipd.volume_id);
+ /* Application ID */
+ gtk_entry_set_text ( GTK_ENTRY (application_entry),ipd.application_id);
+
gtk_widget_show (iso_properties_win);
}
Modified: xarchiver/trunk/src/callbacks.h
===================================================================
--- xarchiver/trunk/src/callbacks.h 2006-07-26 12:25:23 UTC (rev 22528)
+++ xarchiver/trunk/src/callbacks.h 2006-07-27 07:28:39 UTC (rev 22529)
@@ -22,6 +22,8 @@
#define _GNU_SOURCE
#include <string.h>
+#define ISODCL(from, to) (to - from + 1)
+
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <errno.h>
Modified: xarchiver/trunk/src/iso.c
===================================================================
--- xarchiver/trunk/src/iso.c 2006-07-26 12:25:23 UTC (rev 22528)
+++ xarchiver/trunk/src/iso.c 2006-07-27 07:28:39 UTC (rev 22529)
@@ -564,9 +564,7 @@
if ((fsource = fopen (source, "r")) == NULL)
return FALSE;
-
- fdest = fopen (dest, "w");
- if (fdest == NULL)
+ if ((fdest = fopen (dest, "w")) == NULL)
{
//gchar *msg = g_strdup_printf (_("Can't write file \"%s\":"),
dest);
response = ShowGtkMessageDialog (GTK_WINDOW
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't write
file:"),g_strerror(errno) );
@@ -617,11 +615,11 @@
iso_stream = fopen ( archive->path ,"r" );
- lseek(fileno(iso_stream),(16 + toc_offset) <<11, 0);
+ lseek (fileno(iso_stream),DetectImage(iso_stream), 0);
read(fileno(iso_stream), &ipd, sizeof(ipd));
idr = (struct iso_directory_record *) &ipd.root_directory_record;
extent = iso_733((unsigned char *)idr->extent);
- lseek(fileno(iso_stream),((off_t)(extent - sector_offset)) <<11,
SEEK_SET);
+ lseek (fileno(iso_stream),((off_t)(extent - sector_offset)) <<11,
SEEK_SET);
read(fileno(iso_stream), buffer, sizeof (buffer));
idr_rr = (struct iso_directory_record *) buffer;
@@ -762,6 +760,7 @@
if (memcmp ("\x01\x43\x44\x30\x30\x31\x01\x00", buf, 8))
{
fseek (iso, 0L, SEEK_SET);
+ fread ( &ipd, 1, sizeof(ipd), iso );
fread (buf, sizeof (char), 12, iso);
if (!memcmp
("\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00", buf, 12))
{
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits