Note TOC's initialized so we don't reread. Add some int's to unsigned.

This commit is contained in:
rocky
2003-09-01 15:11:36 +00:00
parent 16f103e8e6
commit 833bc3d21d
4 changed files with 19 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_bsdi.c,v 1.10 2003/05/16 07:18:27 rocky Exp $
$Id: _cdio_bsdi.c,v 1.11 2003/09/01 15:11:36 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: _cdio_bsdi.c,v 1.10 2003/05/16 07:18:27 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_bsdi.c,v 1.11 2003/09/01 15:11:36 rocky Exp $";
#include <cdio/sector.h>
#include <cdio/util.h>
@@ -167,7 +167,7 @@ _read_mode2_sector (void *user_data, void *data, lsn_t lsn,
*/
static int
_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
bool mode2_form2, unsigned nblocks)
bool mode2_form2, unsigned int nblocks)
{
_img_private_t *_obj = user_data;
int i;

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_freebsd.c,v 1.14 2003/05/27 02:58:22 rocky Exp $
$Id: _cdio_freebsd.c,v 1.15 2003/09/01 15:11:36 rocky Exp $
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: _cdio_freebsd.c,v 1.14 2003/05/27 02:58:22 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_freebsd.c,v 1.15 2003/09/01 15:11:36 rocky Exp $";
#include <cdio/sector.h>
#include <cdio/util.h>
@@ -90,15 +90,15 @@ _set_bsize (int fd, unsigned int bsize)
}
static int
_read_mode2 (int fd, void *buf, lba_t lba, unsigned nblocks,
_read_mode2 (int fd, void *buf, lba_t lba, unsigned int nblocks,
bool _workaround)
{
unsigned l = 0;
unsigned int l = 0;
int retval = 0;
while (nblocks > 0)
{
const unsigned nblocks2 = (nblocks > 25) ? 25 : nblocks;
const unsigned int nblocks2 = (nblocks > 25) ? 25 : nblocks;
void *buf2 = ((char *)buf ) + (l * M2RAW_SECTOR_SIZE);
retval |= __read_mode2 (fd, buf2, lba + l, nblocks2, _workaround);
@@ -206,7 +206,7 @@ _cdio_read_mode2_sector (void *user_data, void *data, lsn_t lsn,
*/
static int
_cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
bool mode2_form2, unsigned nblocks)
bool mode2_form2, unsigned int nblocks)
{
_img_private_t *_obj = user_data;
int i;

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_linux.c,v 1.15 2003/09/01 02:02:03 rocky Exp $
$Id: _cdio_linux.c,v 1.16 2003/09/01 15:11:36 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.15 2003/09/01 02:02:03 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.16 2003/09/01 15:11:36 rocky Exp $";
#include <string.h>
@@ -328,10 +328,10 @@ __read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
}
static int
_read_packet_mode2_sectors (int fd, void *buf, lba_t lba, unsigned nblocks,
bool use_read_10)
_read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
unsigned int nblocks, bool use_read_10)
{
unsigned l = 0;
unsigned int l = 0;
int retval = 0;
while (nblocks > 0)
@@ -482,7 +482,7 @@ _cdio_read_audio_sector (void *user_data, void *data, lsn_t lsn)
*/
static int
_cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
bool mode2_form2, unsigned nblocks)
bool mode2_form2, unsigned int nblocks)
{
_img_private_t *_obj = user_data;
int i;

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_sunos.c,v 1.14 2003/07/27 22:52:22 rocky Exp $
$Id: _cdio_sunos.c,v 1.15 2003/09/01 15:11:36 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
@@ -35,7 +35,7 @@
#ifdef HAVE_SOLARIS_CDROM
static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.14 2003/07/27 22:52:22 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.15 2003/09/01 15:11:36 rocky Exp $";
#include <stdio.h>
#include <stdlib.h>
@@ -340,7 +340,7 @@ _cdio_read_audio_sector (void *user_data, void *data, lsn_t lsn)
*/
static int
_cdio_read_mode2_sectors (void *user_data, void *data, uint32_t lsn,
bool mode2_form2, unsigned nblocks)
bool mode2_form2, unsigned int nblocks)
{
_img_private_t *_obj = user_data;
int i;
@@ -460,6 +460,7 @@ _cdio_read_toc (_img_private_t *_obj)
return false;
}
_obj->gen.toc_init = true;
return true;
}