Cleanup and documentation updates:

- Remove shared/str.h where not used.
- Remove shared/debug.h from all files as it has been completely replaced
  by shared/report.h (it will be removed later).
- Add more doxygen comments to shared/* and clients/lcdproc/*.
- Include static functions in doxygen output.
This commit is contained in:
mmdolze
2010-02-02 23:20:29 +00:00
parent e914ee3d72
commit 66023939a1
49 changed files with 929 additions and 590 deletions
+23 -4
View File
@@ -1,10 +1,29 @@
/** \file shared/str.c
* Commmand / argument parsing functions (for use in clients).
*/
/*-
* This file is part of LCDproc.
*
* This file is released under the GNU General Public License.
* Refer to the COPYING file distributed with this package.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "debug.h"
#include "report.h"
#include "str.h"
/** Split elements of a string into an array of strings.
* Elements are typically commands and arguments.
* \param **argv Pointer to the array which will store the arguments
* \param *str The string to be parsed
* \param max_args Number of arguments to parse (typically the size of argv)
* \retval <0 Error.
* \retval >=0 The number of arguments parsed.
*/
int
get_args (char **argv, char *str, int max_args)
{
@@ -19,11 +38,11 @@ get_args (char **argv, char *str, int max_args)
if (max_args < 1)
return 0;
//debug("get_args(%i): string=%s", max_args, str);
debug(RPT_DEBUG, "get_args(%i): string=%s", max_args, str);
// Parse the command line...
/* Parse the command line... */
for (item = strtok (str, delimiters); item; item = strtok (NULL, delimiters)) {
//debug("get_args: item=%s", item);
debug(RPT_DEBUG, "get_args: item=%s", item);
if (i < max_args) {
argv[i] = item;
i++;