<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: csutil/csendian.h File Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>csutil/csendian.h File Reference</h1>Helpers for dealing with endian conversions. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="math_8h-source.html">math.h</a>></code><br> <code>#include "<a class="el" href="cstypes_8h-source.html">cstypes.h</a>"</code><br> <p> <a href="csendian_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Classes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structcsBigEndian.html">csBigEndian</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Big endian to native conversion routines. <a href="structcsBigEndian.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structcsGetFromAddress.html">csGetFromAddress</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sized data type access helpers. <a href="structcsGetFromAddress.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structcsIEEEfloat.html">csIEEEfloat</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert IEEE 32-bit floats from or to native machine floats. <a href="structcsIEEEfloat.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structcsLittleEndian.html">csLittleEndian</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Little endian to native conversion routines. <a href="structcsLittleEndian.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structcsSetToAddress.html">csSetToAddress</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sized data type access helpers. <a href="structcsSetToAddress.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structcsSwapBytes.html">csSwapBytes</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Methods to unconditionally swap the byte order of specifically sized types. <a href="structcsSwapBytes.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g20ad6ed7b2fc5754d8696f8d4eeebb90"></a><!-- doxytag: member="csendian.h::csQroundSure" ref="g20ad6ed7b2fc5754d8696f8d4eeebb90" args="(x)" --> #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#g20ad6ed7b2fc5754d8696f8d4eeebb90">csQroundSure</a>(x) (int ((x) + ((x < 0) ? -0.5 : +0.5)))</td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="group__util.html#gecfc3c54bd29ad5964e1c1c3ccbf89df">int64</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#gc75c4514d8024792608a175e77e66470">csDoubleToLongLong</a> (double d)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a double to a cross-platform 64-bit format (no endianess adjustments!). <a href="group__util.html#gc75c4514d8024792608a175e77e66470"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="group__util.html#g56f1a81c92849566ae864511088eb7e8">int32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#g96baed464a5b3a7116ce97fcd2526966">csFloatToLong</a> (float f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a float to a cross-platform 32-bit format (no endianess adjustments!). <a href="group__util.html#g96baed464a5b3a7116ce97fcd2526966"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static short </td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#g3a5f5b5a5c1588012069c8f7c4bef51e">csFloatToShort</a> (float f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a float to a cross-platform 16-bit format (no endianess adjustments!). <a href="group__util.html#g3a5f5b5a5c1588012069c8f7c4bef51e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#g58ef9816cc9b61576b38954372f3e02a">csLongLongToDouble</a> (<a class="el" href="group__util.html#gecfc3c54bd29ad5964e1c1c3ccbf89df">int64</a> i)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a 64-bit cross-platform double to native format (no endianess adjustments!). <a href="group__util.html#g58ef9816cc9b61576b38954372f3e02a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static float </td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#g4f3643cfc0df0821156b600627a13375">csLongToFloat</a> (<a class="el" href="group__util.html#g56f1a81c92849566ae864511088eb7e8">int32</a> l)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a 32-bit cross-platform float to native format (no endianess adjustments!). <a href="group__util.html#g4f3643cfc0df0821156b600627a13375"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static float </td><td class="memItemRight" valign="bottom"><a class="el" href="group__util.html#gb87f1a6ea54f6388e88a83ece13b7902">csShortToFloat</a> (short s)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a 16-bit cross-platform float to native format (no endianess adjustments!). <a href="group__util.html#gb87f1a6ea54f6388e88a83ece13b7902"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Helpers for dealing with endian conversions. <p> <p>Definition in file <a class="el" href="csendian_8h-source.html">csendian.h</a>.</p> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>