📄 group__misc__macros.htm
字号:
<!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>MiniGUI V1.6.10 API Reference: Miscellaneous macros</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical List</a> | <a class="qindex" href="annotated.htm">Data Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File List</a> | <a class="qindex" href="functions.htm">Data Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related Pages</a></div><h1>Miscellaneous macros<br><small>[<a class="el" href="group__macros__types.htm">Macros and data types commonly used</a>]</small></h1><h2>Defines</h2><ul><li>#define <a class="el" href="group__misc__macros.htm#ga0">TABLESIZE</a>(table) (sizeof(table)/sizeof(table[0]))<dl class="el"><dd class="mdescRight">A macro returns the number of elements in a <em>table</em>. <a href="#ga0"></a><br></dl><li>#define <a class="el" href="group__misc__macros.htm#ga1">MAX</a>(x, y) (((x) > (y))?(x):(y))<dl class="el"><dd class="mdescRight">A macro returns the maximum of <em>x</em> and <em>y</em>. <a href="#ga1"></a><br></dl><li>#define <a class="el" href="group__misc__macros.htm#ga2">MIN</a>(x, y) (((x) < (y))?(x):(y))<dl class="el"><dd class="mdescRight">A macro returns the minimum of <em>x</em> and <em>y</em>. <a href="#ga2"></a><br></dl><li>#define <a class="el" href="group__misc__macros.htm#ga3">ABS</a>(x) (((x)<0) ? -(x) : (x))<dl class="el"><dd class="mdescRight">A macro returns the absolute value of <em>x</em>. <a href="#ga3"></a><br></dl><li>#define <a class="el" href="group__misc__macros.htm#ga6">MAX_PATH</a> PATH_MAX<dl class="el"><dd class="mdescRight">The possible maximal length of a path name. <a href="#ga6"></a><br></dl><li>#define <a class="el" href="group__misc__macros.htm#ga7">MAX_NAME</a> NAME_MAX<dl class="el"><dd class="mdescRight">The possible maximal length of a file name. <a href="#ga7"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga3" doxytag="common.h::ABS"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define ABS </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> (((x)<0) ? -(x) : (x))</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>A macro returns the absolute value of <em>x</em>. <p><p>Definition at line <a class="el" href="common_8h-source.htm#l01373">1373</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga1" doxytag="common.h::MAX"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define MAX </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">x, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>y </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> (((x) > (y))?(x):(y))</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>A macro returns the maximum of <em>x</em> and <em>y</em>. <p><p>Definition at line <a class="el" href="common_8h-source.htm#l01359">1359</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga7" doxytag="common.h::MAX_NAME"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define MAX_NAME NAME_MAX </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The possible maximal length of a file name. <p><dl compact><dt><b>Note:</b></dt><dd>This definition is an alias of NAME_MAX </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01405">1405</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga6" doxytag="common.h::MAX_PATH"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define MAX_PATH PATH_MAX </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The possible maximal length of a path name. <p><dl compact><dt><b>Note:</b></dt><dd>This definition is an alias of PATH_MAX </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01399">1399</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga2" doxytag="common.h::MIN"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define MIN </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">x, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>y </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> (((x) < (y))?(x):(y))</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>A macro returns the minimum of <em>x</em> and <em>y</em>. <p><p>Definition at line <a class="el" href="common_8h-source.htm#l01366">1366</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga0" doxytag="common.h::TABLESIZE"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define TABLESIZE </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">table </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> (sizeof(table)/sizeof(table[0]))</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>A macro returns the number of elements in a <em>table</em>. <p><p>Definition at line <a class="el" href="common_8h-source.htm#l01351">1351</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><hr size="1"><address style="align: right;"><small>Generated on Thu Nov 22 15:35:53 2007 for MiniGUI V1.6.10 API Reference by <a href="http://www.doxygen.org/index.html"><img src="http://www.minigui.com/api_ref/1.6.10/doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -