<?xml version="1.0" encoding="UTF-8"?> <!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" lang="en" xml:lang="en"> <head> <title>lomoco: lomoco/lomoco_debug.h Source File</title> <style type="text/css"> .cp-doNotDisplay { display: none; } @media aural, braille, handheld, tty { .cp-doNotDisplay { display: inline; speak: normal; }} .cp-edit { text-align: right; } @media print, embossed { .cp-edit { display: none; }} </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="robots" content="all" /> <link rel="stylesheet" type="text/css" href="doxygen.css" /> <link rel="stylesheet" media="screen" type="text/css" href="csync.css" /> <link rel="stylesheet" media="print, embossed" type="text/css" href="print.css" /> </head> <body> <ul class="cp-doNotDisplay"> <li><a href="#cp-content" accesskey="2">Skip to content</a></li> <li><a href="#cp-menu" accesskey="5">Skip to link menu</a></li> </ul> <div id="container"> <div id="header"> <div id="header_top"><div><div style="padding: 10px 30px;"> <!-- <img alt ="" src="top-kde.jpg"/> --> csync API Reference </div></div></div> <div id="header_bottom"> <div id="location"> <ul> <li><a href="index.html">csync</a></li> </ul> </div> <div id="menu"> <ul><li><a href="http://www.csync.org/">Sitemap</a></li> <li><a href="http://www.csync.org/">Contact Us</a></li> </ul> </div> </div> </div> <!-- End page header --> <div id="body_wrapper"> <div id="body"> <!-- begin main content --> <div id="right"> <div class="content"> <div id="main"> <div class="clearer"> </div> <!-- <h2><a name="content"></a>lomoco</h2> --> <!-- BC --> <!-- Generated by Doxygen 1.5.9 --> <div class="navpath"><a class="el" href="dir_77ee8add767687b3d3811ff476d1a4f3.html">lomoco</a> </div> <div class="contents"> <h1>lomoco_debug.h</h1><a href="lomoco__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"> * lomoco - Logitech Mouse Control for Linux</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * debug.h form XQF - Quake server browser and launcher</span> <a name="l00005"></a>00005 <span class="comment"> * Copyright (C) 1998-2000 Roman Pozlevich <roma@botik.ru></span> <a name="l00006"></a>00006 <span class="comment"> * Copyright (c) 2006 by Andreas Schneider <mail@cynapses.org></span> <a name="l00007"></a>00007 <span class="comment"> *</span> <a name="l00008"></a>00008 <span class="comment"> * This program is free software; you can redistribute it and/or</span> <a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU General Public License</span> <a name="l00010"></a>00010 <span class="comment"> * as published by the Free Software Foundation; either version 2</span> <a name="l00011"></a>00011 <span class="comment"> * of the License, or (at your option) any later version.</span> <a name="l00012"></a>00012 <span class="comment"> *</span> <a name="l00013"></a>00013 <span class="comment"> * This program is distributed in the hope that it will be useful,</span> <a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00016"></a>00016 <span class="comment"> * GNU General Public License for more details.</span> <a name="l00017"></a>00017 <span class="comment"> *</span> <a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU General Public License</span> <a name="l00019"></a>00019 <span class="comment"> * along with this program; if not, write to the Free Software Foundation,</span> <a name="l00020"></a>00020 <span class="comment"> * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</span> <a name="l00021"></a>00021 <span class="comment"> *</span> <a name="l00022"></a>00022 <span class="comment"> * vim: ts=2 sw=2 et cindent</span> <a name="l00023"></a>00023 <span class="comment"> */</span> <a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="preprocessor">#ifndef _LOMOCO_DEBUG_H</span> <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define _LOMOCO_DEBUG_H</span> <a name="l00027"></a>00027 <span class="preprocessor"></span> <a name="l00028"></a>00028 <span class="preprocessor">#include <libgen.h></span> <a name="l00029"></a>00029 <span class="comment"></span> <a name="l00030"></a>00030 <span class="comment">/**</span> <a name="l00031"></a>00031 <span class="comment"> * @def DEFAULT_DEBUG_LEVEL.</span> <a name="l00032"></a>00032 <span class="comment"> * A macro for the default debug level.</span> <a name="l00033"></a>00033 <span class="comment"> */</span> <a name="l00034"></a><a class="code" href="lomoco__debug_8h.html#18da678808a23365d00c58cdae11e29e">00034</a> <span class="preprocessor">#define DEFAULT_DEBUG_LEVEL 0</span> <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="comment"></span> <a name="l00036"></a>00036 <span class="comment">/**</span> <a name="l00037"></a>00037 <span class="comment"> * @def LOMOCO_DEBUG.</span> <a name="l00038"></a>00038 <span class="comment"> * A macro that prints the given debug message depending on the debug level.</span> <a name="l00039"></a>00039 <span class="comment"> */</span> <a name="l00040"></a><a class="code" href="lomoco__debug_8h.html#6a7d1371e8ef9950aabd4635617058e3">00040</a> <span class="preprocessor">#define LOMOCO_DEBUG(level,fmt,rest...) \</span> <a name="l00041"></a>00041 <span class="preprocessor"> if (level <= lomoco_get_debug_level()) \</span> <a name="l00042"></a>00042 <span class="preprocessor"> lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,level,0,fmt,##rest)</span> <a name="l00043"></a>00043 <span class="preprocessor"></span><span class="comment"></span> <a name="l00044"></a>00044 <span class="comment">/**</span> <a name="l00045"></a>00045 <span class="comment"> * @def LOMOCO_INFORMAL.</span> <a name="l00046"></a>00046 <span class="comment"> * A macro that prints the given informal message.</span> <a name="l00047"></a>00047 <span class="comment"> */</span> <a name="l00048"></a><a class="code" href="lomoco__debug_8h.html#529a90888c8561022488ce26f67ba2d1">00048</a> <span class="preprocessor">#define LOMOCO_INFORMAL(fmt,rest...) \</span> <a name="l00049"></a>00049 <span class="preprocessor"> lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-1,0,fmt,##rest)</span> <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="comment"></span> <a name="l00051"></a>00051 <span class="comment">/**</span> <a name="l00052"></a>00052 <span class="comment"> * @def LOMOCO_WARNING.</span> <a name="l00053"></a>00053 <span class="comment"> * A macro that prints the given warning message.</span> <a name="l00054"></a>00054 <span class="comment"> */</span> <a name="l00055"></a><a class="code" href="lomoco__debug_8h.html#d7153aeeb56f5b89678193f0f9cb49a2">00055</a> <span class="preprocessor">#define LOMOCO_WARNING(fmt,rest...) \</span> <a name="l00056"></a>00056 <span class="preprocessor"> lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-2,0,fmt,##rest)</span> <a name="l00057"></a>00057 <span class="preprocessor"></span><span class="comment"></span> <a name="l00058"></a>00058 <span class="comment">/**</span> <a name="l00059"></a>00059 <span class="comment"> * @def LOMOCO_ERROR.</span> <a name="l00060"></a>00060 <span class="comment"> * A macro that prints the given error message.</span> <a name="l00061"></a>00061 <span class="comment"> */</span> <a name="l00062"></a><a class="code" href="lomoco__debug_8h.html#d6068fb2eaafde372ed6b92ac7d15ac8">00062</a> <span class="preprocessor">#define LOMOCO_ERROR(fmt,rest...) \</span> <a name="l00063"></a>00063 <span class="preprocessor"> lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-3,0,fmt,##rest)</span> <a name="l00064"></a>00064 <span class="preprocessor"></span><span class="comment"></span> <a name="l00065"></a>00065 <span class="comment">/**</span> <a name="l00066"></a>00066 <span class="comment"> * @def LOMOCO_ERRNO</span> <a name="l00067"></a>00067 <span class="comment"> * A macro that prints the given error message depending on the error number.</span> <a name="l00068"></a>00068 <span class="comment"> */</span> <a name="l00069"></a><a class="code" href="lomoco__debug_8h.html#3add8ab9c1a19c577f0ce14cc079945c">00069</a> <span class="preprocessor">#define LOMOCO_ERRNO(err,fmt,rest...) \</span> <a name="l00070"></a>00070 <span class="preprocessor"> lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-4,err,fmt,##rest)</span> <a name="l00071"></a>00071 <span class="preprocessor"></span> <a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="lomoco__debug_8h.html#f7f7bc1b483ce2ed1b3b8154bf45b013">lomoco_debug_int</a>(<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>* function, <span class="keywordtype">int</span> level, <span class="keywordtype">int</span> err, <span class="keyword">const</span> <span class="keywordtype">char</span>* fmt, ...); <a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="lomoco__debug_8h.html#59d72d7cc1beccbb8511cbebc0238eb4">lomoco_debug_cmd</a>(<span class="keywordtype">int</span>, <span class="keywordtype">char</span> *[], <span class="keywordtype">char</span> *, ...); <a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="lomoco__debug_8h.html#78a3058430aaad4a6dd42c8cdda7e11f">lomoco_set_debug_level</a> (<span class="keywordtype">int</span>); <a name="l00075"></a>00075 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="lomoco__debug_8h.html#63755312c3c116d9862d93f2c32be7a1">lomoco_get_debug_level</a> (<span class="keywordtype">void</span>); <a name="l00076"></a>00076 <a name="l00077"></a>00077 <span class="keywordtype">int</span> <a class="code" href="lomoco__debug_8h.html#68bb93052602520b52af94d1b8198368">lomoco_debug_increase_indent</a>(<span class="keywordtype">void</span>); <a name="l00078"></a>00078 <span class="keywordtype">int</span> <a class="code" href="lomoco__debug_8h.html#ed57a07f2708ed6094dbf004631ac099">lomoco_debug_decrease_indent</a>(<span class="keywordtype">void</span>); <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="preprocessor">#endif </span><span class="comment">/* _LOMOCO_DEBUG_H */</span> <a name="l00081"></a>00081 </pre></div></div> </div> </div> </div> <div id="left"> <div class="menu_box"> <a name="cp-menu" /><div class="menutitle"><div> <h2 id="cp-menu-project">lomoco</h2> <a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "lomoco"</a> </div></div> <!-- menu --> <div class="menu_box"> <a name="cp-menu" /><div class="menutitle"><div> <h2 id="cp-menu-project">API Documentation</h2> <a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "@topname@"</a> </div></div> <div class="nav_list"> <ul> <!-- gmenu --> </ul></div></div> </div> </div> <div class="clearer"></div> </div> <div class="clearer"></div> </div> <div id="end_body"></div> <div id="footer"><div id="footer_text"> Generated with <a href="http://www.stack.nl/~dimitri/doxygen/" target="_blank">Doxygen</a> </div></div> </div> </body> </html>