/* This program is free software; you can redistribute it and/or modify it
under the terms of the license (GNU LGPL) which comes with this package. */
-#include "gras_private.h"
+#include "xbt/sysdep.h"
+#include "xbt/log.h"
+#include "xbt/error.h"
+#include "xbt/dynar.h"
+#include "xbt/config.h"
-GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(module,GRAS);
+#include "gras/process.h" /* FIXME: bad loop */
+
+#include "xbt/module.h" /* this module */
+
+#include "xbt_modinter.h" /* prototype of other module's init/exit in XBT */
+#include "gras_modinter.h" /* same in GRAS */
+
+GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(module,xbt, "module handling");
-extern void gras_log_exit(void);
static int gras_running_process = 0;
struct gras_module_ {
found = 1;
opt=strchr(argv[i],'=');
opt++;
- TRYFAIL(gras_log_control_set(opt));
+ gras_log_control_set(opt);
DEBUG1("Did apply '%s' as log setting",opt);
/*remove this from argv*/
for (j=i+1; j<*argc; j++) {
argv[j-1] = NULL;
(*argc)--;
i--; /* compensate effect of next loop incrementation */
- WARN1("argc %d",*argc);
}
}
if (!found && defaultlog) {
- TRYFAIL(gras_log_control_set(defaultlog));
+ gras_log_control_set(defaultlog);
}
gras_process_init(); /* calls procdata_init, which calls dynar_new */