mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
183 lines
116 KiB
HTML
183 lines
116 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
|
|
<html><head><title>OS Abstraction</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
|
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
|
|
|
<!-- Generated by Natural Docs, version 1.4 -->
|
|
<!-- http://www.naturaldocs.org -->
|
|
|
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
|
|
|
|
|
|
|
|
|
<div id=Content><div class="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="OS_Abstraction"></a>OS Abstraction</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#OS_Abstraction" >OS Abstraction</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Debug" >Debug</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#dbg_assert" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">dbg_assert</a></td><td class=SDescription>Breaks into the debugger based on a test.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#dbg_break" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">dbg_break</a></td><td class=SDescription>Breaks into the debugger.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#dbg_msg" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">dbg_msg</a></td><td class=SDescription>Prints a debug message.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Memory" >Memory</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mem_alloc" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">mem_alloc</a></td><td class=SDescription>Allocates memory.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mem_free" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">mem_free</a></td><td class=SDescription>Frees a block allocated through <a href="#mem_alloc" class=LFunction id=link6 onMouseOver="ShowTip(event, 'tt4', 'link6')" onMouseOut="HideTip('tt4')">mem_alloc</a>.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mem_copy" id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">mem_copy</a></td><td class=SDescription>Copies a a memory block.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mem_move" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">mem_move</a></td><td class=SDescription>Copies a a memory block</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mem_zero" id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">mem_zero</a></td><td class=SDescription>Sets a complete memory block to 0</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mem_comp" id=link10 onMouseOver="ShowTip(event, 'tt9', 'link10')" onMouseOut="HideTip('tt9')">mem_comp</a></td><td class=SDescription>Compares two blocks of memory</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#File_IO" >File IO</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#io_open" id=link11 onMouseOver="ShowTip(event, 'tt10', 'link11')" onMouseOut="HideTip('tt10')">io_open</a></td><td class=SDescription>Opens a file.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#io_read" id=link12 onMouseOver="ShowTip(event, 'tt11', 'link12')" onMouseOut="HideTip('tt11')">io_read</a></td><td class=SDescription>Reads data into a buffer from a file.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#io_skip" id=link13 onMouseOver="ShowTip(event, 'tt12', 'link13')" onMouseOut="HideTip('tt12')">io_skip</a></td><td class=SDescription>Skips data in a file.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#io_write" id=link14 onMouseOver="ShowTip(event, 'tt13', 'link14')" onMouseOut="HideTip('tt13')">io_write</a></td><td class=SDescription>Writes data from a buffer to file.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#io_seek" id=link15 onMouseOver="ShowTip(event, 'tt14', 'link15')" onMouseOut="HideTip('tt14')">io_seek</a></td><td class=SDescription>Seeks to a specified offset in the file.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#io_tell" id=link16 onMouseOver="ShowTip(event, 'tt15', 'link16')" onMouseOut="HideTip('tt15')">io_tell</a></td><td class=SDescription>Gets the current position in the file.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#io_length" id=link17 onMouseOver="ShowTip(event, 'tt16', 'link17')" onMouseOut="HideTip('tt16')">io_length</a></td><td class=SDescription>Gets the total length of the file. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#io_close" id=link18 onMouseOver="ShowTip(event, 'tt17', 'link18')" onMouseOut="HideTip('tt17')">io_close</a></td><td class=SDescription>Closes a file.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#io_flush" id=link19 onMouseOver="ShowTip(event, 'tt18', 'link19')" onMouseOut="HideTip('tt18')">io_flush</a></td><td class=SDescription>Empties all buffers and writes all pending data.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#io_stdin" id=link20 onMouseOver="ShowTip(event, 'tt19', 'link20')" onMouseOut="HideTip('tt19')">io_stdin</a></td><td class=SDescription>Returns an <IOHANDLE> to the standard input.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#io_stdout" id=link21 onMouseOver="ShowTip(event, 'tt20', 'link21')" onMouseOut="HideTip('tt20')">io_stdout</a></td><td class=SDescription>Returns an <IOHANDLE> to the standard output.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#io_stderr" id=link22 onMouseOver="ShowTip(event, 'tt21', 'link22')" onMouseOut="HideTip('tt21')">io_stderr</a></td><td class=SDescription>Returns an <IOHANDLE> to the standard error.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Threads" >Threads</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#thread_sleep" id=link23 onMouseOver="ShowTip(event, 'tt22', 'link23')" onMouseOut="HideTip('tt22')">thread_sleep</a></td><td class=SDescription>Suspends the current thread for a given period.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#thread_create" id=link24 onMouseOver="ShowTip(event, 'tt23', 'link24')" onMouseOut="HideTip('tt23')">thread_create</a></td><td class=SDescription>Creates a new thread.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#thread_wait" id=link25 onMouseOver="ShowTip(event, 'tt24', 'link25')" onMouseOut="HideTip('tt24')">thread_wait</a></td><td class=SDescription>Waits for a thread to be done or destroyed.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#thread_destoy" >thread_destoy</a></td><td class=SDescription>Destroys a thread.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#thread_yeild" >thread_yeild</a></td><td class=SDescription>Yeild the current threads execution slice.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Locks" >Locks</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Timer" >Timer</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#time_get" id=link26 onMouseOver="ShowTip(event, 'tt25', 'link26')" onMouseOut="HideTip('tt25')">time_get</a></td><td class=SDescription>Fetches a sample from a high resolution timer.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#time_freq" id=link27 onMouseOver="ShowTip(event, 'tt26', 'link27')" onMouseOut="HideTip('tt26')">time_freq</a></td><td class=SDescription>Returns the frequency of the high resolution timer.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#time_timestamp" id=link28 onMouseOver="ShowTip(event, 'tt27', 'link28')" onMouseOut="HideTip('tt27')">time_timestamp</a></td><td class=SDescription>Retrives the current time as a UNIX timestamp</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Network_General" >Network General</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_init" id=link29 onMouseOver="ShowTip(event, 'tt28', 'link29')" onMouseOut="HideTip('tt28')">net_init</a></td><td class=SDescription>Initiates network functionallity.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_host_lookup" id=link30 onMouseOver="ShowTip(event, 'tt29', 'link30')" onMouseOut="HideTip('tt29')">net_host_lookup</a></td><td class=SDescription>Does a hostname lookup by name and fills out the passed NETADDR struct with the recieved details.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_addr_comp" id=link31 onMouseOver="ShowTip(event, 'tt30', 'link31')" onMouseOut="HideTip('tt30')">net_addr_comp</a></td><td class=SDescription>Compares two network addresses.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_addr_str" id=link32 onMouseOver="ShowTip(event, 'tt31', 'link32')" onMouseOut="HideTip('tt31')">net_addr_str</a></td><td class=SDescription>Turns a network address into a representive string.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Network_UDP" >Network UDP</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_udp_create" id=link33 onMouseOver="ShowTip(event, 'tt32', 'link33')" onMouseOut="HideTip('tt32')">net_udp_create</a></td><td class=SDescription>Creates a UDP socket and binds it to a port.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_udp_send" id=link34 onMouseOver="ShowTip(event, 'tt33', 'link34')" onMouseOut="HideTip('tt33')">net_udp_send</a></td><td class=SDescription>Sends a packet over an UDP socket.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_udp_recv" id=link35 onMouseOver="ShowTip(event, 'tt34', 'link35')" onMouseOut="HideTip('tt34')">net_udp_recv</a></td><td class=SDescription>Recives a packet over an UDP socket.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_udp_close" id=link36 onMouseOver="ShowTip(event, 'tt35', 'link36')" onMouseOut="HideTip('tt35')">net_udp_close</a></td><td class=SDescription>Closes an UDP socket.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Network_TCP" >Network TCP</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_tcp_create" id=link37 onMouseOver="ShowTip(event, 'tt36', 'link37')" onMouseOut="HideTip('tt36')">net_tcp_create</a></td><td class=SDescription>Creates a TCP socket.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_tcp_listen" id=link38 onMouseOver="ShowTip(event, 'tt37', 'link38')" onMouseOut="HideTip('tt37')">net_tcp_listen</a></td><td class=SDescription>Makes the socket start listening for new connections.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_tcp_accept" id=link39 onMouseOver="ShowTip(event, 'tt38', 'link39')" onMouseOut="HideTip('tt38')">net_tcp_accept</a></td><td class=SDescription>Polls a listning socket for a new connection.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_tcp_connect" id=link40 onMouseOver="ShowTip(event, 'tt39', 'link40')" onMouseOut="HideTip('tt39')">net_tcp_connect</a></td><td class=SDescription>Connects one socket to another.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_tcp_send" id=link41 onMouseOver="ShowTip(event, 'tt40', 'link41')" onMouseOut="HideTip('tt40')">net_tcp_send</a></td><td class=SDescription>Sends data to a TCP stream.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_tcp_recv" id=link42 onMouseOver="ShowTip(event, 'tt41', 'link42')" onMouseOut="HideTip('tt41')">net_tcp_recv</a></td><td class=SDescription>Recvives data from a TCP stream.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_tcp_close" id=link43 onMouseOver="ShowTip(event, 'tt42', 'link43')" onMouseOut="HideTip('tt42')">net_tcp_close</a></td><td class=SDescription>Closes a TCP socket.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Strings" >Strings</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#str_append" id=link44 onMouseOver="ShowTip(event, 'tt43', 'link44')" onMouseOut="HideTip('tt43')">str_append</a></td><td class=SDescription>Appends a string to another.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#str_copy" id=link45 onMouseOver="ShowTip(event, 'tt44', 'link45')" onMouseOut="HideTip('tt44')">str_copy</a></td><td class=SDescription>Copies a string to another.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#str_format" id=link46 onMouseOver="ShowTip(event, 'tt45', 'link46')" onMouseOut="HideTip('tt45')">str_format</a></td><td class=SDescription>Performs printf formating into a buffer.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#str_sanitize_strong" id=link47 onMouseOver="ShowTip(event, 'tt46', 'link47')" onMouseOut="HideTip('tt46')">str_sanitize_strong</a></td><td class=SDescription>Replaces all characters below 32 and above 127 with whitespace.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#str_sanitize" id=link48 onMouseOver="ShowTip(event, 'tt47', 'link48')" onMouseOut="HideTip('tt47')">str_sanitize</a></td><td class=SDescription>Replaces all characters below 32 and above 127 with whitespace with exception to \r, \n and \r.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#str_comp_nocase" id=link49 onMouseOver="ShowTip(event, 'tt48', 'link49')" onMouseOut="HideTip('tt48')">str_comp_nocase</a></td><td class=SDescription>Compares to strings case insensitive.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#str_find_nocase" id=link50 onMouseOver="ShowTip(event, 'tt49', 'link50')" onMouseOut="HideTip('tt49')">str_find_nocase</a></td><td class=SDescription>Finds a string inside another string case insensitive.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#str_hex" id=link51 onMouseOver="ShowTip(event, 'tt50', 'link51')" onMouseOut="HideTip('tt50')">str_hex</a></td><td class=SDescription>Takes a datablock and generates a hexstring of it.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Filesystem" >Filesystem</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#fs_listdir" id=link52 onMouseOver="ShowTip(event, 'tt51', 'link52')" onMouseOut="HideTip('tt51')">fs_listdir</a></td><td class=SDescription>Lists the files in a directory</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#fs_makedir" id=link53 onMouseOver="ShowTip(event, 'tt52', 'link53')" onMouseOut="HideTip('tt52')">fs_makedir</a></td><td class=SDescription>Creates a directory</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#fs_storage_path" id=link54 onMouseOver="ShowTip(event, 'tt53', 'link54')" onMouseOut="HideTip('tt53')">fs_storage_path</a></td><td class=SDescription>Fetches per user configuration directory.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Undocumented" >Undocumented</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_tcp_connect_non_blocking" id=link55 onMouseOver="ShowTip(event, 'tt54', 'link55')" onMouseOut="HideTip('tt54')">net_tcp_connect_non_blocking</a></td><td class=SDescription>DOCTODO: serp</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_tcp_set_non_blocking" id=link56 onMouseOver="ShowTip(event, 'tt55', 'link56')" onMouseOut="HideTip('tt55')">net_tcp_set_non_blocking</a></td><td class=SDescription>DOCTODO: serp</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_tcp_set_non_blocking" >net_tcp_set_non_blocking</a></td><td class=SDescription>DOCTODO: serp</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#net_errno" id=link57 onMouseOver="ShowTip(event, 'tt56', 'link57')" onMouseOut="HideTip('tt56')">net_errno</a></td><td class=SDescription>DOCTODO: serp</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#net_would_block" id=link58 onMouseOver="ShowTip(event, 'tt57', 'link58')" onMouseOut="HideTip('tt57')">net_would_block</a></td><td class=SDescription>DOCTODO: serp</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Debug"></a>Debug</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="dbg_assert"></a>dbg_assert</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void dbg_assert(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>test,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Breaks into the debugger based on a test.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>test</td><td class=CDLDescription>Result of the test.</td></tr><tr><td class=CDLEntry>msg</td><td class=CDLDescription>Message that should be printed if the test fails.</td></tr></table><h4 class=CHeading>Remarks</h4><p>Does nothing in release version of the library.</p><h4 class=CHeading>See Also</h4><p><a href="#dbg_break" class=LFunction id=link59 onMouseOver="ShowTip(event, 'tt2', 'link59')" onMouseOut="HideTip('tt2')">dbg_break</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="dbg_break"></a>dbg_break</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>void dbg_break()</td></tr></table></blockquote><p>Breaks into the debugger.</p><h4 class=CHeading>Remarks</h4><p>Does nothing in release version of the library.</p><h4 class=CHeading>See Also</h4><p><a href="#dbg_assert" class=LFunction id=link60 onMouseOver="ShowTip(event, 'tt1', 'link60')" onMouseOut="HideTip('tt1')">dbg_assert</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="dbg_msg"></a>dbg_msg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void dbg_msg(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>sys,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>fmt,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap> </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>...</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Prints a debug message.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sys</td><td class=CDLDescription>A string that describes what system the message belongs to</td></tr><tr><td class=CDLEntry>fmt</td><td class=CDLDescription>A printf styled format string.</td></tr></table><h4 class=CHeading>Remarks</h4><p>Does nothing in relase version of the library.</p><h4 class=CHeading>See Also</h4><p><a href="#dbg_assert" class=LFunction id=link61 onMouseOver="ShowTip(event, 'tt1', 'link61')" onMouseOut="HideTip('tt1')">dbg_assert</a></p></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Memory"></a>Memory</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mem_alloc"></a>mem_alloc</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *mem_alloc_debug(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>filename,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>line,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>alignment</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Allocates memory.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the needed block.</td></tr><tr><td class=CDLEntry>alignment</td><td class=CDLDescription>Alignment for the block.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns a pointer to the newly allocated block. Returns a null pointer if the memory couldn’t be allocated.</p><h4 class=CHeading>Remarks</h4><ul><li>Passing 0 to size will allocated the smallest amount possible and return a unique pointer.</li></ul><h4 class=CHeading>See Also</h4><p><a href="#mem_free" class=LFunction id=link62 onMouseOver="ShowTip(event, 'tt5', 'link62')" onMouseOut="HideTip('tt5')">mem_free</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mem_free"></a>mem_free</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_free(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>block</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Frees a block allocated through <a href="#mem_alloc" class=LFunction id=link63 onMouseOver="ShowTip(event, 'tt4', 'link63')" onMouseOut="HideTip('tt4')">mem_alloc</a>.</p><h4 class=CHeading>Remarks</h4><ul><li>In the debug version of the library the function will assert if a non-valid block is passed, like a null pointer or a block that isn’t allocated.</li></ul><h4 class=CHeading>See Also</h4><p><a href="#mem_alloc" class=LFunction id=link64 onMouseOver="ShowTip(event, 'tt4', 'link64')" onMouseOut="HideTip('tt4')">mem_alloc</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mem_copy"></a>mem_copy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_copy(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dest,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>source,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Copies a a memory block.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dest</td><td class=CDLDescription>Destination.</td></tr><tr><td class=CDLEntry>source</td><td class=CDLDescription>Source to copy.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the block to copy.</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>This functions DOES NOT handles cases where source and destination is overlapping.</li></ul><h4 class=CHeading>See Also</h4><p><a href="#mem_move" class=LFunction id=link65 onMouseOver="ShowTip(event, 'tt7', 'link65')" onMouseOut="HideTip('tt7')">mem_move</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mem_move"></a>mem_move</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_move(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dest,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>source,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Copies a a memory block</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dest</td><td class=CDLDescription>Destination</td></tr><tr><td class=CDLEntry>source</td><td class=CDLDescription>Source to copy</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the block to copy</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>This functions handles cases where source and destination is overlapping</li></ul><h4 class=CHeading>See Also</h4><p><a href="#mem_copy" class=LFunction id=link66 onMouseOver="ShowTip(event, 'tt6', 'link66')" onMouseOut="HideTip('tt6')">mem_copy</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mem_zero"></a>mem_zero</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_zero(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>block,</td></tr><tr><td></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets a complete memory block to 0</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>block</td><td class=CDLDescription>Pointer to the block to zero out</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the block</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mem_comp"></a>mem_comp</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int mem_comp(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>b,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Compares two blocks of memory</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>a</td><td class=CDLDescription>First block of data</td></tr><tr><td class=CDLEntry>b</td><td class=CDLDescription>Second block of data</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the data to compare</td></tr></table><h4 class=CHeading>Returns</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><0</td><td class=CDLDescription>Block a is lesser then block b</td></tr><tr><td class=CDLEntry>0</td><td class=CDLDescription>Block a is equal to block b</td></tr></table><blockquote><pre>0 - Block a is greater then block b</pre></blockquote></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="File_IO"></a>File IO</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_open"></a>io_open</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>IOHANDLE io_open(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>filename,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>flags</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Opens a file.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>filename</td><td class=CDLDescription>File to open.</td></tr><tr><td class=CDLEntry>flags</td><td class=CDLDescription>A set of flags. IOFLAG_READ, IOFLAG_WRITE, IOFLAG_RANDOM.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns a handle to the file on success and 0 on failure.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_read"></a>io_read</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unsigned io_read(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>buffer,</td></tr><tr><td></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Reads data into a buffer from a file.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file to read data from.</td></tr><tr><td class=CDLEntry>buffer</td><td class=CDLDescription>Pointer to the buffer that will recive the data.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Number of bytes to read from the file.</td></tr></table><h4 class=CHeading>Returns</h4><p>Number of bytes read.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_skip"></a>io_skip</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unsigned io_skip(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PType nowrap>unsigned </td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Skips data in a file.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Number of bytes to skip.</td></tr></table><h4 class=CHeading>Returns</h4><p>Number of bytes skipped.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_write"></a>io_write</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unsigned io_write(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>IOHANDLE </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>buffer,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Writes data from a buffer to file.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file.</td></tr><tr><td class=CDLEntry>buffer</td><td class=CDLDescription>Pointer to the data that should be written.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Number of bytes to write.</td></tr></table><h4 class=CHeading>Returns</h4><p>Number of bytes written.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_seek"></a>io_seek</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int io_seek(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>offset,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>origin</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Seeks to a specified offset in the file.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file.</td></tr><tr><td class=CDLEntry>offset</td><td class=CDLDescription>Offset from pos to stop.</td></tr><tr><td class=CDLEntry>origin</td><td class=CDLDescription>Position to start searching from.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_tell"></a>io_tell</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>long int io_tell(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the current position in the file.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns the current position. -1L if an error occured.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_length"></a>io_length</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>long int io_length(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the total length of the file. Resetting cursor to the beginning</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns the total size. -1L if an error occured.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_close"></a>io_close</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int io_close(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Closes a file.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_flush"></a>io_flush</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int io_flush(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Empties all buffers and writes all pending data.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>io</td><td class=CDLDescription>Handle to the file.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_stdin"></a>io_stdin</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>IOHANDLE io_stdin()</td></tr></table></blockquote><p>Returns an <IOHANDLE> to the standard input.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_stdout"></a>io_stdout</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>IOHANDLE io_stdout()</td></tr></table></blockquote><p>Returns an <IOHANDLE> to the standard output.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="io_stderr"></a>io_stderr</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>IOHANDLE io_stderr()</td></tr></table></blockquote><p>Returns an <IOHANDLE> to the standard error.</p></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Threads"></a>Threads</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="thread_sleep"></a>thread_sleep</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void thread_sleep(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>milliseconds</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Suspends the current thread for a given period.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>milliseconds</td><td class=CDLDescription>Number of milliseconds to sleep.</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="thread_create"></a>thread_create</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *thread_create(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>(*threadfunc)(void *),</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>user</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a new thread.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>threadfunc</td><td class=CDLDescription>Entry point for the new thread.</td></tr><tr><td class=CDLEntry>user</td><td class=CDLDescription>Pointer to pass to the thread.</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="thread_wait"></a>thread_wait</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void thread_wait(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>thread</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Waits for a thread to be done or destroyed.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>thread</td><td class=CDLDescription>Thread to wait for.</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="thread_destoy"></a>thread_destoy</h3><div class=CBody><p>Destroys a thread.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>thread</td><td class=CDLDescription>Thread to destroy.</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="thread_yeild"></a>thread_yeild</h3><div class=CBody><p>Yeild the current threads execution slice.</p></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Locks"></a>Locks</h3></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Timer"></a>Timer</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="time_get"></a>time_get</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int64 time_get()</td></tr></table></blockquote><p>Fetches a sample from a high resolution timer.</p><h4 class=CHeading>Returns</h4><p>Current value of the timer.</p><h4 class=CHeading>Remarks</h4><p>To know how fast the timer is ticking, see <a href="#time_freq" class=LFunction id=link67 onMouseOver="ShowTip(event, 'tt26', 'link67')" onMouseOut="HideTip('tt26')">time_freq</a>.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="time_freq"></a>time_freq</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int64 time_freq()</td></tr></table></blockquote><p>Returns the frequency of the high resolution timer.</p><h4 class=CHeading>Returns</h4><p>Returns the frequency of the high resolution timer.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="time_timestamp"></a>time_timestamp</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>unsigned time_timestamp()</td></tr></table></blockquote><p>Retrives the current time as a UNIX timestamp</p><h4 class=CHeading>Returns</h4><p>The time as a UNIX timestamp</p></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Network_General"></a>Network General</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_init"></a>net_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int net_init()</td></tr></table></blockquote><p>Initiates network functionallity.</p><h4 class=CHeading>Returns</h4><p>Returns 0 on success,</p><h4 class=CHeading>Remarks</h4><p>You must call this function before using any other network functions.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_host_lookup"></a>net_host_lookup</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_host_lookup(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>hostname,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>types</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Does a hostname lookup by name and fills out the passed NETADDR struct with the recieved details.</p><h4 class=CHeading>Returns</h4><p>0 on success.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_addr_comp"></a>net_addr_comp</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_addr_comp(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>b</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Compares two network addresses.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>a</td><td class=CDLDescription>Address to compare</td></tr><tr><td class=CDLEntry>b</td><td class=CDLDescription>Address to compare to.</td></tr></table><h4 class=CHeading>Returns</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><0</td><td class=CDLDescription>Address a is lesser then address b</td></tr><tr><td class=CDLEntry>0</td><td class=CDLDescription>Address a is equal to address b</td></tr></table><blockquote><pre>0 - Address a is greater then address b</pre></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_addr_str"></a>net_addr_str</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_addr_str(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>string,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>max_length</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Turns a network address into a representive string.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>addr</td><td class=CDLDescription>Address to turn into a string.</td></tr><tr><td class=CDLEntry>string</td><td class=CDLDescription>Buffer to fill with the string.</td></tr><tr><td class=CDLEntry>max_length</td><td class=CDLDescription>Maximum size of the string.</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>The string will always be zero terminated</li></ul></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Network_UDP"></a>Network UDP</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_udp_create"></a>net_udp_create</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>NETSOCKET net_udp_create(</td><td class=PType nowrap>NETADDR </td><td class=PParameter nowrap>bindaddr</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a UDP socket and binds it to a port.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>bindaddr</td><td class=CDLDescription>Address to bind the socket to.</td></tr></table><h4 class=CHeading>Returns</h4><p>On success it returns an handle to the socket. On failure it returns NETSOCKET_INVALID.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_udp_send"></a>net_udp_send</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_udp_send(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sends a packet over an UDP socket.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to use.</td></tr><tr><td class=CDLEntry>addr</td><td class=CDLDescription>Where to send the packet.</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>Pointer to the packet data to send.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the packet.</td></tr></table><h4 class=CHeading>Returns</h4><p>On success it returns the number of bytes sent. Returns -1 on error.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_udp_recv"></a>net_udp_recv</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_udp_recv(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>maxsize</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Recives a packet over an UDP socket.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to use.</td></tr><tr><td class=CDLEntry>addr</td><td class=CDLDescription>Pointer to an NETADDR that will recive the address.</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>Pointer to a buffer that will recive the data.</td></tr><tr><td class=CDLEntry>maxsize</td><td class=CDLDescription>Maximum size to recive.</td></tr></table><h4 class=CHeading>Returns</h4><p>On success it returns the number of bytes recived. Returns -1 on error.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_udp_close"></a>net_udp_close</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_udp_close(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Closes an UDP socket.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to close.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success. -1 on error.</p></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Network_TCP"></a>Network TCP</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_create"></a>net_tcp_create</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>NETSOCKET net_tcp_create(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a TCP socket.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>bindaddr</td><td class=CDLDescription>Address to bind the socket to.</td></tr></table><h4 class=CHeading>Returns</h4><p>On success it returns an handle to the socket. On failure it returns NETSOCKET_INVALID.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_listen"></a>net_tcp_listen</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_listen(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>backlog</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Makes the socket start listening for new connections.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to start listen to.</td></tr><tr><td class=CDLEntry>backlog</td><td class=CDLDescription>Size of the queue of incomming connections to keep.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_accept"></a>net_tcp_accept</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_accept(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>new_sock,</td></tr><tr><td></td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Polls a listning socket for a new connection.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Listning socket to poll.</td></tr><tr><td class=CDLEntry>new_sock</td><td class=CDLDescription>Pointer to a socket to fill in with the new socket.</td></tr><tr><td class=CDLEntry>addr</td><td class=CDLDescription>Pointer to an address that will be filled in the remote address (optional, can be NULL).</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns a non-negative integer on success. Negative integer on failure.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_connect"></a>net_tcp_connect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_connect(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Connects one socket to another.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to connect.</td></tr><tr><td class=CDLEntry>addr</td><td class=CDLDescription>Address to connect to.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_send"></a>net_tcp_send</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_send(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sends data to a TCP stream.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to send data to.</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>Pointer to the data to send.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the data to send.</td></tr></table><h4 class=CHeading>Returns</h4><p>Number of bytes sent. Negative value on failure.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_recv"></a>net_tcp_recv</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_recv(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>maxsize</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Recvives data from a TCP stream.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to recvive data from.</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>Pointer to a buffer to write the data to</td></tr><tr><td class=CDLEntry>max_size</td><td class=CDLDescription>Maximum of data to write to the buffer.</td></tr></table><h4 class=CHeading>Returns</h4><p>Number of bytes recvived. Negative value on failure.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_close"></a>net_tcp_close</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_close(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Closes a TCP socket.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>sock</td><td class=CDLDescription>Socket to close.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success. Negative value on failure.</p></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Strings"></a>Strings</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_append"></a>str_append</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_append(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dst,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>src,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>dst_size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Appends a string to another.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Pointer to a buffer that contains a string.</td></tr><tr><td class=CDLEntry>src</td><td class=CDLDescription>String to append.</td></tr><tr><td class=CDLEntry>dst_size</td><td class=CDLDescription>Size of the buffer of the dst string.</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>The strings are treated as zero-termineted strings.</li><li>Garantees that dst string will contain zero-termination.</li></ul></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_copy"></a>str_copy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_copy(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dst,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>src,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>dst_size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Copies a string to another.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Pointer to a buffer that shall recive the string.</td></tr><tr><td class=CDLEntry>src</td><td class=CDLDescription>String to be copied.</td></tr><tr><td class=CDLEntry>dst_size</td><td class=CDLDescription>Size of the buffer dst.</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>The strings are treated as zero-termineted strings.</li><li>Garantees that dst string will contain zero-termination.</li></ul></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_format"></a>str_format</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_format(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>buffer,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>buffer_size,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>format,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap> </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>...</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Performs printf formating into a buffer.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>buffer</td><td class=CDLDescription>Pointer to the buffer to recive the formated string.</td></tr><tr><td class=CDLEntry>buffer_size</td><td class=CDLDescription>Size of the buffer.</td></tr><tr><td class=CDLEntry>format</td><td class=CDLDescription>printf formating string.</td></tr><tr><td class=CDLEntry>...</td><td class=CDLDescription>Parameters for the formating.</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>See the C manual for syntax for the printf formating string.</li><li>The strings are treated as zero-termineted strings.</li><li>Garantees that dst string will contain zero-termination.</li></ul></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_sanitize_strong"></a>str_sanitize_strong</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_sanitize_strong(</td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>str</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Replaces all characters below 32 and above 127 with whitespace.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>str</td><td class=CDLDescription>String to sanitize.</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>The strings are treated as zero-termineted strings.</li></ul></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_sanitize"></a>str_sanitize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_sanitize(</td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>str</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Replaces all characters below 32 and above 127 with whitespace with exception to \r, \n and \r.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>str</td><td class=CDLDescription>String to sanitize.</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>The strings are treated as zero-termineted strings.</li></ul></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_comp_nocase"></a>str_comp_nocase</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int str_comp_nocase(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>b</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Compares to strings case insensitive.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>a</td><td class=CDLDescription>String to compare.</td></tr><tr><td class=CDLEntry>b</td><td class=CDLDescription>String to compare.</td></tr></table><h4 class=CHeading>Returns</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><0</td><td class=CDLDescription>String a is lesser then string b</td></tr><tr><td class=CDLEntry>0</td><td class=CDLDescription>String a is equal to string b</td></tr></table><blockquote><pre>0 - String a is greater then string b</pre></blockquote><h4 class=CHeading>Remarks</h4><ul><li>Only garanted to work with a-z/A-Z.</li><li>The strings are treated as zero-termineted strings.</li></ul></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_find_nocase"></a>str_find_nocase</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>const char *str_find_nocase(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>haystack,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>needle</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Finds a string inside another string case insensitive.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>haystack</td><td class=CDLDescription>String to search in</td></tr><tr><td class=CDLEntry>needle</td><td class=CDLDescription>String to search for</td></tr></table><h4 class=CHeading>Returns</h4><p>A pointer into haystack where the needle was found. Returns NULL of needle could not be found.</p><h4 class=CHeading>Remarks</h4><ul><li>Only garanted to work with a-z/A-Z.</li><li>The strings are treated as zero-termineted strings.</li></ul></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="str_hex"></a>str_hex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_hex(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dst,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>dst_size,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>data_size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Takes a datablock and generates a hexstring of it.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Buffer to fill with hex data</td></tr><tr><td class=CDLEntry>dst_size</td><td class=CDLDescription>size of the buffer</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>Data to turn into hex</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>Size of the data</td></tr></table><h4 class=CHeading>Remarks</h4><ul><li>The desination buffer will be zero-terminated</li></ul></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Filesystem"></a>Filesystem</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="fs_listdir"></a>fs_listdir</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>typedef void (</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>fs_listdir_callback</td><td class=PAfterParameters nowrap>)(const char *name, int is_dir, void *user)</td></tr></table></td></tr></table></blockquote><p>Lists the files in a directory</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dir</td><td class=CDLDescription>Directory to list</td></tr><tr><td class=CDLEntry>cb</td><td class=CDLDescription>Callback function to call for each entry</td></tr><tr><td class=CDLEntry>user</td><td class=CDLDescription>Pointer to give to the callback</td></tr></table><h4 class=CHeading>Returns</h4><p>Always returns 0.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="fs_makedir"></a>fs_makedir</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int fs_makedir(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>path</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a directory</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>path</td><td class=CDLDescription>Directory to create</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns 0 on success. Negative value on failure.</p><h4 class=CHeading>Remarks</h4><p>Does not create several directories if needed. “a/b/c” will result in a failure if b or a does not exist.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="fs_storage_path"></a>fs_storage_path</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int fs_storage_path(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>appname,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>path,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>max</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Fetches per user configuration directory.</p><h4 class=CHeading>Returns</h4><p>Returns 0 on success. Negative value on failure.</p><h4 class=CHeading>Remarks</h4><ul><li>Returns ~/.appname on UNIX based systems</li><li>Returns ~/Library/Applications Support/appname on Mac OS X</li><li>Returns %APPDATA%/Appname on Windows based systems</li></ul></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Undocumented"></a>Undocumented</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_connect_non_blocking"></a>net_tcp_connect_non_blocking</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_connect_non_blocking(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>DOCTODO: serp</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_set_non_blocking"></a>net_tcp_set_non_blocking</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_set_non_blocking(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>DOCTODO: serp</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_tcp_set_non_blocking"></a>net_tcp_set_non_blocking</h3><div class=CBody><p>DOCTODO: serp</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_errno"></a>net_errno</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int net_errno()</td></tr></table></blockquote><p>DOCTODO: serp</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="net_would_block"></a>net_would_block</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int net_would_block()</td></tr></table></blockquote><p>DOCTODO: serp</p></div></div></div>
|
|
|
|
</div><!--Content-->
|
|
|
|
|
|
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
|
|
|
|
|
<div id=Menu><div class=MEntry><div class=MFile id=MSelected>OS Abstraction</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Engine</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MFile><a href="e_if_msg-h.html">Messaging</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Client</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Overview</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="docs/client_time-txt.html">Time on the client</a></div></div><div class=MEntry><div class=MFile><a href="docs/prediction-txt.html">Prediction</a></div></div><div class=MEntry><div class=MFile><a href="docs/snapshots-txt.html">Snapshots</a></div></div><div class=MEntry><div class=MFile><a href="docs/server_op-txt.html">Server Operation</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Reference</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="e_if_modc-h.html">Client Hooks</a></div></div><div class=MEntry><div class=MFile><a href="e_if_client-h.html">Client Interface</a></div></div><div class=MEntry><div class=MFile><a href="e_if_other-h.html">Engine Interface</a></div></div><div class=MEntry><div class=MFile><a href="e_if_gfx-h.html">Graphics</a></div></div><div class=MEntry><div class=MFile><a href="e_if_inp-h.html">Input</a></div></div><div class=MEntry><div class=MFile><a href="e_if_snd-h.html">Sound</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Server</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Reference</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="e_if_mods-h.html">Server Hooks</a></div></div><div class=MEntry><div class=MFile><a href="e_if_server-h.html">Server Interface</a></div></div></div></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent7')">Game</a><div class=MGroupContent id=MGroupContent7><div class=MEntry><div class=MFile><a href="../files/server/gs_common-hpp.html">Entity</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent8')">Index</a><div class=MGroupContent id=MGroupContent8><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Constants.html">Constants</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
|
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
|
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Constants">Constants</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
|
|
HideAllBut([6, 7, 8], 9);// --></script></div><!--Menu-->
|
|
|
|
|
|
|
|
<!--START_ND_TOOLTIPS-->
|
|
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void dbg_assert(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>test,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Breaks into the debugger based on a test.</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>void dbg_break()</td></tr></table></blockquote>Breaks into the debugger.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void dbg_msg(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>sys,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>fmt,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap> </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>...</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Prints a debug message.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *mem_alloc_debug(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>filename,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>line,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>alignment</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Allocates memory.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_free(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>block</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Frees a block allocated through mem_alloc.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_copy(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dest,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>source,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Copies a a memory block.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_move(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dest,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>source,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Copies a a memory block</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void mem_zero(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>block,</td></tr><tr><td></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Sets a complete memory block to 0</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int mem_comp(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>b,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Compares two blocks of memory</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>IOHANDLE io_open(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>filename,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>flags</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Opens a file.</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unsigned io_read(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>buffer,</td></tr><tr><td></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Reads data into a buffer from a file.</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unsigned io_skip(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PType nowrap>unsigned </td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Skips data in a file.</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unsigned io_write(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>IOHANDLE </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>buffer,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>unsigned </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Writes data from a buffer to file.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int io_seek(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>offset,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>origin</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Seeks to a specified offset in the file.</div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>long int io_tell(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Gets the current position in the file.</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>long int io_length(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Gets the total length of the file. </div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int io_close(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Closes a file.</div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int io_flush(</td><td class=PType nowrap>IOHANDLE </td><td class=PParameter nowrap>io</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Empties all buffers and writes all pending data.</div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>IOHANDLE io_stdin()</td></tr></table></blockquote>Returns an IOHANDLE to the standard input.</div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>IOHANDLE io_stdout()</td></tr></table></blockquote>Returns an IOHANDLE to the standard output.</div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>IOHANDLE io_stderr()</td></tr></table></blockquote>Returns an IOHANDLE to the standard error.</div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void thread_sleep(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>milliseconds</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Suspends the current thread for a given period.</div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *thread_create(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>(*threadfunc)(void *),</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>user</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a new thread.</div></div><div class=CToolTip id="tt24"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void thread_wait(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>thread</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Waits for a thread to be done or destroyed.</div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int64 time_get()</td></tr></table></blockquote>Fetches a sample from a high resolution timer.</div></div><div class=CToolTip id="tt26"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int64 time_freq()</td></tr></table></blockquote>Returns the frequency of the high resolution timer.</div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>unsigned time_timestamp()</td></tr></table></blockquote>Retrives the current time as a UNIX timestamp</div></div><div class=CToolTip id="tt28"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int net_init()</td></tr></table></blockquote>Initiates network functionallity.</div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_host_lookup(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>hostname,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>types</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Does a hostname lookup by name and fills out the passed NETADDR struct with the recieved details.</div></div><div class=CToolTip id="tt30"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_addr_comp(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>b</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Compares two network addresses.</div></div><div class=CToolTip id="tt31"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_addr_str(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>string,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>max_length</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Turns a network address into a representive string.</div></div><div class=CToolTip id="tt32"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>NETSOCKET net_udp_create(</td><td class=PType nowrap>NETADDR </td><td class=PParameter nowrap>bindaddr</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a UDP socket and binds it to a port.</div></div><div class=CToolTip id="tt33"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_udp_send(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Sends a packet over an UDP socket.</div></div><div class=CToolTip id="tt34"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_udp_recv(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr,</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>maxsize</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Recives a packet over an UDP socket.</div></div><div class=CToolTip id="tt35"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_udp_close(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Closes an UDP socket.</div></div><div class=CToolTip id="tt36"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>NETSOCKET net_tcp_create(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a TCP socket.</div></div><div class=CToolTip id="tt37"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_listen(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>backlog</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Makes the socket start listening for new connections.</div></div><div class=CToolTip id="tt38"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_accept(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>new_sock,</td></tr><tr><td></td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Polls a listning socket for a new connection.</div></div><div class=CToolTip id="tt39"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_connect(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>addr</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Connects one socket to another.</div></div><div class=CToolTip id="tt40"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_send(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Sends data to a TCP stream.</div></div><div class=CToolTip id="tt41"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_recv(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>maxsize</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Recvives data from a TCP stream.</div></div><div class=CToolTip id="tt42"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_close(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Closes a TCP socket.</div></div><div class=CToolTip id="tt43"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_append(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dst,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>src,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>dst_size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Appends a string to another.</div></div><div class=CToolTip id="tt44"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_copy(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dst,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>src,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>dst_size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Copies a string to another.</div></div><div class=CToolTip id="tt45"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_format(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>buffer,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>buffer_size,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>format,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap> </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>...</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Performs printf formating into a buffer.</div></div><div class=CToolTip id="tt46"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_sanitize_strong(</td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>str</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Replaces all characters below 32 and above 127 with whitespace.</div></div><div class=CToolTip id="tt47"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_sanitize(</td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>str</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Replaces all characters below 32 and above 127 with whitespace with exception to \r, \n and \r.</div></div><div class=CToolTip id="tt48"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int str_comp_nocase(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>b</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Compares to strings case insensitive.</div></div><div class=CToolTip id="tt49"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>const char *str_find_nocase(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>haystack,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>needle</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Finds a string inside another string case insensitive.</div></div><div class=CToolTip id="tt50"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void str_hex(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>dst,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>dst_size,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>data_size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Takes a datablock and generates a hexstring of it.</div></div><div class=CToolTip id="tt51"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>typedef void (</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>fs_listdir_callback</td><td class=PAfterParameters nowrap>)(const char *name, int is_dir, void *user)</td></tr></table></td></tr></table></blockquote>Lists the files in a directory</div></div><div class=CToolTip id="tt52"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int fs_makedir(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>path</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a directory</div></div><div class=CToolTip id="tt53"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int fs_storage_path(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>appname,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>path,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>max</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Fetches per user configuration directory.</div></div><div class=CToolTip id="tt54"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_connect_non_blocking(</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>NETSOCKET </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>sock,</td></tr><tr><td></td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>NETADDR </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>a</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>DOCTODO: serp</div></div><div class=CToolTip id="tt55"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int net_tcp_set_non_blocking(</td><td class=PType nowrap>NETSOCKET </td><td class=PParameter nowrap>sock</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>DOCTODO: serp</div></div><div class=CToolTip id="tt56"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int net_errno()</td></tr></table></blockquote>DOCTODO: serp</div></div><div class=CToolTip id="tt57"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int net_would_block()</td></tr></table></blockquote>DOCTODO: serp</div></div><!--END_ND_TOOLTIPS-->
|
|
|
|
|
|
|
|
|
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
|
|
|
|
|
<script language=JavaScript><!--
|
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |