/*
- * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file audioc.c the client program used to connect to para_audiod */
+#include <regex.h>
#include <sys/types.h>
#include <dirent.h>
INIT_AUDIOC_ERRLISTS;
-/** the gengetopt structure containing command line args */
-struct audioc_args_info conf;
+/** The gengetopt structure containing command line args. */
+static struct audioc_args_info conf;
-INIT_STDERR_LOGGING(conf.loglevel_arg);
+static int loglevel;
+INIT_STDERR_LOGGING(loglevel);
static char *concat_args(unsigned argc, char * const *argv)
{
exit(EXIT_FAILURE);
}
}
+ loglevel = get_loglevel_by_name(conf.loglevel_arg);
args = conf.inputs_num?
concat_args(conf.inputs_num, conf.inputs) :
para_strdup("stat");
goto out;
}
loaded -= ret;
+ if (loaded && ret)
+ memmove(buf, buf + ret, loaded);
}
}
out: