pam_pkcs11 0.6.8

- Main Page
- Data Structures
- Files
- Directories

- File List
- Globals

Defines | Functions
debug.h File Reference

Go to the source code of this file.

## Defines

#define | DBG(f) debug_print(1, __FILE__, __LINE__, f )
| This module contains macros for generate debugging messages Will be compiled an linked only when -DDEBUG CFLAG is used.
#define | DBG1(f, a) debug_print(1, __FILE__, __LINE__, f , a )
#define | DBG2(f, a, b) debug_print(1, __FILE__, __LINE__, f , a , b )
#define | DBG3(f, a, b, c) debug_print(1, __FILE__, __LINE__, f , a , b , c )
#define | DBG4(f, a, b, c, d) debug_print(1, __FILE__, __LINE__, f , a , b , c , d )
#define | DBG5(f, a, b, c, d, e) debug_print(1, __FILE__, __LINE__, f , a , b , c , d , e )
#define | ERR(f) debug_print(-1, __FILE__, __LINE__, f )
#define | ERR1(f, a) debug_print(-1, __FILE__, __LINE__, f , a )
#define | ERR2(f, a, b) debug_print(-1, __FILE__, __LINE__, f , a , b )
#define | ERR3(f, a, b, c) debug_print(-1, __FILE__, __LINE__, f , a , b , c )
#define | ERR4(f, a, b, c, d) debug_print(-1, __FILE__, __LINE__, f , a , b , c , d )
#define | ERR5(f, a, b, c, d, e) debug_print(-1, __FILE__, __LINE__, f , a , b , c , d , e )
#define | DEBUG_EXTERN extern

## Functions

DEBUG_EXTERN void | set_debug_level (int level)
| set_debug_level() Sets the current debug level.
DEBUG_EXTERN int | get_debug_level (void)
| get_debug_level() Returns the current debug level.
DEBUG_EXTERN void | debug_print (int level, const char *file, int line, const char *format,...)
| debug_print() prints the given message

## Define Documentation

#define DBG | ( |  | f | ) | debug_print(1, __FILE__, __LINE__, f )

This module contains macros for generate debugging messages Will be compiled an linked only when -DDEBUG CFLAG is used.

Definition at line 49 of file debug.h.

#define DBG1 | ( |  | f,
|  |  | a
| ) |  | debug_print(1, __FILE__, __LINE__, f , a )

Definition at line 50 of file debug.h.

#define DBG2 | ( |  | f,
|  |  | a,
|  |  | b
| ) |  | debug_print(1, __FILE__, __LINE__, f , a , b )

Definition at line 51 of file debug.h.

#define DBG3 | ( |  | f,
|  |  | a,
|  |  | b,
|  |  | c
| ) |  | debug_print(1, __FILE__, __LINE__, f , a , b , c )

Definition at line 52 of file debug.h.

#define DBG4 | ( |  | f,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  | debug_print(1, __FILE__, __LINE__, f , a , b , c , d )

Definition at line 53 of file debug.h.

#define DBG5 | ( |  | f,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e
| ) |  | debug_print(1, __FILE__, __LINE__, f , a , b , c , d , e )

Definition at line 54 of file debug.h.

#define DEBUG_EXTERN extern

Definition at line 64 of file debug.h.

#define ERR | ( |  | f | ) | debug_print(-1, __FILE__, __LINE__, f )

Definition at line 56 of file debug.h.

#define ERR1 | ( |  | f,
|  |  | a
| ) |  | debug_print(-1, __FILE__, __LINE__, f , a )

Definition at line 57 of file debug.h.

#define ERR2 | ( |  | f,
|  |  | a,
|  |  | b
| ) |  | debug_print(-1, __FILE__, __LINE__, f , a , b )

Definition at line 58 of file debug.h.

#define ERR3 | ( |  | f,
|  |  | a,
|  |  | b,
|  |  | c
| ) |  | debug_print(-1, __FILE__, __LINE__, f , a , b , c )

Definition at line 59 of file debug.h.

#define ERR4 | ( |  | f,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  | debug_print(-1, __FILE__, __LINE__, f , a , b , c , d )

Definition at line 60 of file debug.h.

#define ERR5 | ( |  | f,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e
| ) |  | debug_print(-1, __FILE__, __LINE__, f , a , b , c , d , e )

Definition at line 61 of file debug.h.

## Function Documentation

DEBUG_EXTERN void debug_print | ( | int | level,
|  | const char * | file,
|  | int | line,
|  | const char * | format,
|  |  | ...
| ) |  |

debug_print() prints the given message

if the current debug-level is greater or equal to the defined level. The format string as well as all further arguments are interpreted as by the printf() function.

Parameters:

  level | Debug level of message
  file | Name of the file where message is generated
  line | Line number where message is generated
  format | Message format
  .... | Optional arguments

DEBUG_EXTERN int get_debug_level | ( | void |  | ) |

get_debug_level() Returns the current debug level.

Returns:
  Current debug level

DEBUG_EXTERN void set_debug_level | ( | int | level | ) |

set_debug_level() Sets the current debug level.

Parameters:

  level | New debug level