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

📄 byte_order.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 4 页
字号:
<entry>a <link linkend="gint64">gint64</link> value in big-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to host byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GINT64-FROM-LE-CAPS">GINT64_FROM_LE()</title><programlisting>#define GINT64_FROM_LE(val)	(GINT64_TO_LE (val))</programlisting><para>Converts a <link linkend="gint64">gint64</link> value from little-endian to host byte order.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="gint64">gint64</link> value in little-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to host byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GINT64-TO-BE-CAPS">GINT64_TO_BE()</title><programlisting>#define GINT64_TO_BE(val)	((gint64) GUINT64_SWAP_LE_BE (val))</programlisting><para>Converts a <link linkend="gint64">gint64</link> value from host byte order to big-endian.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="gint64">gint64</link> value in host byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to big-endian.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GINT64-TO-LE-CAPS">GINT64_TO_LE()</title><programlisting>#define GINT64_TO_LE(val)	((gint64) (val))</programlisting><para>Converts a <link linkend="gint64">gint64</link> value from host byte order to little-endian.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="gint64">gint64</link> value in host byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to little-endian.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT64-FROM-BE-CAPS">GUINT64_FROM_BE()</title><programlisting>#define GUINT64_FROM_BE(val)	(GUINT64_TO_BE (val))</programlisting><para>Converts a <link linkend="guint64">guint64</link> value from big-endian to host byte order.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint64">guint64</link> value in big-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to host byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT64-FROM-LE-CAPS">GUINT64_FROM_LE()</title><programlisting>#define GUINT64_FROM_LE(val)	(GUINT64_TO_LE (val))</programlisting><para>Converts a <link linkend="guint64">guint64</link> value from little-endian to host byte order.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint64">guint64</link> value in little-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to host byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT64-TO-BE-CAPS">GUINT64_TO_BE()</title><programlisting>#define GUINT64_TO_BE(val)	(GUINT64_SWAP_LE_BE (val))</programlisting><para>Converts a <link linkend="guint64">guint64</link> value from host byte order to big-endian.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint64">guint64</link> value in host byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to big-endian.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT64-TO-LE-CAPS">GUINT64_TO_LE()</title><programlisting>#define GUINT64_TO_LE(val)	((guint64) (val))</programlisting><para>Converts a <link linkend="guint64">guint64</link> value from host byte order to little-endian.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint64">guint64</link> value in host byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to little-endian.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT16-SWAP-BE-PDP-CAPS">GUINT16_SWAP_BE_PDP()</title><programlisting>#define GUINT16_SWAP_BE_PDP(val)	(GUINT16_SWAP_LE_BE (val))</programlisting><para>Converts a <link linkend="guint16">guint16</link> value between big-endian and pdp-endian byte order.The conversion is symmetric so it can be used both ways.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint16">guint16</link> value in big-endian or pdp-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to the opposite byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT16-SWAP-LE-BE-CAPS">GUINT16_SWAP_LE_BE()</title><programlisting>#define     GUINT16_SWAP_LE_BE(val)</programlisting><para>Converts a <link linkend="guint16">guint16</link> value between little-endian and big-endian byte order.The conversion is symmetric so it can be used both ways.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint16">guint16</link> value in little-endian or big-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to the opposite byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT16-SWAP-LE-PDP-CAPS">GUINT16_SWAP_LE_PDP()</title><programlisting>#define GUINT16_SWAP_LE_PDP(val)	((guint16) (val))</programlisting><para>Converts a <link linkend="guint16">guint16</link> value between little-endian and pdp-endian byte order.The conversion is symmetric so it can be used both ways.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint16">guint16</link> value in little-endian or pdp-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to the opposite byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT32-SWAP-BE-PDP-CAPS">GUINT32_SWAP_BE_PDP()</title><programlisting>#define     GUINT32_SWAP_BE_PDP(val)</programlisting><para>Converts a <link linkend="guint32">guint32</link> value between big-endian and pdp-endian byte order.The conversion is symmetric so it can be used both ways.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint32">guint32</link> value in big-endian or pdp-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to the opposite byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT32-SWAP-LE-BE-CAPS">GUINT32_SWAP_LE_BE()</title><programlisting>#define     GUINT32_SWAP_LE_BE(val)</programlisting><para>Converts a <link linkend="guint32">guint32</link> value between little-endian and big-endian byte order.The conversion is symmetric so it can be used both ways.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint32">guint32</link> value in little-endian or big-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to the opposite byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT32-SWAP-LE-PDP-CAPS">GUINT32_SWAP_LE_PDP()</title><programlisting>#define     GUINT32_SWAP_LE_PDP(val)</programlisting><para>Converts a <link linkend="guint32">guint32</link> value between little-endian and pdp-endian byte order.The conversion is symmetric so it can be used both ways.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint32">guint32</link> value in little-endian or pdp-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to the opposite byte order.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GUINT64-SWAP-LE-BE-CAPS">GUINT64_SWAP_LE_BE()</title><programlisting>#define     GUINT64_SWAP_LE_BE(val)</programlisting><para>Converts a <link linkend="guint64">guint64</link> value between little-endian and big-endian byte order.The conversion is symmetric so it can be used both ways.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>a <link linkend="guint64">guint64</link> value in little-endian or big-endian byte order.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><parameter>val</parameter> converted to the opposite byte order.</entry></row></tbody></tgroup></informaltable></refsect2></refsect1></refentry>

⌨️ 快捷键说明

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