#include <glib/glist.h>
#include <glib/gutils.h> /* for g_atexit() */
#include "giochannel-blind.h"
+#include <glib-object.h>
/* Are we initialized? */
g_return_val_if_fail(active==FALSE,FALSE);
+ /* Initialize GObject subsystem of GLib. */
+ g_type_init();
+
/* (optionally) parse the given 'captive_args' string */
if (captive_args) {
int captive_args_argc;
g_assert_not_reached(); /* some non-callbacked argument reached */
goto args_err_context;
}
- /* FIXME: reject non-"--"-prefixed arguments; how to detected them? */
+ if (poptPeekArg(context)) {
+ g_assert_not_reached(); /* some non-"--"-prefixed argument reached */
+ goto args_err_context;
+ }
r=TRUE; /* success */
args_err_context:
poptFreeContext(context);