Sourcecode and documentation for libtasn1-2 version 0.2.10-3sarge1
show bar | Show file versions
Search packages:
| Sourcecode archive home

errors.h

00001 /*
00002  *      Copyright (C) 2002 Fabio Fiorina
00003  *
00004  * This file is part of LIBASN1.
00005  *
00006  * LIBASN1 is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * LIBASN1 is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00019  */
00020 
00021 #ifndef ERRORS_H
00022 #define ERRORS_H
00023 
00024 
00025 #include "int.h"
00026 #include "errors_int.h"
00027 
00028 #ifdef LIBTASN1_DEBUG
00029 # ifdef __FILE__
00030 #  ifdef __LINE__
00031 #   define _libtasn1_assert() fprintf(stderr, "LIBTASN1_ASSERT: %s:%d\n", __FILE__,__LINE__);
00032 #  else
00033 #   define _libtasn1_assert() 
00034 #  endif
00035 # else /* __FILE__ defined */
00036 #  define _libtasn1_assert() 
00037 # endif
00038 #else /* no debug */
00039 # define _libtasn1_assert() 
00040 #endif
00041 
00042 const char* libtasn1_strerror(int error);
00043 void libtasn1_perror(int error);
00044 
00045 #ifdef LIBTASN1_DEBUG
00046  void _libtasn1_log( const char *fmt, ...);
00047 #else
00048 
00049 /* These macros only work with C99 compliant compilers
00050  */
00051 # ifdef C99_MACROS
00052 #  define _libtasn1_log(...)
00053 # else
00054 #  define _libtasn1_log _libtasn1_null_log
00055 void _libtasn1_null_log( void*, ...);
00056 # endif /* C99_MACROS */
00057 
00058 #endif /* DEBUG */
00059 
00060 #endif /* ERRORS_H */
00061 
00062 
00063 
00064 
00065 
00066 

Generated by  Doxygen 1.5.1