Back to index

courier  0.68.2
lcrwstaticlist.h
Go to the documentation of this file.
00001 /*
00002 ** Copyright 1998 - 1999 Double Precision, Inc.
00003 ** See COPYING for distribution information.
00004 */
00005 
00006 #ifndef       lcrwstaticlist_h
00007 #define       lcrwstaticlist_h
00008 
00009 struct rw_list;
00010 struct rw_install_info;
00011 
00012 /* List of statically linked modules */
00013 
00014 struct rw_static_info {
00015        const char *name;
00016        struct rw_list *(*rw_install)(const struct rw_install_info *);
00017        const char *(*rw_init)();
00018 } ;
00019 
00020 /* Macros to build the rw_static[] array */
00021 
00022 #define       rwappend2(a,b)       a ## b
00023 
00024 #define       DECLARE_STATICFUNCS(module) \
00025        struct rw_list * rwappend2(module, _rw_install) \
00026                             (const struct rw_install_info *); \
00027        const char *rwappend2(module, _rw_init)();
00028 
00029 #define       rwname(a)     # a
00030 
00031 #define       LIST_STATICFUNCS(module)    \
00032        { rwname(module), rwappend2(module, _rw_install), \
00033                      rwappend2(module, _rw_init) }
00034 
00035 #endif