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 | |
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.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-0 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 7 | ||||
-rw-r--r-- | pango/modules.c | 53 | ||||
-rw-r--r-- | pango/modules.h | 10 | ||||
-rw-r--r-- | pango/pango-modules.h | 10 |
10 files changed, 95 insertions, 27 deletions
@@ -1,3 +1,10 @@ +2000-11-15 Elliot Lee <sopwith@redhat.com> + + * 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. + Wed Nov 15 16:56:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (process_item): Fix problem with diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 6e0275d7..488b79b9 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,10 @@ +2000-11-15 Elliot Lee <sopwith@redhat.com> + + * 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. + Wed Nov 15 16:56:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (process_item): Fix problem with diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 6e0275d7..488b79b9 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,10 @@ +2000-11-15 Elliot Lee <sopwith@redhat.com> + + * 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. + Wed Nov 15 16:56:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (process_item): Fix problem with diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 6e0275d7..488b79b9 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,10 @@ +2000-11-15 Elliot Lee <sopwith@redhat.com> + + * 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. + Wed Nov 15 16:56:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (process_item): Fix problem with diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 6e0275d7..488b79b9 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,10 @@ +2000-11-15 Elliot Lee <sopwith@redhat.com> + + * 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. + Wed Nov 15 16:56:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (process_item): Fix problem with diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 6e0275d7..488b79b9 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,10 @@ +2000-11-15 Elliot Lee <sopwith@redhat.com> + + * 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. + Wed Nov 15 16:56:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (process_item): Fix problem with diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 6e0275d7..488b79b9 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,10 @@ +2000-11-15 Elliot Lee <sopwith@redhat.com> + + * 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. + Wed Nov 15 16:56:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (process_item): Fix problem with 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); +} diff --git a/pango/modules.h b/pango/modules.h index 2ddc4999..409fb433 100644 --- a/pango/modules.h +++ b/pango/modules.h @@ -20,19 +20,11 @@ */ #include <pango/pango-engine.h> +#include <pango/pango-modules.h> #ifndef __MODULES_H__ #define __MODULES_H__ -typedef struct _PangoIncludedModule PangoIncludedModule; - -struct _PangoIncludedModule -{ - void (*list) (PangoEngineInfo **engines, int *n_engines); - PangoEngine *(*load) (const char *id); - void (*unload) (PangoEngine *engine); -}; - extern PangoIncludedModule _pango_included_modules[]; #endif /* __MODULES_H__ */ diff --git a/pango/pango-modules.h b/pango/pango-modules.h index e6d7b565..53b3f697 100644 --- a/pango/pango-modules.h +++ b/pango/pango-modules.h @@ -37,6 +37,15 @@ struct _PangoMapEntry gboolean is_exact; }; +typedef struct _PangoIncludedModule PangoIncludedModule; + +struct _PangoIncludedModule +{ + void (*list) (PangoEngineInfo **engines, int *n_engines); + PangoEngine *(*load) (const char *id); + void (*unload) (PangoEngine *engine); +}; + PangoMap * pango_find_map (const char *lang, guint engine_type_id, guint render_type_id); @@ -44,6 +53,7 @@ PangoMapEntry *pango_map_get_entry (PangoMap *map, guint32 wc); PangoEngine * pango_map_get_engine (PangoMap *map, guint32 wc); +void pango_module_register (PangoIncludedModule *mod); #ifdef __cplusplus } |