Commit f35ad494 authored by Diego Biurrun's avatar Diego Biurrun
Browse files

Comment some #endifs for increased readability.

parent 143d07a2
......@@ -62,7 +62,7 @@ typedef _off_t off_t;
# else
# define off_t long long
# endif
# endif
# endif /* defined( __MINGW32__ ) */
# if defined( _MSC_VER )
# define lseek _lseeki64
......@@ -79,15 +79,15 @@ typedef __int64 off_t;
# define close _close
# define read _read
# define write _write
# endif
# endif /* defined( _MSC_VER ) */
#endif
#endif /* defined( WIN32 ) */
#ifdef __ANDROID__
# undef lseek
# define lseek lseek64
# undef off_t
# define off_t off64_t
#endif
#endif /* __ANDROID__ */
#endif /* DVDCSS_COMMON_H */
......@@ -122,7 +122,7 @@ int dvdcss_test( dvdcss_t dvdcss )
i_copyright = 0;
}
}
#endif
#endif /* WIN32 */
if( i_ret < 0 )
{
......@@ -1566,7 +1566,7 @@ static int CrackTitleKey( dvdcss_t dvdcss, int i_pos, int i_len,
{
b_stop_scanning = 1;
}
#endif
#endif /* 0 */
}
i_pos++;
......@@ -1730,4 +1730,4 @@ static int AttackPadding( const uint8_t p_sec[ DVDCSS_BLOCK_SIZE ] )
return 0;
}
#endif
#endif /* 0 */
......@@ -408,7 +408,7 @@ int dvdcss_raw_open ( dvdcss_t dvdcss, const char *psz_device )
return 0;
}
#endif
#endif /* DVDCSS_RAW_OPEN */
int dvdcss_close_device ( dvdcss_t dvdcss )
{
......@@ -507,7 +507,7 @@ error:
print_error( dvdcss, "failed opening device" );
return -1;
}
#endif
#endif /* defined( WIN32 ) */
#ifdef __OS2__
static int os2_open ( dvdcss_t dvdcss, const char *psz_device )
......@@ -538,7 +538,7 @@ static int os2_open ( dvdcss_t dvdcss, const char *psz_device )
return 0;
}
#endif
#endif /* __OS2__ */
/*****************************************************************************
* Seek commands.
......@@ -595,7 +595,7 @@ static int win2k_seek( dvdcss_t dvdcss, int i_blocks )
return dvdcss->i_pos;
}
#endif
#endif /* defined( WIN32 ) */
/*****************************************************************************
* Read commands.
......@@ -650,7 +650,7 @@ static int win2k_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks )
dvdcss->i_pos += i_bytes / DVDCSS_BLOCK_SIZE;
return i_bytes / DVDCSS_BLOCK_SIZE;
}
#endif
#endif /* defined( WIN32 ) */
/*****************************************************************************
* Readv commands.
......@@ -789,4 +789,4 @@ static int win2k_readv ( dvdcss_t dvdcss, struct iovec *p_iovec, int i_blocks )
dvdcss->i_pos += i_blocks_read;
return i_blocks_read;
}
#endif
#endif /* defined( WIN32 ) */
......@@ -1479,7 +1479,7 @@ static int SolarisSendUSCSI( int i_fd, struct uscsi_cmd *p_sc )
return ioctl( i_fd, USCSICMD, p_sc );
}
#endif
#endif /* defined( SOLARIS_USCSI ) */
#if defined( WIN32 )
/*****************************************************************************
......@@ -1511,7 +1511,7 @@ static void WinInitSPTD( SCSI_PASS_THROUGH_DIRECT *p_sptd, int i_type )
p_sptd->TimeOutValue = 2;
}
#endif
#endif /* defined( WIN32 ) */
#if defined( __QNXNTO__ )
/*****************************************************************************
......@@ -1542,7 +1542,7 @@ static void QNXInitCPT( CAM_PASS_THRU * p_cpt, int i_type )
p_cpt->cam_timeout = CAM_TIME_DEFAULT;
}
#endif
#endif /* defined( __QNXNTO__ ) */
#if defined( __OS2__ )
/*****************************************************************************
......@@ -1571,4 +1571,4 @@ static void OS2InitSDC( struct OS2_ExecSCSICmd *p_sdc, int i_type )
p_sdc->id_code = 0x31304443; // 'CD01'
p_sdc->cmd_length = 12;
}
#endif
#endif /* defined( __OS2__ ) */
......@@ -286,7 +286,7 @@ typedef struct SCSI_PASS_THROUGH_DIRECT
UCHAR Cdb[16];
} SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
#endif
#endif /* defined( WIN32 ) */
/*****************************************************************************
* OS2 ioctl specific
......@@ -312,6 +312,6 @@ struct OS2_ExecSCSICmd
#pragma pack()
#endif
#endif /* defined( __OS2__ ) */
#endif /* DVDCSS_IOCTL_H */
......@@ -240,7 +240,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
}
#else
char *psz_home = NULL;
# ifdef HAVE_PWD_H
#ifdef HAVE_PWD_H
struct passwd *p_pwd;
/* Try looking in password file for home dir. */
......@@ -249,7 +249,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
{
psz_home = p_pwd->pw_dir;
}
# endif
#endif /* HAVE_PWD_H */
if( psz_home == NULL )
{
......@@ -279,13 +279,13 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
home_pos = 2;
}
}
#endif
#endif /* __OS2__ */
snprintf( psz_buffer + home_pos, PATH_MAX - home_pos,
"%s/.dvdcss", psz_home );
psz_buffer[PATH_MAX-1] = '\0';
psz_cache = psz_buffer;
}
#endif
#endif /* ! defined(_WIN32_IE) && _WIN32_IE >= 0x500 */
}
/*
......@@ -514,7 +514,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
{
dvdcss_raw_open( dvdcss, psz_raw_device );
}
#endif
#endif /* DVDCSS_RAW_OPEN */
/* Seek at the beginning, just for safety. */
dvdcss->pf_seek( dvdcss, 0 );
......
......@@ -70,7 +70,7 @@ struct dvdcss_s
int b_file;
char * p_readv_buffer;
int i_readv_buf_size;
#endif
#endif /* WIN32 */
#ifdef DVDCSS_RAW_OPEN
int i_raw_fd;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment