PageRenderTime 49ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/src/error.c

https://github.com/syntaxkid82/libdvdcss-1.2.13
C | 67 lines | 30 code | 10 blank | 27 comment | 2 complexity | 1af8e3590a0b3a0d46208b35c9e77593 MD5 | raw file
Possible License(s): GPL-2.0
  1. /*****************************************************************************
  2. * error.c: error management functions
  3. *****************************************************************************
  4. * Copyright (C) 1998-2002 VideoLAN
  5. *
  6. * Author: Sam Hocevar <sam@zoy.org>
  7. *
  8. * This library is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this library; if not, write to the Free Software Foundation, Inc.,
  20. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  21. *****************************************************************************/
  22. #include "config.h"
  23. #include <stdio.h>
  24. #include <stdlib.h>
  25. #ifdef HAVE_SYS_PARAM_H
  26. # include <sys/param.h>
  27. #endif
  28. #ifdef HAVE_LIMITS_H
  29. # include <limits.h>
  30. #endif
  31. #include "dvdcss/dvdcss.h"
  32. #include "common.h"
  33. #include "css.h"
  34. #include "libdvdcss.h"
  35. /*****************************************************************************
  36. * Error messages
  37. *****************************************************************************/
  38. void _print_error( dvdcss_t dvdcss, char *psz_string )
  39. {
  40. if( dvdcss->b_errors )
  41. {
  42. fprintf( stderr, "libdvdcss error: %s\n", psz_string );
  43. }
  44. dvdcss->psz_error = psz_string;
  45. }
  46. /*****************************************************************************
  47. * Debug messages
  48. *****************************************************************************/
  49. #if 0
  50. void _print_debug( dvdcss_t dvdcss, char *psz_string )
  51. {
  52. if( dvdcss->b_debug )
  53. {
  54. fprintf( stderr, "libdvdcss debug: %s\n", psz_string );
  55. }
  56. }
  57. #endif