<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="ExtUnixAll.LittleEndian.html"> <link rel="next" href="ExtUnixAll.BA.html"> <link rel="Up" href="ExtUnixAll.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="ExtUnix" rel="Chapter" href="ExtUnix.html"> <link title="ExtUnixAll" rel="Chapter" href="ExtUnixAll.html"> <link title="ExtUnixSpecific" rel="Chapter" href="ExtUnixSpecific.html"><title>ExtUnixAll.HostEndian</title> </head> <body> <div class="navbar"><a class="pre" href="ExtUnixAll.LittleEndian.html" title="ExtUnixAll.LittleEndian">Previous</a> <a class="up" href="ExtUnixAll.html" title="ExtUnixAll">Up</a> <a class="post" href="ExtUnixAll.BA.html" title="ExtUnixAll.BA">Next</a> </div> <h1>Module <a href="type_ExtUnixAll.HostEndian.html">ExtUnixAll.HostEndian</a></h1> <pre><span class="keyword">module</span> HostEndian: <code class="code">sig</code> <a href="ExtUnixAll.HostEndian.html">..</a> <code class="code">end</code></pre><div class="info"> <h2 id="2_hostendianfunctions">host endian functions</h2> <p> <b>Author:</b> Goswin von Brederlow<br> </div> <hr width="100%"> <pre><span id="VALunsafe_get_uint8"><span class="keyword">val</span> unsafe_get_uint8</span> : <code class="type">string -> int -> int</code></pre><div class="info"> <code class="code">unsafe_get_X str off</code> extract integer of type <code class="code">X</code> from string <code class="code">str</code> starting at offset <code class="code">off</code>. Unsigned types are 0 extended and signed types are sign extended to fill the ocaml type. Bounds checking is not performed. Use with caution and only when the program logic guarantees that the access is within bounds. <p> Note: The 31bit functions extract a 32bit integer and return it as ocaml int. On 32bit platforms this can overflow as ocaml integers are 31bit signed there. No error is reported if this occurs. Use with care.<br> </div> <pre><span id="VALunsafe_get_int8"><span class="keyword">val</span> unsafe_get_int8</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALunsafe_get_uint16"><span class="keyword">val</span> unsafe_get_uint16</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALunsafe_get_int16"><span class="keyword">val</span> unsafe_get_int16</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALunsafe_get_uint31"><span class="keyword">val</span> unsafe_get_uint31</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALunsafe_get_int31"><span class="keyword">val</span> unsafe_get_int31</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALunsafe_get_int32"><span class="keyword">val</span> unsafe_get_int32</span> : <code class="type">string -> int -> int32</code></pre><pre><span id="VALunsafe_get_int64"><span class="keyword">val</span> unsafe_get_int64</span> : <code class="type">string -> int -> int64</code></pre><pre><span id="VALget_uint8"><span class="keyword">val</span> get_uint8</span> : <code class="type">string -> int -> int</code></pre><div class="info"> <code class="code">get_X str off</code> same as <code class="code">unsafe_get_X</code> but with bounds checking.<br> </div> <pre><span id="VALget_int8"><span class="keyword">val</span> get_int8</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALget_uint16"><span class="keyword">val</span> get_uint16</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALget_int16"><span class="keyword">val</span> get_int16</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALget_uint31"><span class="keyword">val</span> get_uint31</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALget_int31"><span class="keyword">val</span> get_int31</span> : <code class="type">string -> int -> int</code></pre><pre><span id="VALget_int32"><span class="keyword">val</span> get_int32</span> : <code class="type">string -> int -> int32</code></pre><pre><span id="VALget_int64"><span class="keyword">val</span> get_int64</span> : <code class="type">string -> int -> int64</code></pre><pre><span id="VALunsafe_set_uint8"><span class="keyword">val</span> unsafe_set_uint8</span> : <code class="type">string -> int -> int -> unit</code></pre><div class="info"> <code class="code">unsafe_set_X str off v</code> stores the integer <code class="code">v</code> as type <code class="code">X</code> in string <code class="code">str</code> starting at offset <code class="code">off</code>. Bounds checking is not performed. Use with caution and only when the program logic guarantees that the access is within bounds. <p> Note: The 31bit functions store an ocaml int as 32bit integer. On 32bit platforms ocaml integers are 31bit signed and will be sign extended to 32bit first. Use with care.<br> </div> <pre><span id="VALunsafe_set_int8"><span class="keyword">val</span> unsafe_set_int8</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALunsafe_set_uint16"><span class="keyword">val</span> unsafe_set_uint16</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALunsafe_set_int16"><span class="keyword">val</span> unsafe_set_int16</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALunsafe_set_uint31"><span class="keyword">val</span> unsafe_set_uint31</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALunsafe_set_int31"><span class="keyword">val</span> unsafe_set_int31</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALunsafe_set_int32"><span class="keyword">val</span> unsafe_set_int32</span> : <code class="type">string -> int -> int32 -> unit</code></pre><pre><span id="VALunsafe_set_int64"><span class="keyword">val</span> unsafe_set_int64</span> : <code class="type">string -> int -> int64 -> unit</code></pre><pre><span id="VALset_uint8"><span class="keyword">val</span> set_uint8</span> : <code class="type">string -> int -> int -> unit</code></pre><div class="info"> <code class="code">set_X str off v</code> same as <code class="code">unsafe_set_X</code> but with bounds checking.<br> </div> <pre><span id="VALset_int8"><span class="keyword">val</span> set_int8</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALset_uint16"><span class="keyword">val</span> set_uint16</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALset_int16"><span class="keyword">val</span> set_int16</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALset_uint31"><span class="keyword">val</span> set_uint31</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALset_int31"><span class="keyword">val</span> set_int31</span> : <code class="type">string -> int -> int -> unit</code></pre><pre><span id="VALset_int32"><span class="keyword">val</span> set_int32</span> : <code class="type">string -> int -> int32 -> unit</code></pre><pre><span id="VALset_int64"><span class="keyword">val</span> set_int64</span> : <code class="type">string -> int -> int64 -> unit</code></pre></body></html>