ref: 66c539c3aa03aa8823c41e5698685a165fb30c7b
parent: b1486f807e7429794eb1adf0b8427ff119e9d3f6
author: Sam Hocevar <sam@videolan.org>
date: Tue Dec 10 05:38:12 EST 2002
* ./msvc/*: MS VC++ project files.
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@
CFLAGS="${CFLAGS} -no-cpp-precomp"
;;
x*cygwin*)
- AC_DEFINE(SYS_CYGWIN, 1, Have a BeOS system.)
+ AC_DEFINE(SYS_CYGWIN, 1, Have a Cygwin system.)
;;
xbeos*)
AC_DEFINE(SYS_BEOS, 1, Have a BeOS system.)
--- /dev/null
+++ b/msvc/.cvsignore
@@ -1,0 +1,5 @@
+*Debug
+*Release
+*.ncb
+*.opt
+*.plg
--- /dev/null
+++ b/msvc/config.h
@@ -1,0 +1,45 @@
+/* config.h. Generated by hand. */
+
+/* #undef DARWIN_DVD_IOCTL */
+/* #undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H */
+/* #undef DVD_STRUCT_IN_DVD_H */
+/* #undef DVD_STRUCT_IN_LINUX_CDROM_H */
+/* #undef DVD_STRUCT_IN_SYS_CDIO_H */
+/* #undef DVD_STRUCT_IN_SYS_DVDIO_H */
+/* #undef HAVE_BSD_DVD_STRUCT */
+#define HAVE_DLFCN_H 1
+/* #undef HAVE_DVD_H */
+/* #undef HAVE_INTTYPES_H */
+/* #undef HAVE_LINUX_CDROM_H */
+/* #undef HAVE_LINUX_DVD_STRUCT */
+#define HAVE_MEMORY_H 1
+/* #undef HAVE_OPENBSD_DVD_STRUCT */
+/* #undef HAVE_STDINT_H */
+#define HAVE_STDLIB_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+/* #undef HAVE_SYS_CDIO_H */
+/* #undef HAVE_SYS_DVDIO_H */
+#define HAVE_SYS_IOCTL_H 1
+/* #undef HAVE_SYS_PARAM_H */
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TYPES_H 1
+/* #undef HAVE_UNISTD_H */
+#define HAVE_WINIOCTL_H 1
+/* #undef HAVE__SYS_DEV_SCSI_SCSI_IOCTL_H */
+/* #undef HPUX_SCTL_IO */
+#define PACKAGE "libdvdcss"
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_NAME ""
+#define PACKAGE_STRING ""
+#define PACKAGE_TARNAME ""
+#define PACKAGE_VERSION ""
+/* #undef SOLARIS_USCSI */
+#define STDC_HEADERS 1
+/* #undef SYS_BEOS */
+/* #undef SYS_CYGWIN */
+#define VERSION "1.2.4"
+/* #undef const */
+/* #undef inline */
+/* #undef size_t */
+
--- /dev/null
+++ b/msvc/csstest.dsp
@@ -1,0 +1,96 @@
+# Microsoft Developer Studio Project File - Name="csstest" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=csstest - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "csstest.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "csstest.mak" CFG="csstest - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "csstest - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "csstest - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "csstest - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "csstest - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "csstest___Win32_Debug"
+# PROP BASE Intermediate_Dir "csstest___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "csstest___Win32_Debug"
+# PROP Intermediate_Dir "csstest___Win32_Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "csstest - Win32 Release"
+# Name "csstest - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
--- /dev/null
+++ b/msvc/libdvdcss.dsp
@@ -1,0 +1,92 @@
+# Microsoft Developer Studio Project File - Name="libdvdcss" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libdvdcss - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "libdvdcss.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "libdvdcss.mak" CFG="libdvdcss - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libdvdcss - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libdvdcss - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "libdvdcss - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "libdvdcss - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "libdvdcss - Win32 Release"
+# Name "libdvdcss - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# End Target
+# End Project
--- /dev/null
+++ b/msvc/workspace.dsw
@@ -1,0 +1,41 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "csstest"=.\csstest.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "libdvdcss"=.\libdvdcss.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
--- 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.9 2002/12/06 00:16:57 babal Exp $
+ * $Id: device.c,v 1.10 2002/12/10 10:38:12 sam Exp $
*
* Authors: St�phane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
@@ -431,7 +431,7 @@
_dvdcss_error( dvdcss, "seek error" );
}
- return i_read / DVDCSS_BLOCK_SIZE;
+ return (int)(i_read / DVDCSS_BLOCK_SIZE);
}
#if defined( WIN32 )
@@ -497,7 +497,7 @@
return i_ret;
}
- return i_ret / DVDCSS_BLOCK_SIZE;
+ return (int)(i_ret / DVDCSS_BLOCK_SIZE);
}
#if defined( WIN32 )
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -5,7 +5,7 @@
* H�kan Hjort <d95hjort@dtek.chalmers.se>
*
* Copyright (C) 1998-2002 VideoLAN
- * $Id: libdvdcss.c,v 1.22 2002/12/06 00:16:57 babal Exp $
+ * $Id: libdvdcss.c,v 1.23 2002/12/10 10:38:12 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
@@ -108,6 +108,10 @@
#ifdef __MINGW_H
# include <limits.h>
+#endif
+
+#ifdef WIN32
+# include <direct.h>
#endif
#include "dvdcss/dvdcss.h"
--- a/test/csstest.c
+++ b/test/csstest.c
@@ -44,7 +44,7 @@
/* Set the file descriptor at sector i_sector and read one sector */
i_ret = dvdcss_seek( dvdcss, i_sector, DVDCSS_NOFLAGS );
- if( i_ret != i_sector )
+ if( i_ret != (int)i_sector )
{
printf( "seek failed (%s)\n", dvdcss_error( dvdcss ) );
dvdcss_close( dvdcss );
@@ -69,7 +69,7 @@
/* Set the file descriptor position to the previous location */
/* ... and get the appropriate key for this sector */
i_ret = dvdcss_seek( dvdcss, i_sector, DVDCSS_SEEK_KEY );
- if( i_ret != i_sector )
+ if( i_ret != (int)i_sector )
{
printf( "seek failed (%s)\n", dvdcss_error( dvdcss ) );
dvdcss_close( dvdcss );