ref: 80e3a9ea47d8d5358e4012e830bc500f0a1bb45e
parent: 92ccdd74aa3facb7675afdcc46609505129f2735
author: Sam Hocevar <[email protected]>
date: Wed Dec 11 08:12:10 EST 2002
* minor coding style fixes.
--- a/src/bsdi_dvd.h
+++ b/src/bsdi_dvd.h
@@ -258,7 +258,7 @@
#define CDSL_NONE ((int) (~0U>>1)-1)
#define CDSL_CURRENT ((int) (~0U>>1))
-struct cdrom_msf
+struct cdrom_msf
{
__u8 cdmsf_min0; /* start minute */
__u8 cdmsf_sec0; /* start second */
@@ -268,13 +268,13 @@
__u8 cdmsf_frame1; /* end frame */
};
-struct cdrom_tochdr
+struct cdrom_tochdr
{
__u8 cdth_trk0; /* start track */
__u8 cdth_trk1; /* end track */
};
-struct cdrom_msf0
+struct cdrom_msf0
{
__u8 minute;
__u8 second;
@@ -281,13 +281,13 @@
__u8 frame;
};
-union cdrom_addr
+union cdrom_addr
{
struct cdrom_msf0 msf;
int lba;
};
-struct cdrom_tocentry
+struct cdrom_tocentry
{
__u8 cdte_track;
__u8 cdte_adr :4;
--- a/src/bsdi_ioctl.c
+++ b/src/bsdi_ioctl.c
@@ -429,7 +429,7 @@
cp = suc.suc_sus.sus_sense;
fprintf(stderr,"scsistatus = %x cmd = %x\n",
scsistatus, cgc->cdb[0]);
- fprintf(stderr, "sense %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
+ fprintf(stderr, "sense %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5],
cp[6], cp[7], cp[8], cp[9], cp[10], cp[11],
cp[12], cp[13], cp[14], cp[15]);
@@ -580,9 +580,9 @@
tocentry->cdte_addr.msf.frame = buffer[11];
}
else
- tocentry->cdte_addr.lba = (((((buffer[8] << 8)
+ tocentry->cdte_addr.lba = (((((buffer[8] << 8)
+ buffer[9]) << 8)
- + buffer[10]) << 8)
+ + buffer[10]) << 8)
+ buffer[11];
break;
}
@@ -593,7 +593,7 @@
ret = cdrom_tray_move(fd, 0);
break;
/*
- * This sucks but emulates the expected behaviour. Instead of the return
+ * This sucks but emulates the expected behaviour. Instead of the return
* value being the actual status a success/fail indicator should have been
* returned and the 3rd arg to the ioctl should have been an 'int *' to update
* with the actual status.
--- a/src/device.c
+++ b/src/device.c
@@ -2,7 +2,7 @@
* device.h: DVD device access
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: device.c,v 1.10 2002/12/10 10:38:12 sam Exp $
+ * $Id: device.c,v 1.11 2002/12/11 13:12:10 sam Exp $
*
* Authors: St�phane Borel <[email protected]>
* Samuel Hocevar <[email protected]>
@@ -91,11 +91,11 @@
/* FIXME: implement this for Windows */
if( WIN2K )
{
- return 1;
+ return 1;
}
else
{
- return 1;
+ return 1;
}
#else
struct stat fileinfo;
@@ -104,7 +104,7 @@
ret = fstat( dvdcss->i_fd, &fileinfo );
if( ret < 0 )
{
- return 1; /* What to do? Be conservative and try to use the ioctls */
+ return 1; /* What to do? Be conservative and try to use the ioctls */
}
/* Complete this list and check that we test for the right things
@@ -122,13 +122,13 @@
/* Check if this is a block/char device */
if( S_ISBLK( fileinfo.st_mode ) ||
- S_ISCHR( fileinfo.st_mode ) )
+ S_ISCHR( fileinfo.st_mode ) )
{
- return 1;
+ return 1;
}
else
{
- return 0;
+ return 0;
}
#endif
}
--- a/src/dvdcss/dvdcss.h
+++ b/src/dvdcss/dvdcss.h
@@ -10,13 +10,13 @@
/*
* Copyright (C) 1998-2002 VideoLAN
- * $Id: dvdcss.h,v 1.4 2002/08/10 14:27:26 sam Exp $
+ * $Id: dvdcss.h,v 1.5 2002/12/11 13:12:10 sam Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -5,7 +5,7 @@
* H�kan Hjort <[email protected]>
*
* Copyright (C) 1998-2002 VideoLAN
- * $Id: libdvdcss.c,v 1.23 2002/12/10 10:38:12 sam Exp $
+ * $Id: libdvdcss.c,v 1.24 2002/12/11 13:12:10 sam Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -261,19 +261,19 @@
if( dvdcss->b_ioctls )
{
i_ret = _dvdcss_test( dvdcss );
- if( i_ret < 0 )
- {
- /* Disable the CSS ioctls and hope that it works? */
+ if( i_ret < 0 )
+ {
+ /* Disable the CSS ioctls and hope that it works? */
_dvdcss_debug( dvdcss,
"could not check whether the disc was scrambled" );
- dvdcss->b_ioctls = 0;
- }
- else
- {
+ dvdcss->b_ioctls = 0;
+ }
+ else
+ {
_dvdcss_debug( dvdcss, i_ret ? "disc is scrambled"
: "disc is unscrambled" );
- dvdcss->b_scrambled = i_ret;
- }
+ dvdcss->b_scrambled = i_ret;
+ }
}
/* If disc is CSS protected and the ioctls work, authenticate the drive */
@@ -499,7 +499,7 @@
if( ! memcmp( dvdcss->css.p_title_key, "\0\0\0\0\0", 5 ) )
{
/* For what we believe is an unencrypted title,
- * check that there are no encrypted blocks */
+ * check that there are no encrypted blocks */
for( i_index = i_ret; i_index; i_index-- )
{
if( ((uint8_t*)p_buffer)[0x14] & 0x30 )
@@ -507,7 +507,7 @@
_dvdcss_error( dvdcss, "no key but found encrypted block" );
/* Only return the initial range of unscrambled blocks? */
/* or fail completely? return 0; */
- break;
+ break;
}
p_buffer = (void *) ((uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE);
}
@@ -516,11 +516,11 @@
{
/* Decrypt the blocks we managed to read */
for( i_index = i_ret; i_index; i_index-- )
- {
- _dvdcss_unscramble( dvdcss->css.p_title_key, p_buffer );
- ((uint8_t*)p_buffer)[0x14] &= 0x8f;
+ {
+ _dvdcss_unscramble( dvdcss->css.p_title_key, p_buffer );
+ ((uint8_t*)p_buffer)[0x14] &= 0x8f;
p_buffer = (void *) ((uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE);
- }
+ }
}
return i_ret;