[DVDnav-discuss] r1200 - trunk/libdvdread/src/dvd_reader.c

KO Myung-Hun komh at chollian.net
Tue Jul 20 11:26:53 CEST 2010



nicodvb wrote:
> Author: nicodvb
> Date: Tue Jul 20 09:51:43 2010
> New Revision: 1200
> 
> Log:
> in OS/2 Use  DVDOpenImageFile() only if it is a drive; patch by komh chollian net
> 
> Modified:
>    trunk/libdvdread/src/dvd_reader.c
> 
> Modified: trunk/libdvdread/src/dvd_reader.c
> ==============================================================================
> --- trunk/libdvdread/src/dvd_reader.c	Tue Jun  1 19:07:13 2010	(r1199)
> +++ trunk/libdvdread/src/dvd_reader.c	Tue Jul 20 09:51:43 2010	(r1200)
> @@ -28,6 +28,7 @@
>  #include <stdio.h>
>  #include <errno.h>
>  #include <string.h>
> +#include <ctype.h>
>  #include <unistd.h>
>  #include <limits.h>
>  #include <dirent.h>
> @@ -522,6 +523,12 @@ dvd_reader_t *DVDOpen( const char *ppath
>        fclose( mntfile );
>      }
>  #elif defined(_WIN32) || defined(__OS2__)
> +#ifdef __OS2__
> +    /* Use DVDOpenImageFile() only if it is a drive */
> +    if((path[0]>='A' && path[0]<='Z') && path[1] == ':' &&
> +        ( !path[2] ||
> +          ((path[2] == '\\' || path[2] == '/') && !path[3])))
> +#endif
>      auth_drive = DVDOpenImageFile( path, have_css );
>  #endif

You should consider 'a' .. 'z' case as well. Or it would be better to
use isalpha().

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.3
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr



More information about the DVDnav-discuss mailing list