win32.c: fill in read_data_blocks (use mmc routine)
iso-info.c: lint cast on output iso9660.c: deal with struct tm's that don't have gmt_off.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: win32.c,v 1.19 2005/02/11 02:18:15 rocky Exp $
|
||||
$Id: win32.c,v 1.20 2005/02/27 20:16:08 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: win32.c,v 1.19 2005/02/11 02:18:15 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: win32.c,v 1.20 2005/02/27 20:16:08 rocky Exp $";
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/sector.h>
|
||||
@@ -768,6 +768,7 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode)
|
||||
_funcs.lseek = NULL;
|
||||
_funcs.read = NULL;
|
||||
_funcs.read_audio_sectors = _cdio_read_audio_sectors;
|
||||
_funcs.read_data_sectors = read_data_sectors_mmc;
|
||||
_funcs.read_mode1_sector = _cdio_read_mode1_sector;
|
||||
_funcs.read_mode1_sectors = _cdio_read_mode1_sectors;
|
||||
_funcs.read_mode2_sector = _cdio_read_mode2_sector;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660.c,v 1.11 2005/02/26 14:58:53 rocky Exp $
|
||||
$Id: iso9660.c,v 1.12 2005/02/27 20:16:08 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -48,7 +48,7 @@ const char ISO_STANDARD_ID[] = {'C', 'D', '0', '0', '1'};
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.11 2005/02/26 14:58:53 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.12 2005/02/27 20:16:08 rocky Exp $";
|
||||
|
||||
/* Variables to hold debugger-helping enumerations */
|
||||
enum iso_enum1_s iso_enums1;
|
||||
@@ -135,7 +135,6 @@ iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime,
|
||||
p_tm->tm_min = idr_date->dt_minute;
|
||||
p_tm->tm_sec = idr_date->dt_second;
|
||||
p_tm->tm_isdst = -1; /* information not available */
|
||||
#ifdef HAVE_TM_GMTOFF
|
||||
{
|
||||
time_t t = 0;
|
||||
struct tm *p_temp_tm = localtime(&t);
|
||||
@@ -143,7 +142,23 @@ iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime,
|
||||
/* Recompute tm_wday and tm_yday via mktime. Also adjust for
|
||||
time-zone differences */
|
||||
t = mktime(p_tm);
|
||||
t -= idr_date->dt_gmtoff * (15 * 60) - p_temp_tm->tm_gmtoff;
|
||||
t -= idr_date->dt_gmtoff * (15 * 60);
|
||||
#ifdef HAVE_TM_GMTOFF
|
||||
t += p_temp_tm->tm_gmtoff;
|
||||
#else
|
||||
{
|
||||
static bool i_first_time = true;
|
||||
static time_t gmt_off;
|
||||
if (i_first_time) {
|
||||
struct tm tm_local, tm_gmt;
|
||||
memcpy(&tm_local, localtime(&t), sizeof(struct tm));
|
||||
memcpy(&tm_gmt , gmtime(&t) , sizeof(struct tm));
|
||||
gmt_off = mktime(&tm_local) - mktime(&tm_gmt);
|
||||
i_first_time = false;
|
||||
}
|
||||
t += gmt_off;
|
||||
}
|
||||
#endif
|
||||
|
||||
p_temp_tm = localtime(&t);
|
||||
|
||||
@@ -155,7 +170,6 @@ iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime,
|
||||
memcpy(p_tm, p_temp_tm, sizeof(struct tm));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso-info.c,v 1.28 2005/02/21 09:00:53 rocky Exp $
|
||||
$Id: iso-info.c,v 1.29 2005/02/27 20:16:08 rocky Exp $
|
||||
|
||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -227,7 +227,7 @@ print_iso9660_recurse (iso9660_t *p_iso, const char pathname[])
|
||||
psz_iso_name, translated_name);
|
||||
} else
|
||||
if ( strcmp (psz_iso_name, ".") && strcmp (psz_iso_name, ".."))
|
||||
printf("%9u %s%s\n", p_statbuf->size, pathname,
|
||||
printf("%9u %s%s\n", (unsigned int) p_statbuf->size, pathname,
|
||||
yep == p_statbuf->rr.b3_rock
|
||||
? psz_iso_name : translated_name);
|
||||
if (p_statbuf->rr.i_symlink) {
|
||||
|
||||
Reference in New Issue
Block a user