comparison libmpdvdkit2/libdvdcss.c @ 9882:454d8a4bd4f9

forwardport: warning fix and netbsd fix
author alex
date Tue, 08 Apr 2003 17:36:33 +0000
parents cbc01dc4b773
children f23c35ce0d16
comparison
equal deleted inserted replaced
9881:60d1ccf22469 9882:454d8a4bd4f9
115 115
116 #ifdef __CYGWIN__ 116 #ifdef __CYGWIN__
117 #define SYS_CYGWIN 117 #define SYS_CYGWIN
118 #endif 118 #endif
119 119
120 #ifndef HAVE_MPLAYER
121 #include "get_path.c"
122 #else
123 extern char * get_path( char * filename );
124 #endif
125
120 /** 126 /**
121 * \brief Symbol for version checks. 127 * \brief Symbol for version checks.
122 * 128 *
123 * The name of this symbol contains the library major number, which makes it 129 * The name of this symbol contains the library major number, which makes it
124 * easy to check which \e libdvdcss development headers are installed on the 130 * easy to check which \e libdvdcss development headers are installed on the
388 _dvdcss_error( dvdcss, "failed creating cache directory" ); 394 _dvdcss_error( dvdcss, "failed creating cache directory" );
389 dvdcss->psz_cachefile[0] = '\0'; 395 dvdcss->psz_cachefile[0] = '\0';
390 goto nocache; 396 goto nocache;
391 } 397 }
392 398
393 i += sprintf( dvdcss->psz_cachefile + i, "/%s/", psz_data ); 399 i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_data );
394 #if !defined( WIN32 ) || defined( SYS_CYGWIN ) 400 #if !defined( WIN32 ) || defined( SYS_CYGWIN )
395 i_ret = mkdir( dvdcss->psz_cachefile, 0755 ); 401 i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
396 #else 402 #else
397 i_ret = mkdir( dvdcss->psz_cachefile ); 403 i_ret = mkdir( dvdcss->psz_cachefile );
398 #endif 404 #endif
400 { 406 {
401 _dvdcss_error( dvdcss, "failed creating cache subdirectory" ); 407 _dvdcss_error( dvdcss, "failed creating cache subdirectory" );
402 dvdcss->psz_cachefile[0] = '\0'; 408 dvdcss->psz_cachefile[0] = '\0';
403 goto nocache; 409 goto nocache;
404 } 410 }
411 i += sprintf( dvdcss->psz_cachefile + i, "/");
405 412
406 /* Pointer to the filename we will use. */ 413 /* Pointer to the filename we will use. */
407 dvdcss->psz_block = dvdcss->psz_cachefile + i; 414 dvdcss->psz_block = dvdcss->psz_cachefile + i;
408 415
409 sprintf( psz_debug, "using CSS key cache dir: %s", 416 sprintf( psz_debug, "using CSS key cache dir: %s",