diff options
author | Elliot Lee <sopwith@src.gnome.org> | 2000-11-16 17:22:29 +0000 |
---|---|---|
committer | Elliot Lee <sopwith@src.gnome.org> | 2000-11-16 17:22:29 +0000 |
commit | c624bdbddb760abedddd113b1ba839e50c6cbb61 (patch) | |
tree | dafa947c0aa9e57735dda3cad4e653aa7a047902 /pango/modules.c | |
parent | 399c0a006cc8f9d8005c562a7e90cbfef95e2a18 (diff) | |
download | pango-c624bdbddb760abedddd113b1ba839e50c6cbb61.tar.gz |
Make some vars static. Implement pango_module_register function. Move
* pango/modules.c: Make some vars static.
Implement pango_module_register function.
* pango/pango-modules.h, pango/modules.h: Move declaration of
PangoIncludedModule to pango-modules.h for public use.
Diffstat (limited to 'pango/modules.c')
-rw-r--r-- | pango/modules.c | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/pango/modules.c b/pango/modules.c index fc59b008..896995a5 100644 --- a/pango/modules.c +++ b/pango/modules.c @@ -68,8 +68,8 @@ struct _PangoEnginePair PangoEngine *engine; }; -GList *maps; -GList *engines; +static GList *maps = NULL; +static GList *engines = NULL; static void build_map (PangoMapInfo *info); static void init_modules (void); @@ -179,29 +179,33 @@ pango_engine_pair_get_engine (PangoEnginePair *pair) } static void -add_included_modules (void) +handle_included_module (PangoIncludedModule *mod) { - int i, j; + PangoEngineInfo *engine_info; + int n_engines; - for (i = 0; _pango_included_modules[i].list; i++) + mod->list (&engine_info, &n_engines); + + for (j = 0; j < n_engines; j++) { - PangoEngineInfo *engine_info; - int n_engines; + PangoEnginePair *pair = g_new (PangoEnginePair, 1); - _pango_included_modules[i].list (&engine_info, &n_engines); + pair->info = engine_info[j]; + pair->included = TRUE; + pair->load_info = mod; + pair->engine = NULL; - for (j=0; j < n_engines; j++) - { - PangoEnginePair *pair = g_new (PangoEnginePair, 1); + engines = g_list_prepend (engines, pair); + } +} - pair->info = engine_info[j]; - pair->included = TRUE; - pair->load_info = &_pango_included_modules[i]; - pair->engine = NULL; +static void +add_included_modules (void) +{ + int i, j; - engines = g_list_prepend (engines, pair); - } - } + for (i = 0; _pango_included_modules[i].list; i++) + handle_included_module (&_pango_included_modules[i]); } static gboolean /* Returns true if succeeded, false if failed */ @@ -529,3 +533,16 @@ pango_map_get_engine (PangoMap *map, else return NULL; } + +/** + * pango_module_register: + * @mod: a PangoIncludedModule + * + * Registers a PangoIncludedModlue + * + **/ +void +pango_module_register (PangoIncludedModule *mod) +{ + handle_included_module (mod); +} |