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

132
config.c
View File

@@ -5,21 +5,21 @@
#include<errno.h>
/**
* @brief 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
*
* @brief Input:
* @param char **str: the string to check
* @param char delimiterLeft: the left delimiter to check for
* @param char delimiterRight: the right delimiter to check for
*
* @brief Output:
* @param char **sectionName: if found the section Name of the section
*
* @brief Return:
* @param int status_code: one of the following values:
*
@brief 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
@brief Input:
@param char **str: the string to check
@param char delimiterLeft: the left delimiter to check for
@param char delimiterRight: the right delimiter to check for
@brief Output:
@param char **sectionName: if found the section Name of the section
@brief Return:
@param int status_code: one of the following values:
*/
int checkSection(char *str,char delimiterLeft,char delimiterRight,char **sectionName)
{
@@ -84,16 +84,16 @@ int checkSection(char *str,char delimiterLeft,char delimiterRight,char **section
}
/**
* Here we get / cut from fromPos to toPos and write it to an address
*
* 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
@brief Here we get / cut from fromPos to toPos and write it to an address
@brief Input:
@param char *str: the string to cut
@param int fromPos: from which position we want to copy, the pos is included and zero indexed
@param int toPos: to which position we want to copy, the pos is included and zero indexed
@brief Output:
@param char **name: here we will write the section name to
@brief Input:
@param int sizeName: the size of the user allocated buffer at **name
*/
int getStrAtPos(char *str,int fromPos,int toPos,char **name,int sizeName)
{
@@ -120,33 +120,33 @@ int getStrAtPos(char *str,int fromPos,int toPos,char **name,int sizeName)
}
/**
*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 '('
*
* 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
*
* Return:
* will return NO_ERROR (0) if successfull.
* If not it will return the error of the subroutine
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: \n
ex1: \n
NAME=VALUE \n
____^_____^ \n
____|_____Here we have no delimiter this means rightDelimiterPos must be NULL \n
____This is the left delimiter \n
ex2: \n
name(value) \n
____^_____^ \n
____|_____This is the rightDelimiterPos and must be ')' \n
____This is leftDelimiterPos which must be '(' \n
@brief Input:
@param char *str: the line in the form of a string where a key value pair is stored
@param char leftDelimiterPos: the left delimiter for example '='
@param 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
@brief Output:
@param char **name: The address where we store the name of the Key
@param char **value: The address where we store the key value
@param int sizeName: for size checking against memory allocated at **name
@param int sizeValue: for size checking against memory allocated at **value
@brief Return:
@return will return NO_ERROR (0) if successfull.
If not it will return the error of the subroutine
*/
int getNameValuePair(char *str,char leftDelimiterPos,char rightDelimiterPos,char **name,char **value,int sizeName,int sizeValue)
{
@@ -197,20 +197,20 @@ int getNameValuePair(char *str,char leftDelimiterPos,char rightDelimiterPos,char
}
/**
* Given a null terminated buffer of content(ex. from a file) an parse it with a default syntax of:
* Sections -> [SECTIONNAME]
* name / value -> name=value
*
* Input:
* char *originalBuffer: the buffer which holds the string for parsing.
* struct configEntry **entry: a user allocated buffer to which we write the parsed config data.
* int configSizeCount: the user allocated size of **entry.
* Output:
* int *returnedCount: to this variable the function writes the count of struct, which will be required to store all alavaible data.
*
* Note:
* The funtion returns the maximum allowed data structures, determined by configSizeCount. All data which exceeds will be dropped.
* To get the whole data we run the funtion a second time with the realloced configSizeCount in the size of [returnedCount] structures.
Given a null terminated buffer of content(ex. from a file) an parse it with a default syntax of:
Sections -> [SECTIONNAME]
name / value -> name=value
Input:
char *originalBuffer: the buffer which holds the string for parsing.
struct configEntry **entry: a user allocated buffer to which we write the parsed config data.
int configSizeCount: the user allocated size of **entry.
Output:
int *returnedCount: to this variable the function writes the count of struct, which will be required to store all alavaible data.
Note:
The funtion returns the maximum allowed data structures, determined by configSizeCount. All data which exceeds will be dropped.
To get the whole data we run the funtion a second time with the realloced configSizeCount in the size of [returnedCount] structures.
*/
int parseConfig(char *originalBuffer,struct configEntry **entry,int configSizeCount,int *returnedCount)
{

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>

View File

@@ -351,9 +351,9 @@ $(function(){initNavTree('config_8c_source.html',''); initResizable(true); });
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span>}</div>
</div>
<div class="ttc" id="aconfig_8c_html_a15a5f64f830221feac0af723899208b2"><div class="ttname"><a href="config_8c.html#a15a5f64f830221feac0af723899208b2">parseConfig</a></div><div class="ttdeci">int parseConfig(char *originalBuffer, struct configEntry **entry, int configSizeCount, int *returnedCount)</div><div class="ttdef"><b>Definition</b> <a href="#l00215">config.c:215</a></div></div>
<div class="ttc" id="aconfig_8c_html_a699e504c1ab9ceffb828dbf365a5e374"><div class="ttname"><a href="config_8c.html#a699e504c1ab9ceffb828dbf365a5e374">getStrAtPos</a></div><div class="ttdeci">int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)</div><div class="ttdef"><b>Definition</b> <a href="#l00098">config.c:98</a></div></div>
<div class="ttc" id="aconfig_8c_html_a699e504c1ab9ceffb828dbf365a5e374"><div class="ttname"><a href="config_8c.html#a699e504c1ab9ceffb828dbf365a5e374">getStrAtPos</a></div><div class="ttdeci">int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)</div><div class="ttdoc">Here we get / cut from fromPos to toPos and write it to an address.</div><div class="ttdef"><b>Definition</b> <a href="#l00098">config.c:98</a></div></div>
<div class="ttc" id="aconfig_8c_html_aae86bc3f3ebba4d6aba3ca1392c0126a"><div class="ttname"><a href="config_8c.html#aae86bc3f3ebba4d6aba3ca1392c0126a">checkSection</a></div><div class="ttdeci">int checkSection(char *str, char delimiterLeft, char delimiterRight, char **sectionName)</div><div class="ttdoc">Here we check if the given string contains a section for example [SECTIONName] here delimiterLeft is ...</div><div class="ttdef"><b>Definition</b> <a href="#l00024">config.c:24</a></div></div>
<div class="ttc" id="aconfig_8c_html_ab0b547ee554d9b305adc1b2ad85080a3"><div class="ttname"><a href="config_8c.html#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a></div><div class="ttdeci">int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)</div><div class="ttdef"><b>Definition</b> <a href="#l00151">config.c:151</a></div></div>
<div class="ttc" id="aconfig_8c_html_ab0b547ee554d9b305adc1b2ad85080a3"><div class="ttname"><a href="config_8c.html#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a></div><div class="ttdeci">int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)</div><div class="ttdoc">Input:</div><div class="ttdef"><b>Definition</b> <a href="#l00151">config.c:151</a></div></div>
<div class="ttc" id="aconfig_8h_html"><div class="ttname"><a href="config_8h.html">config.h</a></div></div>
<div class="ttc" id="aconfig_8h_html_a0000658c96c7c74c0904aafe03429a7d"><div class="ttname"><a href="config_8h.html#a0000658c96c7c74c0904aafe03429a7d">ERROR_DELIMITER_NOT_FOUND</a></div><div class="ttdeci">#define ERROR_DELIMITER_NOT_FOUND</div><div class="ttdef"><b>Definition</b> <a href="config_8h_source.html#l00007">config.h:7</a></div></div>
<div class="ttc" id="aconfig_8h_html_a02f5a0519bc0372946e64d593c0c58ce"><div class="ttname"><a href="config_8h.html#a02f5a0519bc0372946e64d593c0c58ce">FOUND_SECTION</a></div><div class="ttdeci">#define FOUND_SECTION</div><div class="ttdef"><b>Definition</b> <a href="config_8h_source.html#l00002">config.h:2</a></div></div>

View File

@@ -163,8 +163,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:aa8a964c95239ab762c37713f5f53a583" id="r_aa8a964c95239ab762c37713f5f53a583"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa8a964c95239ab762c37713f5f53a583">parseConfig</a> (char *buffer, struct <a class="el" href="structconfigEntry.html">configEntry</a> **entry, int configSize, int *returnedCount)</td></tr>
<tr class="separator:aa8a964c95239ab762c37713f5f53a583"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -541,9 +543,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>
@@ -582,8 +612,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>

View File

@@ -152,10 +152,10 @@ $(function(){initNavTree('config_8h_source.html',''); initResizable(true); });
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keywordtype">int</span> <a class="code hl_function" href="config_8h.html#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a>(<span class="keywordtype">char</span> *str,<span class="keywordtype">char</span> leftDelimiterPos,<span class="keywordtype">char</span> rightDelimiterPos,<span class="keywordtype">char</span> **name,<span class="keywordtype">char</span> **value,<span class="keywordtype">int</span> sizeName,<span class="keywordtype">int</span> sizeValue);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="keywordtype">int</span> <a class="code hl_function" href="config_8h.html#aa8a964c95239ab762c37713f5f53a583">parseConfig</a>(<span class="keywordtype">char</span> *buffer,<span class="keyword">struct</span> <a class="code hl_struct" href="structconfigEntry.html">configEntry</a> **entry,<span class="keywordtype">int</span> configSize,<span class="keywordtype">int</span> *returnedCount);</div>
<div class="ttc" id="aconfig_8h_html_a699e504c1ab9ceffb828dbf365a5e374"><div class="ttname"><a href="config_8h.html#a699e504c1ab9ceffb828dbf365a5e374">getStrAtPos</a></div><div class="ttdeci">int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00098">config.c:98</a></div></div>
<div class="ttc" id="aconfig_8h_html_a699e504c1ab9ceffb828dbf365a5e374"><div class="ttname"><a href="config_8h.html#a699e504c1ab9ceffb828dbf365a5e374">getStrAtPos</a></div><div class="ttdeci">int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)</div><div class="ttdoc">Here we get / cut from fromPos to toPos and write it to an address.</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00098">config.c:98</a></div></div>
<div class="ttc" id="aconfig_8h_html_aa8a964c95239ab762c37713f5f53a583"><div class="ttname"><a href="config_8h.html#aa8a964c95239ab762c37713f5f53a583">parseConfig</a></div><div class="ttdeci">int parseConfig(char *buffer, struct configEntry **entry, int configSize, int *returnedCount)</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00215">config.c:215</a></div></div>
<div class="ttc" id="aconfig_8h_html_aae86bc3f3ebba4d6aba3ca1392c0126a"><div class="ttname"><a href="config_8h.html#aae86bc3f3ebba4d6aba3ca1392c0126a">checkSection</a></div><div class="ttdeci">int checkSection(char *str, char delimiterLeft, char delimiterRight, char **sectionName)</div><div class="ttdoc">Here we check if the given string contains a section for example [SECTIONName] here delimiterLeft is ...</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00024">config.c:24</a></div></div>
<div class="ttc" id="aconfig_8h_html_ab0b547ee554d9b305adc1b2ad85080a3"><div class="ttname"><a href="config_8h.html#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a></div><div class="ttdeci">int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00151">config.c:151</a></div></div>
<div class="ttc" id="aconfig_8h_html_ab0b547ee554d9b305adc1b2ad85080a3"><div class="ttname"><a href="config_8h.html#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a></div><div class="ttdeci">int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)</div><div class="ttdoc">Input:</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00151">config.c:151</a></div></div>
<div class="ttc" id="aconfig_8h_html_acbd35a1e4b5f0eea312f8cb64f898d4b"><div class="ttname"><a href="config_8h.html#acbd35a1e4b5f0eea312f8cb64f898d4b">loadConfig</a></div><div class="ttdeci">int loadConfig(char *file, char **str_entry, char **host, int *intervall, int size)</div></div>
<div class="ttc" id="astructconfigEntry_html"><div class="ttname"><a href="structconfigEntry.html">configEntry</a></div><div class="ttdef"><b>Definition</b> <a href="#l00030">config.h:31</a></div></div>
<div class="ttc" id="astructconfigEntry_html_a221f7ca4b687e6cfce063e332330d635"><div class="ttname"><a href="structconfigEntry.html#a221f7ca4b687e6cfce063e332330d635">configEntry::keyValue</a></div><div class="ttdeci">char * keyValue</div><div class="ttdef"><b>Definition</b> <a href="#l00034">config.h:34</a></div></div>

View File

@@ -248,9 +248,9 @@ $(function(){initNavTree('test_8c_source.html',''); initResizable(true); });
</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="ttc" id="aconfig_8c_html_a15a5f64f830221feac0af723899208b2"><div class="ttname"><a href="config_8c.html#a15a5f64f830221feac0af723899208b2">parseConfig</a></div><div class="ttdeci">int parseConfig(char *originalBuffer, struct configEntry **entry, int configSizeCount, int *returnedCount)</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00215">config.c:215</a></div></div>
<div class="ttc" id="aconfig_8c_html_a699e504c1ab9ceffb828dbf365a5e374"><div class="ttname"><a href="config_8c.html#a699e504c1ab9ceffb828dbf365a5e374">getStrAtPos</a></div><div class="ttdeci">int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00098">config.c:98</a></div></div>
<div class="ttc" id="aconfig_8c_html_a699e504c1ab9ceffb828dbf365a5e374"><div class="ttname"><a href="config_8c.html#a699e504c1ab9ceffb828dbf365a5e374">getStrAtPos</a></div><div class="ttdeci">int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)</div><div class="ttdoc">Here we get / cut from fromPos to toPos and write it to an address.</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00098">config.c:98</a></div></div>
<div class="ttc" id="aconfig_8c_html_aae86bc3f3ebba4d6aba3ca1392c0126a"><div class="ttname"><a href="config_8c.html#aae86bc3f3ebba4d6aba3ca1392c0126a">checkSection</a></div><div class="ttdeci">int checkSection(char *str, char delimiterLeft, char delimiterRight, char **sectionName)</div><div class="ttdoc">Here we check if the given string contains a section for example [SECTIONName] here delimiterLeft is ...</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00024">config.c:24</a></div></div>
<div class="ttc" id="aconfig_8c_html_ab0b547ee554d9b305adc1b2ad85080a3"><div class="ttname"><a href="config_8c.html#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a></div><div class="ttdeci">int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00151">config.c:151</a></div></div>
<div class="ttc" id="aconfig_8c_html_ab0b547ee554d9b305adc1b2ad85080a3"><div class="ttname"><a href="config_8c.html#ab0b547ee554d9b305adc1b2ad85080a3">getNameValuePair</a></div><div class="ttdeci">int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)</div><div class="ttdoc">Input:</div><div class="ttdef"><b>Definition</b> <a href="config_8c_source.html#l00151">config.c:151</a></div></div>
<div class="ttc" id="aconfig_8h_html"><div class="ttname"><a href="config_8h.html">config.h</a></div></div>
<div class="ttc" id="aconfig_8h_html_a02f5a0519bc0372946e64d593c0c58ce"><div class="ttname"><a href="config_8h.html#a02f5a0519bc0372946e64d593c0c58ce">FOUND_SECTION</a></div><div class="ttdeci">#define FOUND_SECTION</div><div class="ttdef"><b>Definition</b> <a href="config_8h_source.html#l00002">config.h:2</a></div></div>
<div class="ttc" id="aconfig_8h_html_a258bb72419ef143530a2f8f55e7d57af"><div class="ttname"><a href="config_8h.html#a258bb72419ef143530a2f8f55e7d57af">NO_ERROR</a></div><div class="ttdeci">#define NO_ERROR</div><div class="ttdef"><b>Definition</b> <a href="config_8h_source.html#l00005">config.h:5</a></div></div>

View File

@@ -11,9 +11,9 @@
int \mbox{\hyperlink{config_8c_aae86bc3f3ebba4d6aba3ca1392c0126a}{check\+Section}} (char \texorpdfstring{$\ast$}{*}str, char delimiter\+Left, char delimiter\+Right, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}section\+Name)
\begin{DoxyCompactList}\small\item\em Here we check if the given string contains a section for example \mbox{[}SECTIONName\mbox{]} here delimiter\+Left is \mbox{[} and delimiter\+Right is \mbox{]} if a section is found, the section name will be written to section\+Name. \end{DoxyCompactList}\item
int \mbox{\hyperlink{config_8c_a699e504c1ab9ceffb828dbf365a5e374}{get\+Str\+At\+Pos}} (char \texorpdfstring{$\ast$}{*}str, int from\+Pos, int to\+Pos, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name, int size\+Name)
\item
\begin{DoxyCompactList}\small\item\em Here we get / cut from from\+Pos to to\+Pos and write it to an address. \end{DoxyCompactList}\item
int \mbox{\hyperlink{config_8c_ab0b547ee554d9b305adc1b2ad85080a3}{get\+Name\+Value\+Pair}} (char \texorpdfstring{$\ast$}{*}str, char left\+Delimiter\+Pos, char right\+Delimiter\+Pos, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value, int size\+Name, int size\+Value)
\item
\begin{DoxyCompactList}\small\item\em Input\+: \end{DoxyCompactList}\item
int \mbox{\hyperlink{config_8c_a15a5f64f830221feac0af723899208b2}{parse\+Config}} (char \texorpdfstring{$\ast$}{*}original\+Buffer, struct \mbox{\hyperlink{structconfigEntry}{config\+Entry}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}entry, int config\+Size\+Count, int \texorpdfstring{$\ast$}{*}returned\+Count)
\end{DoxyCompactItemize}
@@ -58,11 +58,45 @@ Definition at line \mbox{\hyperlink{config_8c_source_l00024}{24}} of file \mbox{
{\footnotesize\ttfamily \label{config_8c_ab0b547ee554d9b305adc1b2ad85080a3}
int get\+Name\+Value\+Pair (\begin{DoxyParamCaption}\item[{char \texorpdfstring{$\ast$}{*}}]{str}{, }\item[{char}]{left\+Delimiter\+Pos}{, }\item[{char}]{right\+Delimiter\+Pos}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{name}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{value}{, }\item[{int}]{size\+Name}{, }\item[{int}]{size\+Value}{}\end{DoxyParamCaption})}
Here we get a "{}pair"{} of data, parsed from \texorpdfstring{$\ast$}{*}str, witch consists of a keyname and a keyvalue. These are written to the pointers at char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name and char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value. These pair can be in the form of\+: ex1\+: NAME=VALUE \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$\vert$}{|} Here we have no delimiter this means right\+Delimiter\+Pos must be NULL This is the left delimiter ex2\+: name(value) \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$\vert$}{|} This is the right\+Delimiter\+Pos and must be \textquotesingle{})\textquotesingle{} This is left\+Delimiter\+Pos which must be \textquotesingle{}(\textquotesingle{}
Input\+: char \texorpdfstring{$\ast$}{*}str\+: the line in the form of a string where a key value pair is stored char left\+Delimiter\+Pos\+: the left delimiter for example \textquotesingle{}=\textquotesingle{} char right\+Delimiter\+Pos\+: 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 left\+Delimiter\+Pos Output\+: char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: The address where we store the name of the Key char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value\+: The address where we store the key value int size\+Name\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name int size\+Value\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value
Return\+: will return NO\+\_\+\+ERROR (0) if successfull. If not it will return the error of the subroutine
Input\+:
Here we get a "{}pair"{} of data, parsed from \texorpdfstring{$\ast$}{*}str, witch consists of a keyname and a keyvalue. These are written to the pointers at char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name and char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value. These pair can be in the form of\+: ~\newline
ex1\+: ~\newline
NAME=VALUE ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^} ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$\vert$}{|}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\+Here we have no delimiter this means right\+Delimiter\+Pos must be NULL ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\+This is the left delimiter ~\newline
ex2\+: ~\newline
name(value) ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^} ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$\vert$}{|}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\+This is the right\+Delimiter\+Pos and must be \textquotesingle{})\textquotesingle{} ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\+This is left\+Delimiter\+Pos which must be \textquotesingle{}(\textquotesingle{} ~\newline
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}str\+: the line in the form of a string where a key value pair is stored \\
\hline
{\em char} & left\+Delimiter\+Pos\+: the left delimiter for example \textquotesingle{}=\textquotesingle{} \\
\hline
{\em char} & right\+Delimiter\+Pos\+: 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 left\+Delimiter\+Pos\\
\hline
\end{DoxyParams}
Output\+:
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: The address where we store the name of the Key \\
\hline
{\em char} & \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value\+: The address where we store the key value \\
\hline
{\em int} & size\+Name\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name \\
\hline
{\em int} & size\+Value\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value\\
\hline
\end{DoxyParams}
Return\+: \begin{DoxyReturn}{Returns}
will return NO\+\_\+\+ERROR (0) if successfull. If not it will return the error of the subroutine
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{config_8c_source_l00151}{151}} of file \mbox{\hyperlink{config_8c_source}{config.\+c}}.
@@ -72,9 +106,30 @@ Definition at line \mbox{\hyperlink{config_8c_source_l00151}{151}} of file \mbox
{\footnotesize\ttfamily \label{config_8c_a699e504c1ab9ceffb828dbf365a5e374}
int get\+Str\+At\+Pos (\begin{DoxyParamCaption}\item[{char \texorpdfstring{$\ast$}{*}}]{str}{, }\item[{int}]{from\+Pos}{, }\item[{int}]{to\+Pos}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{name}{, }\item[{int}]{size\+Name}{}\end{DoxyParamCaption})}
Here we get / cut from from\+Pos to to\+Pos and write it to an address
Input\+: char \texorpdfstring{$\ast$}{*}str\+: the string to cut int from\+Pos\+: from which position we want to copy, the pos is included and zero indexed int to\+Pos\+: to which position we want to copy, the pos is included and zero indexed Output\+: char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: here we will write the section name to Input\+: int size\+Name\+: the size of the user allocated buffer at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name
Here we get / cut from from\+Pos to to\+Pos and write it to an address.
Input\+:
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}str\+: the string to cut \\
\hline
{\em int} & from\+Pos\+: from which position we want to copy, the pos is included and zero indexed \\
\hline
{\em int} & to\+Pos\+: to which position we want to copy, the pos is included and zero indexed\\
\hline
\end{DoxyParams}
Output\+:
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: here we will write the section name to\\
\hline
\end{DoxyParams}
Input\+:
\begin{DoxyParams}{Parameters}
{\em int} & size\+Name\+: the size of the user allocated buffer at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name \\
\hline
\end{DoxyParams}
Definition at line \mbox{\hyperlink{config_8c_source_l00098}{98}} of file \mbox{\hyperlink{config_8c_source}{config.\+c}}.

View File

@@ -50,9 +50,9 @@ int \mbox{\hyperlink{config_8h_acbd35a1e4b5f0eea312f8cb64f898d4b}{load\+Config}}
int \mbox{\hyperlink{config_8h_aae86bc3f3ebba4d6aba3ca1392c0126a}{check\+Section}} (char \texorpdfstring{$\ast$}{*}str, char delimiter\+Left, char delimiter\+Right, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}section\+Name)
\begin{DoxyCompactList}\small\item\em Here we check if the given string contains a section for example \mbox{[}SECTIONName\mbox{]} here delimiter\+Left is \mbox{[} and delimiter\+Right is \mbox{]} if a section is found, the section name will be written to section\+Name. \end{DoxyCompactList}\item
int \mbox{\hyperlink{config_8h_a699e504c1ab9ceffb828dbf365a5e374}{get\+Str\+At\+Pos}} (char \texorpdfstring{$\ast$}{*}str, int from\+Pos, int to\+Pos, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name, int size\+Name)
\item
\begin{DoxyCompactList}\small\item\em Here we get / cut from from\+Pos to to\+Pos and write it to an address. \end{DoxyCompactList}\item
int \mbox{\hyperlink{config_8h_ab0b547ee554d9b305adc1b2ad85080a3}{get\+Name\+Value\+Pair}} (char \texorpdfstring{$\ast$}{*}str, char left\+Delimiter\+Pos, char right\+Delimiter\+Pos, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value, int size\+Name, int size\+Value)
\item
\begin{DoxyCompactList}\small\item\em Input\+: \end{DoxyCompactList}\item
int \mbox{\hyperlink{config_8h_aa8a964c95239ab762c37713f5f53a583}{parse\+Config}} (char \texorpdfstring{$\ast$}{*}buffer, struct \mbox{\hyperlink{structconfigEntry}{config\+Entry}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}entry, int config\+Size, int \texorpdfstring{$\ast$}{*}returned\+Count)
\end{DoxyCompactItemize}
@@ -270,11 +270,45 @@ Definition at line \mbox{\hyperlink{config_8c_source_l00024}{24}} of file \mbox{
{\footnotesize\ttfamily \label{config_8h_ab0b547ee554d9b305adc1b2ad85080a3}
int get\+Name\+Value\+Pair (\begin{DoxyParamCaption}\item[{char \texorpdfstring{$\ast$}{*}}]{str}{, }\item[{char}]{left\+Delimiter\+Pos}{, }\item[{char}]{right\+Delimiter\+Pos}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{name}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{value}{, }\item[{int}]{size\+Name}{, }\item[{int}]{size\+Value}{}\end{DoxyParamCaption})}
Here we get a "{}pair"{} of data, parsed from \texorpdfstring{$\ast$}{*}str, witch consists of a keyname and a keyvalue. These are written to the pointers at char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name and char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value. These pair can be in the form of\+: ex1\+: NAME=VALUE \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$\vert$}{|} Here we have no delimiter this means right\+Delimiter\+Pos must be NULL This is the left delimiter ex2\+: name(value) \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$^\wedge$}{\string^} \texorpdfstring{$\vert$}{|} This is the right\+Delimiter\+Pos and must be \textquotesingle{})\textquotesingle{} This is left\+Delimiter\+Pos which must be \textquotesingle{}(\textquotesingle{}
Input\+: char \texorpdfstring{$\ast$}{*}str\+: the line in the form of a string where a key value pair is stored char left\+Delimiter\+Pos\+: the left delimiter for example \textquotesingle{}=\textquotesingle{} char right\+Delimiter\+Pos\+: 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 left\+Delimiter\+Pos Output\+: char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: The address where we store the name of the Key char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value\+: The address where we store the key value int size\+Name\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name int size\+Value\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value
Return\+: will return NO\+\_\+\+ERROR (0) if successfull. If not it will return the error of the subroutine
Input\+:
Here we get a "{}pair"{} of data, parsed from \texorpdfstring{$\ast$}{*}str, witch consists of a keyname and a keyvalue. These are written to the pointers at char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name and char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value. These pair can be in the form of\+: ~\newline
ex1\+: ~\newline
NAME=VALUE ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^} ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$\vert$}{|}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\+Here we have no delimiter this means right\+Delimiter\+Pos must be NULL ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\+This is the left delimiter ~\newline
ex2\+: ~\newline
name(value) ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$^\wedge$}{\string^} ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\texorpdfstring{$\vert$}{|}\+\_\+\+\_\+\+\_\+\+\_\+\+\_\+\+This is the right\+Delimiter\+Pos and must be \textquotesingle{})\textquotesingle{} ~\newline
\+\_\+\+\_\+\+\_\+\+\_\+\+This is left\+Delimiter\+Pos which must be \textquotesingle{}(\textquotesingle{} ~\newline
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}str\+: the line in the form of a string where a key value pair is stored \\
\hline
{\em char} & left\+Delimiter\+Pos\+: the left delimiter for example \textquotesingle{}=\textquotesingle{} \\
\hline
{\em char} & right\+Delimiter\+Pos\+: 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 left\+Delimiter\+Pos\\
\hline
\end{DoxyParams}
Output\+:
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: The address where we store the name of the Key \\
\hline
{\em char} & \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value\+: The address where we store the key value \\
\hline
{\em int} & size\+Name\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name \\
\hline
{\em int} & size\+Value\+: for size checking against memory allocated at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}value\\
\hline
\end{DoxyParams}
Return\+: \begin{DoxyReturn}{Returns}
will return NO\+\_\+\+ERROR (0) if successfull. If not it will return the error of the subroutine
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{config_8c_source_l00151}{151}} of file \mbox{\hyperlink{config_8c_source}{config.\+c}}.
@@ -284,9 +318,30 @@ Definition at line \mbox{\hyperlink{config_8c_source_l00151}{151}} of file \mbox
{\footnotesize\ttfamily \label{config_8h_a699e504c1ab9ceffb828dbf365a5e374}
int get\+Str\+At\+Pos (\begin{DoxyParamCaption}\item[{char \texorpdfstring{$\ast$}{*}}]{str}{, }\item[{int}]{from\+Pos}{, }\item[{int}]{to\+Pos}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{name}{, }\item[{int}]{size\+Name}{}\end{DoxyParamCaption})}
Here we get / cut from from\+Pos to to\+Pos and write it to an address
Input\+: char \texorpdfstring{$\ast$}{*}str\+: the string to cut int from\+Pos\+: from which position we want to copy, the pos is included and zero indexed int to\+Pos\+: to which position we want to copy, the pos is included and zero indexed Output\+: char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: here we will write the section name to Input\+: int size\+Name\+: the size of the user allocated buffer at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name
Here we get / cut from from\+Pos to to\+Pos and write it to an address.
Input\+:
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}str\+: the string to cut \\
\hline
{\em int} & from\+Pos\+: from which position we want to copy, the pos is included and zero indexed \\
\hline
{\em int} & to\+Pos\+: to which position we want to copy, the pos is included and zero indexed\\
\hline
\end{DoxyParams}
Output\+:
\begin{DoxyParams}{Parameters}
{\em char} & \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name\+: here we will write the section name to\\
\hline
\end{DoxyParams}
Input\+:
\begin{DoxyParams}{Parameters}
{\em int} & size\+Name\+: the size of the user allocated buffer at \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}name \\
\hline
\end{DoxyParams}
Definition at line \mbox{\hyperlink{config_8c_source_l00098}{98}} of file \mbox{\hyperlink{config_8c_source}{config.\+c}}.

Binary file not shown.