Lint-like things.

Add X-BOX detection courtesy of the xmbc project.
This commit is contained in:
rocky
2004-06-19 19:15:15 +00:00
parent 001bd6360b
commit e1808fb407
10 changed files with 66 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_generic.c,v 1.16 2004/05/31 12:29:09 rocky Exp $
$Id: _cdio_generic.c,v 1.17 2004/06/19 19:15:15 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -27,13 +27,17 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.16 2004/05/31 12:29:09 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.17 2004/06/19 19:15:15 rocky Exp $";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /*HAVE_UNISTD_H*/
#include <fcntl.h>
#include <sys/stat.h>
@@ -41,6 +45,7 @@ static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.16 2004/05/31 12:29:09 ro
#include <cdio/sector.h>
#include <cdio/util.h>
#include <cdio/logging.h>
#include "cdio_assert.h"
#include "cdio_private.h"
#include "_cdio_stdio.h"

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_stdio.c,v 1.7 2004/02/21 18:29:59 rocky Exp $
$Id: _cdio_stdio.c,v 1.8 2004/06/19 19:15:15 rocky Exp $
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /*HAVE_UNISTD_H*/
#include <sys/stat.h>
#include <errno.h>
@@ -35,7 +39,7 @@
#include "_cdio_stream.h"
#include "_cdio_stdio.h"
static const char _rcsid[] = "$Id: _cdio_stdio.c,v 1.7 2004/02/21 18:29:59 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_stdio.c,v 1.8 2004/06/19 19:15:15 rocky Exp $";
#define CDIO_STDIO_BUFSIZE (128*1024)

View File

@@ -1,5 +1,5 @@
/*
$Id: cd_types.c,v 1.7 2003/11/05 04:12:58 rocky Exp $
$Id: cd_types.c,v 1.8 2004/06/19 19:15:15 rocky Exp $
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
@@ -66,6 +66,7 @@ static char buffer[6][CDIO_CD_FRAMESIZE_RAW]; /* for CD-Data */
#define UFS_SUPERBLOCK_SECTOR 4 /* buffer[2] */
#define BOOT_SECTOR 17 /* buffer[3] */
#define VCD_INFO_SECTOR 150 /* buffer[4] */
#define XISO_SECTOR 32 /* buffer[4] */
typedef struct signature
@@ -92,6 +93,7 @@ static signature_t sigs[] =
{3, 7, "EL TORITO", "BOOTABLE"},
{4, 0, "VIDEO_CD", "VIDEO CD"},
{4, 0, "SUPERVCD", "SVCD or Chaoji VCD"},
{0, 0, "MICROSOFT*XBOX*MEDIA", "XBOX CD"},
{ 0 }
};
@@ -110,6 +112,7 @@ static signature_t sigs[] =
#define INDEX_BOOTABLE 10
#define INDEX_VIDEO_CD 11 /* Video CD */
#define INDEX_SVCD 12 /* CVD *or* SVCD */
#define INDEX_XISO 13 /* Microsoft X-BOX filesystem */
/*
@@ -220,6 +223,9 @@ cdio_guess_cd_type(const CdIo *cdio, int start_session, track_t track_num,
0, track_num) < 0 )
return CDIO_FS_UNKNOWN;
if ( _cdio_is_it(INDEX_XISO) )
return CDIO_FS_ANAL_XISO;
/* We have something that smells of a filesystem. */
if (_cdio_is_it(INDEX_CD_I) && _cdio_is_it(INDEX_CD_RTOS)
&& !_cdio_is_it(INDEX_BRIDGE) && !_cdio_is_it(INDEX_XA)) {

View File

@@ -1,5 +1,5 @@
/*
$Id: cdio.c,v 1.55 2004/06/07 00:24:45 rocky Exp $
$Id: cdio.c,v 1.56 2004/06/19 19:15:15 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -26,7 +26,9 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <string.h>
@@ -37,7 +39,7 @@
#include <cdio/logging.h>
#include "cdio_private.h"
static const char _rcsid[] = "$Id: cdio.c,v 1.55 2004/06/07 00:24:45 rocky Exp $";
static const char _rcsid[] = "$Id: cdio.c,v 1.56 2004/06/19 19:15:15 rocky Exp $";
const char *track_format2str[6] =

View File

@@ -1,5 +1,5 @@
/*
$Id: bincue.c,v 1.21 2004/06/01 11:45:35 rocky Exp $
$Id: bincue.c,v 1.22 2004/06/19 19:15:15 rocky Exp $
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -24,7 +24,7 @@
(*.cue).
*/
static const char _rcsid[] = "$Id: bincue.c,v 1.21 2004/06/01 11:45:35 rocky Exp $";
static const char _rcsid[] = "$Id: bincue.c,v 1.22 2004/06/19 19:15:15 rocky Exp $";
#include "cdio_assert.h"
#include "cdio_private.h"
@@ -235,8 +235,8 @@ _read_bincue (void *user_data, void *data, size_t size)
ssize_t skip_size = this_track->datastart + this_track->endsize;
while (size > 0) {
int rem = this_track->datasize - env->pos.buff_offset;
if (size <= rem) {
long int rem = this_track->datasize - env->pos.buff_offset;
if ((long int) size <= rem) {
this_size = cdio_stream_read(env->gen.data_source, buf, size, 1);
final_size += this_size;
memcpy (p, buf, this_size);
@@ -832,7 +832,7 @@ cdio_is_cuefile(const char *cue_name)
int i;
char *bin_name;
if (cue_name == NULL) return false;
if (cue_name == NULL) return NULL;
bin_name=strdup(cue_name);
i=strlen(bin_name)-strlen("cue");
@@ -865,7 +865,7 @@ cdio_is_binfile(const char *bin_name)
int i;
char *cue_name;
if (bin_name == NULL) return false;
if (bin_name == NULL) return NULL;
cue_name=strdup(bin_name);
i=strlen(bin_name)-strlen("bin");

View File

@@ -1,5 +1,5 @@
/*
$Id: util.c,v 1.2 2003/04/22 12:09:09 rocky Exp $
$Id: util.c,v 1.3 2004/06/19 19:15:15 rocky Exp $
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
@@ -28,10 +28,14 @@
#include <stdio.h>
#include <string.h>
#ifdef HAVE_INTTYPES_H
#include "inttypes.h"
#endif
#include "cdio_assert.h"
#include <cdio/util.h>
static const char _rcsid[] = "$Id: util.c,v 1.2 2003/04/22 12:09:09 rocky Exp $";
static const char _rcsid[] = "$Id: util.c,v 1.3 2004/06/19 19:15:15 rocky Exp $";
size_t
_cdio_strlenv(char **str_array)