annotate libdvdcss/error.c @ 28464:2db0844df6f0

Add #undefs to reenable system functions that are normally forbidden in other parts of FFmpeg but OK in this test program. Fixes the build.
author diego
date Mon, 09 Feb 2009 18:01:36 +0000
parents 60bd1a7f3fc6
children 9e9595c779cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20613
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
1 /*****************************************************************************
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
2 * error.c: error management functions
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
3 *****************************************************************************
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
4 * Copyright (C) 1998-2002 VideoLAN
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
5 * $Id$
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
6 *
27462
60bd1a7f3fc6 Sync libdvdcss with upstream version 1.2.10.
diego
parents: 20613
diff changeset
7 * Author: Sam Hocevar <sam@zoy.org>
20613
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
8 *
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
12 * (at your option) any later version.
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
13 *
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
17 * GNU General Public License for more details.
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
18 *
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
22 *****************************************************************************/
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
23
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
24 #include "config.h"
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
25
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
26 #include <stdio.h>
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
27 #include <stdlib.h>
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
28
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
29 #ifdef HAVE_SYS_PARAM_H
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
30 # include <sys/param.h>
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
31 #endif
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
32
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
33 #ifdef HAVE_LIMITS_H
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
34 # include <limits.h>
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
35 #endif
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
36
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
37 #include "dvdcss/dvdcss.h"
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
38
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
39 #include "common.h"
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
40 #include "css.h"
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
41 #include "libdvdcss.h"
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
42
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
43 /*****************************************************************************
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
44 * Error messages
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
45 *****************************************************************************/
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
46 void _print_error( dvdcss_t dvdcss, char *psz_string )
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
47 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
48 if( dvdcss->b_errors )
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
49 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
50 fprintf( stderr, "libdvdcss error: %s\n", psz_string );
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
51 }
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
52
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
53 dvdcss->psz_error = psz_string;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
54 }
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
55
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
56 /*****************************************************************************
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
57 * Debug messages
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
58 *****************************************************************************/
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
59 #if 0
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
60 void _print_debug( dvdcss_t dvdcss, char *psz_string )
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
61 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
62 if( dvdcss->b_debug )
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
63 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
64 fprintf( stderr, "libdvdcss debug: %s\n", psz_string );
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
65 }
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
66 }
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
67 #endif
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
68