📄 panic_8h.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 Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data 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> PanicZero<li>#define <a class="el" href="panic_8h.html#a1">PanicZero</a>(x) (unsigned int) PanicNull((void *) (x))<li>#define <a class="el" href="panic_8h.html#a2">PanicNotZero</a>(x) PanicNotNull((const void *) (x))<li>#define <a class="el" href="panic_8h.html#a3">PanicUnlessNew</a>(T) (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 PanicZero </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">x </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> (unsigned int) PanicNull((void *) (x))</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">x </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> PanicNotNull((const void *) (x))</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">T </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> (T*)PanicUnlessMalloc(sizeof(T))</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">const void * </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a2">size_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>sz</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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 + -