diff --git a/config.c b/config.c index 2b94fb1..bceac2d 100644 --- a/config.c +++ b/config.c @@ -5,21 +5,21 @@ #include /** - * @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) { diff --git a/doc/html/config_8c.html b/doc/html/config_8c.html index 17cd345..7df0ac7 100644 --- a/doc/html/config_8c.html +++ b/doc/html/config_8c.html @@ -122,8 +122,10 @@ Functions  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.
  int getStrAtPos (char *str, int fromPos, int toPos, char **name, int sizeName) + Here we get / cut from fromPos to toPos and write it to an address.
  int getNameValuePair (char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue) + Input:
  int parseConfig (char *originalBuffer, struct configEntry **entry, int configSizeCount, int *returnedCount)   @@ -227,9 +229,37 @@ Functions
-

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

+ +

Input:

+

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 '('
+

Parameters
+ + + + +
char*str: the line in the form of a string where a key value pair is stored
charleftDelimiterPos: the left delimiter for example '='
charrightDelimiterPos: 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:

Parameters
+ + + + + +
char**name: The address where we store the name of the Key
char**value: The address where we store the key value
intsizeName: for size checking against memory allocated at **name
intsizeValue: for size checking against memory allocated at **value
+
+
+

Return:

Returns
will return NO_ERROR (0) if successfull. If not it will return the error of the subroutine

Definition at line 151 of file config.c.

@@ -268,8 +298,28 @@ Functions
-

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

+ +

Here we get / cut from fromPos to toPos and write it to an address.

+

Input:

Parameters
+ + + + +
char*str: the string to cut
intfromPos: from which position we want to copy, the pos is included and zero indexed
inttoPos: to which position we want to copy, the pos is included and zero indexed
+
+
+

Output:

Parameters
+ + +
char**name: here we will write the section name to
+
+
+

Input:

Parameters
+ + +
intsizeName: the size of the user allocated buffer at **name
+
+

Definition at line 98 of file config.c.

diff --git a/doc/html/config_8c_source.html b/doc/html/config_8c_source.html index 4b5eb0d..a532a4d 100644 --- a/doc/html/config_8c_source.html +++ b/doc/html/config_8c_source.html @@ -351,9 +351,9 @@ $(function(){initNavTree('config_8c_source.html',''); initResizable(true); });
310}
int parseConfig(char *originalBuffer, struct configEntry **entry, int configSizeCount, int *returnedCount)
Definition config.c:215
-
int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)
Definition config.c:98
+
int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)
Here we get / cut from fromPos to toPos and write it to an address.
Definition config.c:98
int checkSection(char *str, char delimiterLeft, char delimiterRight, char **sectionName)
Here we check if the given string contains a section for example [SECTIONName] here delimiterLeft is ...
Definition config.c:24
-
int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)
Definition config.c:151
+
int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)
Input:
Definition config.c:151
#define ERROR_DELIMITER_NOT_FOUND
Definition config.h:7
#define FOUND_SECTION
Definition config.h:2
diff --git a/doc/html/config_8h.html b/doc/html/config_8h.html index c048989..7ad9f02 100644 --- a/doc/html/config_8h.html +++ b/doc/html/config_8h.html @@ -163,8 +163,10 @@ Functions  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.
  int getStrAtPos (char *str, int fromPos, int toPos, char **name, int sizeName) + Here we get / cut from fromPos to toPos and write it to an address.
  int getNameValuePair (char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue) + Input:
  int parseConfig (char *buffer, struct configEntry **entry, int configSize, int *returnedCount)   @@ -541,9 +543,37 @@ Functions
-

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

+ +

Input:

+

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 '('
+

Parameters
+ + + + +
char*str: the line in the form of a string where a key value pair is stored
charleftDelimiterPos: the left delimiter for example '='
charrightDelimiterPos: 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:

Parameters
+ + + + + +
char**name: The address where we store the name of the Key
char**value: The address where we store the key value
intsizeName: for size checking against memory allocated at **name
intsizeValue: for size checking against memory allocated at **value
+
+
+

Return:

Returns
will return NO_ERROR (0) if successfull. If not it will return the error of the subroutine

Definition at line 151 of file config.c.

@@ -582,8 +612,28 @@ Functions
-

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

+ +

Here we get / cut from fromPos to toPos and write it to an address.

+

Input:

Parameters
+ + + + +
char*str: the string to cut
intfromPos: from which position we want to copy, the pos is included and zero indexed
inttoPos: to which position we want to copy, the pos is included and zero indexed
+
+
+

Output:

Parameters
+ + +
char**name: here we will write the section name to
+
+
+

Input:

Parameters
+ + +
intsizeName: the size of the user allocated buffer at **name
+
+

Definition at line 98 of file config.c.

diff --git a/doc/html/config_8h_source.html b/doc/html/config_8h_source.html index 914d6db..462a822 100644 --- a/doc/html/config_8h_source.html +++ b/doc/html/config_8h_source.html @@ -152,10 +152,10 @@ $(function(){initNavTree('config_8h_source.html',''); initResizable(true); });
42int getNameValuePair(char *str,char leftDelimiterPos,char rightDelimiterPos,char **name,char **value,int sizeName,int sizeValue);
43
44int parseConfig(char *buffer,struct configEntry **entry,int configSize,int *returnedCount);
-
int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)
Definition config.c:98
+
int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)
Here we get / cut from fromPos to toPos and write it to an address.
Definition config.c:98
int parseConfig(char *buffer, struct configEntry **entry, int configSize, int *returnedCount)
Definition config.c:215
int checkSection(char *str, char delimiterLeft, char delimiterRight, char **sectionName)
Here we check if the given string contains a section for example [SECTIONName] here delimiterLeft is ...
Definition config.c:24
-
int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)
Definition config.c:151
+
int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)
Input:
Definition config.c:151
int loadConfig(char *file, char **str_entry, char **host, int *intervall, int size)
char * keyValue
Definition config.h:34
diff --git a/doc/html/test_8c_source.html b/doc/html/test_8c_source.html index fdde644..edefee6 100644 --- a/doc/html/test_8c_source.html +++ b/doc/html/test_8c_source.html @@ -248,9 +248,9 @@ $(function(){initNavTree('test_8c_source.html',''); initResizable(true); });
139
int parseConfig(char *originalBuffer, struct configEntry **entry, int configSizeCount, int *returnedCount)
Definition config.c:215
-
int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)
Definition config.c:98
+
int getStrAtPos(char *str, int fromPos, int toPos, char **name, int sizeName)
Here we get / cut from fromPos to toPos and write it to an address.
Definition config.c:98
int checkSection(char *str, char delimiterLeft, char delimiterRight, char **sectionName)
Here we check if the given string contains a section for example [SECTIONName] here delimiterLeft is ...
Definition config.c:24
-
int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)
Definition config.c:151
+
int getNameValuePair(char *str, char leftDelimiterPos, char rightDelimiterPos, char **name, char **value, int sizeName, int sizeValue)
Input:
Definition config.c:151
#define FOUND_SECTION
Definition config.h:2
#define NO_ERROR
Definition config.h:5
diff --git a/doc/latex/config_8c.tex b/doc/latex/config_8c.tex index 8195743..fdca315 100644 --- a/doc/latex/config_8c.tex +++ b/doc/latex/config_8c.tex @@ -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}}. diff --git a/doc/latex/config_8h.tex b/doc/latex/config_8h.tex index 8ee6e79..754396e 100644 --- a/doc/latex/config_8h.tex +++ b/doc/latex/config_8h.tex @@ -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}}. diff --git a/doc/latex/refman.pdf b/doc/latex/refman.pdf index c612523..6cd434a 100644 Binary files a/doc/latex/refman.pdf and b/doc/latex/refman.pdf differ