X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=lttv%2Flttv%2Fmodule.h;h=ff992aec10136ae128f11ff1748666effb83d636;hb=90e19f82bca635a1ba52b8a50b64e484bd19c14f;hp=679314056e4c5a78b760cb77ec3f1f9c65f2a00b;hpb=6d3ad1b2722e69f425f4d822f893c599c112cbc2;p=lttv.git diff --git a/lttv/lttv/module.h b/lttv/lttv/module.h index 67931405..ff992aec 100644 --- a/lttv/lttv/module.h +++ b/lttv/lttv/module.h @@ -47,30 +47,30 @@ typedef void (*LttvModuleDestroy)(); typedef struct _LttvModuleInfo { - char *name; - char *short_description; - char *description; - LttvModuleInit init; - LttvModuleDestroy destroy; - LttvLibrary *library; - unsigned require_count; - unsigned use_count; - unsigned prerequisites_number; + char *name; + char *short_description; + char *description; + LttvModuleInit init; + LttvModuleDestroy destroy; + LttvLibrary *library; + unsigned require_count; + unsigned use_count; + unsigned prerequisites_number; } LttvModuleInfo; typedef struct _LttvLibraryInfo { - char *name; - char *path; - unsigned load_count; + char *name; + char *path; + unsigned load_count; } LttvLibraryInfo; typedef enum _LttvModuleError { - LTTV_MODULE_NOT_FOUND, - LTTV_MODULE_NO_INIT + LTTV_MODULE_NOT_FOUND, + LTTV_MODULE_NO_INIT } LttvModuleError; @@ -162,21 +162,21 @@ char *lttv_library_path_get(unsigned i); */ #define LTTV_MODULE(name, short_desc, desc, init, destroy, ...) \ - \ - static void _LTTV_MODULE_REGISTER(__LINE__)() \ - __attribute__((constructor)); \ - \ - static void _LTTV_MODULE_REGISTER(__LINE__)() \ - { \ - static char *module_prerequisites[] = { __VA_ARGS__ }; \ - \ - static struct _LttvModuleDescription module = { \ - name, short_desc, desc, init, destroy, \ - sizeof(module_prerequisites) / sizeof(char *), \ - module_prerequisites, NULL}; \ - \ - lttv_module_register(&module); \ - } + \ + static void _LTTV_MODULE_REGISTER(__LINE__)() \ + __attribute__((constructor)); \ + \ + static void _LTTV_MODULE_REGISTER(__LINE__)() \ + { \ + static char *module_prerequisites[] = { __VA_ARGS__ }; \ + \ + static struct _LttvModuleDescription module = { \ + name, short_desc, desc, init, destroy, \ + sizeof(module_prerequisites) / sizeof(char *), \ + module_prerequisites, NULL}; \ + \ + lttv_module_register(&module); \ + } /* Internal structure and function used to register modules, called by @@ -187,14 +187,14 @@ char *lttv_library_path_get(unsigned i); struct _LttvModuleDescription { - char *name; - char *short_description; - char *description; - LttvModuleInit init; - LttvModuleDestroy destroy; - unsigned prerequisites_number; - char **prerequisites; - struct _LttvModuleDescription *next; + char *name; + char *short_description; + char *description; + LttvModuleInit init; + LttvModuleDestroy destroy; + unsigned prerequisites_number; + char **prerequisites; + struct _LttvModuleDescription *next; }; void lttv_module_register(struct _LttvModuleDescription *d);