annotate libmpdvdkit2/error.c @ 17835:b493e5ba8741

strings without terminating NUL
author ods15
date Sun, 12 Mar 2006 20:44:22 +0000
parents 2ab52c9b72b9
children 0783dd397f74
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
1 /*****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
2 * error.c: error management functions
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
3 *****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
4 * Copyright (C) 1998-2002 VideoLAN
16631
0af14c5fee82 modification notices according to GPL 2a
diego
parents: 16630
diff changeset
5 *
0af14c5fee82 modification notices according to GPL 2a
diego
parents: 16630
diff changeset
6 * Modified for use with MPlayer, changes contained in libdvdcss_changes.diff.
0af14c5fee82 modification notices according to GPL 2a
diego
parents: 16630
diff changeset
7 * detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
8 * $Id$
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
9 *
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
10 * Author: Samuel Hocevar <sam@zoy.org>
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
11 *
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
15 * (at your option) any later version.
9333
f0f0f176d298 sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents: 7033
diff changeset
16 *
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
20 * GNU General Public License for more details.
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
21 *
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
25 *****************************************************************************/
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
26
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
27 #include "config.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
28
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
29 #include <stdio.h>
10720
f23c35ce0d16 synced to libdvdcss 1.2.8 (except the DVDCSS_PATH guessing, we use our
arpi
parents: 9333
diff changeset
30 #include <stdlib.h>
16714
2ab52c9b72b9 Replace unconditional #defines by build system trickery.
diego
parents: 16631
diff changeset
31
2ab52c9b72b9 Replace unconditional #defines by build system trickery.
diego
parents: 16631
diff changeset
32 #ifdef HAVE_SYS_PARAM_H
2ab52c9b72b9 Replace unconditional #defines by build system trickery.
diego
parents: 16631
diff changeset
33 # include <sys/param.h>
2ab52c9b72b9 Replace unconditional #defines by build system trickery.
diego
parents: 16631
diff changeset
34 #endif
2ab52c9b72b9 Replace unconditional #defines by build system trickery.
diego
parents: 16631
diff changeset
35
2ab52c9b72b9 Replace unconditional #defines by build system trickery.
diego
parents: 16631
diff changeset
36 #ifdef HAVE_LIMITS_H
16630
954cdf2171f6 upgrade to libdvdcss 1.2.9
diego
parents: 14860
diff changeset
37 # include <limits.h>
16714
2ab52c9b72b9 Replace unconditional #defines by build system trickery.
diego
parents: 16631
diff changeset
38 #endif
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
39
7033
596919e4f601 apply mplayer-specific patches
arpi
parents: 7027
diff changeset
40 #include "dvdcss.h"
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
41
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
42 #include "common.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
43 #include "css.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
44 #include "libdvdcss.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
45
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
46 /*****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
47 * Error messages
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
48 *****************************************************************************/
16630
954cdf2171f6 upgrade to libdvdcss 1.2.9
diego
parents: 14860
diff changeset
49 void _print_error( dvdcss_t dvdcss, char *psz_string )
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
50 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
51 if( dvdcss->b_errors )
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
52 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
53 fprintf( stderr, "libdvdcss error: %s\n", psz_string );
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
54 }
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
55
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
56 dvdcss->psz_error = psz_string;
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
57 }
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
58
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
59 /*****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
60 * Debug messages
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
61 *****************************************************************************/
16630
954cdf2171f6 upgrade to libdvdcss 1.2.9
diego
parents: 14860
diff changeset
62 #if 0
954cdf2171f6 upgrade to libdvdcss 1.2.9
diego
parents: 14860
diff changeset
63 void _print_debug( dvdcss_t dvdcss, char *psz_string )
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
64 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
65 if( dvdcss->b_debug )
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
66 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
67 fprintf( stderr, "libdvdcss debug: %s\n", psz_string );
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
68 }
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
69 }
16630
954cdf2171f6 upgrade to libdvdcss 1.2.9
diego
parents: 14860
diff changeset
70 #endif
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
71