File: debug_8h_source.html

package info (click to toggle)
pam-pkcs11 0.6.4-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,512 kB
  • ctags: 7,477
  • sloc: ansic: 12,651; sh: 10,824; xml: 2,756; makefile: 231; lex: 92
file content (108 lines) | stat: -rw-r--r-- 10,862 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>pam_pkcs11: debug.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_55f9682142a78e45196901be32452b47.html">src</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_782c1fcd7529e1a05f3f2af490691324.html">common</a>
  </div>
</div>
<div class="contents">
<h1>debug.h</h1><a href="debug_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * PKCS #11 PAM Login Module</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2003 Mario Strasser &lt;mast@gmx.net&gt;,</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * $Id: debug.h 363 2009-06-12 08:05:29Z ludovic.rousseau $</span>
<a name="l00016"></a>00016 <span class="comment"> */</span>
<a name="l00017"></a>00017 
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef __DEBUG_H_</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __DEBUG_H_</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include &lt;config.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#endif</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#ifndef DEBUG</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#warning &quot;Debugging is completely disabled!&quot;</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define DBG</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define DBG1</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define DBG2</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define DBG3</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define DBG4</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define DBG5</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define set_debug_level(l, ...) {}</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define debug(l, ...) {}</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00043"></a>00043 <span class="preprocessor">#else</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="comment">/*</span>
<a name="l00046"></a>00046 <span class="comment">#define DBG(f, ...) debug_print(1, __FILE__, __LINE__, f, ## __VA_ARGS__)</span>
<a name="l00047"></a>00047 <span class="comment">*/</span>
<a name="l00048"></a>00048 <span class="comment">/* this syntax is redundant in GCC, just used to avoid warns in -pedantic */</span>
<a name="l00049"></a><a class="code" href="debug_8h.html#a7be8305523c50424eef047e1e3597c94">00049</a> <span class="preprocessor">#define DBG(f) debug_print(1, __FILE__, __LINE__, f )</span>
<a name="l00050"></a><a class="code" href="debug_8h.html#a58b20e2df4fbae54a5beceb08e4266fd">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define DBG1(f,a) debug_print(1, __FILE__, __LINE__, f , a )</span>
<a name="l00051"></a><a class="code" href="debug_8h.html#ae63c856724c55362f47851412d680c19">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define DBG2(f,a,b) debug_print(1, __FILE__, __LINE__, f , a , b )</span>
<a name="l00052"></a><a class="code" href="debug_8h.html#aa2468cf70eeeb3ac01eb626a280f6e13">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define DBG3(f,a,b,c) debug_print(1, __FILE__, __LINE__, f , a , b , c )</span>
<a name="l00053"></a><a class="code" href="debug_8h.html#af27e0e60761d73fd6f4483f0e2710b8e">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define DBG4(f,a,b,c,d) debug_print(1, __FILE__, __LINE__, f , a , b , c , d )</span>
<a name="l00054"></a><a class="code" href="debug_8h.html#a033ffe96e37806d43a871552bf6e9080">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define DBG5(f,a,b,c,d,e) debug_print(1, __FILE__, __LINE__, f , a , b , c , d , e )</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a><a class="code" href="debug_8h.html#ab067bba050ad34a26a93f8d09ec37c1b">00056</a> <span class="preprocessor">#define ERR(f) debug_print(-1, __FILE__, __LINE__, f )</span>
<a name="l00057"></a><a class="code" href="debug_8h.html#a379142abff305e6614c25b2236b47ca5">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define ERR1(f,a) debug_print(-1, __FILE__, __LINE__, f , a )</span>
<a name="l00058"></a><a class="code" href="debug_8h.html#af8fd1c2b8a0f4915dae665a28f3f179b">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define ERR2(f,a,b) debug_print(-1, __FILE__, __LINE__, f , a , b )</span>
<a name="l00059"></a><a class="code" href="debug_8h.html#adeebf4c1aaabba0499ceaf255c5309a4">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define ERR3(f,a,b,c) debug_print(-1, __FILE__, __LINE__, f , a , b , c )</span>
<a name="l00060"></a><a class="code" href="debug_8h.html#a2d7f1f356a5e28043b315662c10310e6">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define ERR4(f,a,b,c,d) debug_print(-1, __FILE__, __LINE__, f , a , b , c , d )</span>
<a name="l00061"></a><a class="code" href="debug_8h.html#ab25ad5a5f0a5d5e7ee2672ee489a164d">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define ERR5(f,a,b,c,d,e) debug_print(-1, __FILE__, __LINE__, f , a , b , c , d , e )</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00063"></a>00063 <span class="preprocessor">#ifndef __DEBUG_C_</span>
<a name="l00064"></a><a class="code" href="debug_8h.html#ac95c9471143c82c3e11f73b41e401559">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define DEBUG_EXTERN extern</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG_EXTERN</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00073"></a>00073 <a class="code" href="debug_8h.html#ac95c9471143c82c3e11f73b41e401559">DEBUG_EXTERN</a> <span class="keywordtype">void</span> <a class="code" href="debug_8h.html#aa0bf418dd5c72aca6e7b0eb09a40e4c4" title="set_debug_level() Sets the current debug level.">set_debug_level</a>(<span class="keywordtype">int</span> level);
<a name="l00074"></a>00074 
<a name="l00079"></a>00079 <a class="code" href="debug_8h.html#ac95c9471143c82c3e11f73b41e401559">DEBUG_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="debug_8h.html#a0a71da33384f6806f93542b4cb95d7d2" title="get_debug_level() Returns the current debug level.">get_debug_level</a>(<span class="keywordtype">void</span>);
<a name="l00080"></a>00080 
<a name="l00093"></a>00093 <a class="code" href="debug_8h.html#ac95c9471143c82c3e11f73b41e401559">DEBUG_EXTERN</a> <span class="keywordtype">void</span> <a class="code" href="debug_8h.html#a3539f46d66926ffee22314bf923ab57b" title="debug_print() prints the given message">debug_print</a>(<span class="keywordtype">int</span> level, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...);
<a name="l00094"></a>00094 
<a name="l00095"></a>00095 <span class="preprocessor">#undef DEBUG_EXTERN</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span>
<a name="l00097"></a>00097 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 <span class="preprocessor">#endif </span><span class="comment">/* __DEBUG_H_ */</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sat Jun 12 17:28:15 2010 for pam_pkcs11 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>