X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fmodule.h;h=e863aa83b59057dd057cd9ac0712d35777c6a833;hb=b9ce0bad7daf7c0a2333c91fdb1e35d602afe17f;hp=679314056e4c5a78b760cb77ec3f1f9c65f2a00b;hpb=f61f4dca50e13aa52b1ca3941c8f420848f4353f;p=lttv.git diff --git a/lttv/lttv/module.h b/lttv/lttv/module.h index 67931405..e863aa83 100644 --- a/lttv/lttv/module.h +++ b/lttv/lttv/module.h @@ -12,8 +12,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. */ #ifndef MODULES_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);