update doc

This commit is contained in:
jonathan santis
2025-05-21 09:46:06 +02:00
parent 094a9801cf
commit a05c9ce786
9 changed files with 306 additions and 96 deletions

View File

@@ -122,8 +122,10 @@ Functions</h2></td></tr>
<tr class="memdesc:aae86bc3f3ebba4d6aba3ca1392c0126a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Here we check if the given string contains a section for example [SECTIONName] here delimiterLeft is [ and delimiterRight is ] if a section is found, the section name will be written to sectionName. <br /></td></tr>
<tr class="separator:aae86bc3f3ebba4d6aba3ca1392c0126a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a699e504c1ab9ceffb828dbf365a5e374" id="r_a699e504c1ab9ceffb828dbf365a5e374"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a699e504c1ab9ceffb828dbf365a5e374">getStrAtPos</a> (char *str, int fromPos, int toPos, char **name, int sizeName)</td></tr>
<tr class="memdesc:a699e504c1ab9ceffb828dbf365a5e374"><td class="mdescLeft">&#160;</td><td class="mdescRight">Here we get / cut from fromPos to toPos and write it to an address. <br /></td></tr>
<tr class="separator:a699e504c1ab9ceffb828dbf365a5e374"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0b547ee554d9b305adc1b2ad85080a3" id="r_ab0b547ee554d9b305adc1b2ad85080a3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a> (char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)</td></tr>
<tr class="memdesc:ab0b547ee554d9b305adc1b2ad85080a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Input: <br /></td></tr>
<tr class="separator:ab0b547ee554d9b305adc1b2ad85080a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15a5f64f830221feac0af723899208b2" id="r_a15a5f64f830221feac0af723899208b2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a15a5f64f830221feac0af723899208b2">parseConfig</a> (char *originalBuffer, struct <a class="el" href="structconfigEntry.html">configEntry</a> **entry, int configSizeCount, int *returnedCount)</td></tr>
<tr class="separator:a15a5f64f830221feac0af723899208b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -227,9 +229,37 @@ Functions</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Here we get a "pair" of data, parsed from *str, witch consists of a keyname and a keyvalue. These are written to the pointers at char **name and char **value. These pair can be in the form of: ex1: NAME=VALUE ^ ^ | Here we have no delimiter this means rightDelimiterPos must be NULL This is the left delimiter ex2: name(value) ^ ^ | This is the rightDelimiterPos and must be ')' This is leftDelimiterPos which must be '('</p>
<p>Input: char *str: the line in the form of a string where a key value pair is stored char leftDelimiterPos: the left delimiter for example '=' char rightDelimiterPos: the right delimiter can be NULL in most cases, if NULL we assume that there is only one delimiter, which is in this case the leftDelimiterPos Output: char **name: The address where we store the name of the Key char **value: The address where we store the key value int sizeName: for size checking against memory allocated at **name int sizeValue: for size checking against memory allocated at **value</p>
<p>Return: will return NO_ERROR (0) if successfull. If not it will return the error of the subroutine </p>
<p>Input: </p>
<p>Here we get a "pair" of data, parsed from *str, witch consists of a keyname and a keyvalue. These are written to the pointers at char **name and char **value. These pair can be in the form of: <br />
ex1: <br />
NAME=VALUE <br />
____^_____^ <br />
____|_____Here we have no delimiter this means rightDelimiterPos must be NULL <br />
____This is the left delimiter <br />
ex2: <br />
name(value) <br />
____^_____^ <br />
____|_____This is the rightDelimiterPos and must be ')' <br />
____This is leftDelimiterPos which must be '(' <br />
</p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">char</td><td>*str: the line in the form of a string where a key value pair is stored </td></tr>
<tr><td class="paramname">char</td><td>leftDelimiterPos: the left delimiter for example '=' </td></tr>
<tr><td class="paramname">char</td><td>rightDelimiterPos: the right delimiter can be NULL in most cases, if NULL we assume that there is only one delimiter, which is in this case the leftDelimiterPos</td></tr>
</table>
</dd>
</dl>
<p>Output: </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">char</td><td>**name: The address where we store the name of the Key </td></tr>
<tr><td class="paramname">char</td><td>**value: The address where we store the key value </td></tr>
<tr><td class="paramname">int</td><td>sizeName: for size checking against memory allocated at **name </td></tr>
<tr><td class="paramname">int</td><td>sizeValue: for size checking against memory allocated at **value</td></tr>
</table>
</dd>
</dl>
<p>Return: </p><dl class="section return"><dt>Returns</dt><dd>will return NO_ERROR (0) if successfull. If not it will return the error of the subroutine </dd></dl>
<p class="definition">Definition at line <a class="el" href="config_8c_source.html#l00151">151</a> of file <a class="el" href="config_8c_source.html">config.c</a>.</p>
@@ -268,8 +298,28 @@ Functions</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Here we get / cut from fromPos to toPos and write it to an address</p>
<p>Input: char *str: the string to cut int fromPos: from which position we want to copy, the pos is included and zero indexed int toPos: to which position we want to copy, the pos is included and zero indexed Output: char **name: here we will write the section name to Input: int sizeName: the size of the user allocated buffer at **name </p>
<p>Here we get / cut from fromPos to toPos and write it to an address. </p>
<p>Input: </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">char</td><td>*str: the string to cut </td></tr>
<tr><td class="paramname">int</td><td>fromPos: from which position we want to copy, the pos is included and zero indexed </td></tr>
<tr><td class="paramname">int</td><td>toPos: to which position we want to copy, the pos is included and zero indexed</td></tr>
</table>
</dd>
</dl>
<p>Output: </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">char</td><td>**name: here we will write the section name to</td></tr>
</table>
</dd>
</dl>
<p>Input: </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">int</td><td>sizeName: the size of the user allocated buffer at **name </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="config_8c_source.html#l00098">98</a> of file <a class="el" href="config_8c_source.html">config.c</a>.</p>