[vlc-devel] commit: Document config_LoadCmdLine() more ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Feb 25 22:37:08 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 25 23:36:52 2010 +0200| [4cd022e633fb75f08bdf918726e75a19ee31f2c2] | committer: Rémi Denis-Courmont
Document config_LoadCmdLine() more
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4cd022e633fb75f08bdf918726e75a19ee31f2c2
---
src/config/cmdline.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/config/cmdline.c b/src/config/cmdline.c
index 98da1ad..3878564 100644
--- a/src/config/cmdline.c
+++ b/src/config/cmdline.c
@@ -44,15 +44,24 @@
#include <assert.h>
#undef config_LoadCmdLine
-/*****************************************************************************
- * config_LoadCmdLine: parse command line
- *****************************************************************************
+/**
* Parse command line for configuration options.
+ *
* Now that the module_bank has been initialized, we can dynamically
* generate the longopts structure used by getops. We have to do it this way
* because we don't know (and don't want to know) in advance the configuration
* options used (ie. exported) by each module.
- *****************************************************************************/
+ *
+ * @param p_this object to write command line options as variables to
+ * @param pi_argc number of command line arguments [IN/OUT]
+ * @param ppsz_args commandl ine arguments [IN/OUT]
+ * @param b_ignore_errors whether to ignore parsing errors
+ * @return 0 on success, -1 on error.
+ *
+ * @warning This function is not re-entrant (because of getopt_long()).
+ * It must be called with the module bank initialization global lock held.
+ * FIXME: this still breaks if getopt() is used outside of LibVLC.
+ */
int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
const char *ppsz_argv[], bool b_ignore_errors )
{
More information about the vlc-devel
mailing list