Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
/me is stupid. Making a directory called core breaks the make clean because it tries...
[simgrid.git] / src / xbt / module.c
1 /* $Id$ */
2
3 /* module handling                                                          */
4
5 /* Authors: Martin Quinson                                                  */
6 /* Copyright (C) 2003 the OURAGAN project.                                  */
7
8 /* This program is free software; you can redistribute it and/or modify it
9    under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #include "gras_private.h"
12
13 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(module,GRAS);
14
15 extern void gras_log_finalize(void);
16
17 struct gras_module_ {
18   gras_dynar_t *deps;
19   gras_cfg_t *cfg;
20   int ref;
21   gras_module_new_fct_t new;
22   gras_module_finalize_fct_t finalize;
23 };
24
25
26 /**
27  * gras_init:
28  * @argc:
29  * @argv:
30  *
31  * Initialize the gras mecanisms.
32  */
33 void
34 gras_init(int argc,char **argv) {
35   int i;
36   char *opt;
37   gras_error_t errcode;
38
39   INFO0("Initialize GRAS");
40   for (i=1; i<argc; i++) {
41     if (!strncmp(argv[i],"--gras-log=",strlen("--gras-log="))) {
42       opt=strchr(argv[i],'=');
43       opt++;
44       TRYFAIL(gras_log_control_set(opt));
45     }
46   }
47 }
48
49 /**
50  * gras_finalize:
51  * @argc:
52  * @argv:
53  *
54  * Finalize the gras mecanisms.
55  */
56 void 
57 gras_finalize(){
58   gras_log_finalize();
59 }