⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 panic_8h.html

📁 BlueLab3 bluetooth API 说明文档
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>BlueLab: panic.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>panic.h File Reference</h1>Terminate the application unhappily. <a href="#_details">More...</a><p><h2>Defines</h2><ul><li>#define <a class="el" href="panic_8h.html#a0">PanicFalse</a>&nbsp;&nbsp;&nbsp;PanicZero<li>#define <a class="el" href="panic_8h.html#a1">PanicZero</a>(x)&nbsp;&nbsp;&nbsp;(unsigned int) PanicNull((void *) (x))<li>#define <a class="el" href="panic_8h.html#a2">PanicNotZero</a>(x)&nbsp;&nbsp;&nbsp;PanicNotNull((const void *) (x))<li>#define <a class="el" href="panic_8h.html#a3">PanicUnlessNew</a>(T)&nbsp;&nbsp;&nbsp;(T*)PanicUnlessMalloc(sizeof(T))</ul><h2>Functions</h2><ul><li>void <a class="el" href="panic_8h.html#a4">Panic</a> (void)<dl class="el"><dd class="mdescRight">Panics the application unconditionally.  <a href="#a4"></a><br></dl><li>void * <a class="el" href="panic_8h.html#a5">PanicNull</a> (void *)<dl class="el"><dd class="mdescRight">Panics the application if the pointer passed is NULL, otherwise returns the pointer.  <a href="#a5"></a><br></dl><li>void <a class="el" href="panic_8h.html#a6">PanicNotNull</a> (const void *)<dl class="el"><dd class="mdescRight">Panics the application if the pointer passed in not NULL, otherwise returns.  <a href="#a6"></a><br></dl><li>void * <a class="el" href="panic_8h.html#a7">PanicUnlessMalloc</a> (<a class="el" href="csrtypes_8h.html#a2">size_t</a> sz)<dl class="el"><dd class="mdescRight">Allocates sz words and returns a pointer to the memory if successful. If the memory allocation fails, the application is panicked.  <a href="#a7"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Terminate the application unhappily. <p>These functions can be used to panic the application, forcing it to terminate abnormally.<hr><h2>Define Documentation</h2><a class="anchor" name="a0" doxytag="panic.h::PanicFalse" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define PanicFalse&nbsp;&nbsp;&nbsp;PanicZero          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Panics the application if the value passed is FALSE.     </td>  </tr></table><a class="anchor" name="a1" doxytag="panic.h::PanicZero" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define PanicZero          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">x&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;(unsigned int) PanicNull((void *) (x))</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Panics the application if the value passed is zero.     </td>  </tr></table><a class="anchor" name="a2" doxytag="panic.h::PanicNotZero" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define PanicNotZero          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">x&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;PanicNotNull((const void *) (x))</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Panics the application if the value passed is not zero.     </td>  </tr></table><a class="anchor" name="a3" doxytag="panic.h::PanicUnlessNew" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define PanicUnlessNew          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">T&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;(T*)PanicUnlessMalloc(sizeof(T))</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Allocates memory equal to the size of T and returns a pointer to the memory if successful. If the memory allocation fails, the application is panicked.     </td>  </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="a4" doxytag="panic.h::Panic" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Panic           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Panics the application unconditionally. <p>    </td>  </tr></table><a class="anchor" name="a5" doxytag="panic.h::PanicNull" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void* PanicNull           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Panics the application if the pointer passed is NULL, otherwise returns the pointer. <p>    </td>  </tr></table><a class="anchor" name="a6" doxytag="panic.h::PanicNotNull" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void PanicNotNull           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const void *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Panics the application if the pointer passed in not NULL, otherwise returns. <p>    </td>  </tr></table><a class="anchor" name="a7" doxytag="panic.h::PanicUnlessMalloc" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void* PanicUnlessMalloc           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a2">size_t</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>sz</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Allocates sz words and returns a pointer to the memory if successful. If the memory allocation fails, the application is panicked. <p>    </td>  </tr></table></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -