Index: trunk/src/librnd/core/color_cache.h =================================================================== --- trunk/src/librnd/core/color_cache.h (revision 30934) +++ trunk/src/librnd/core/color_cache.h (revision 30935) @@ -33,17 +33,17 @@ #include #include -typedef void (*pcb_clrcache_free_t)(pcb_clrcache_t *cache, void *hidclr); +typedef void (*rnd_clrcache_free_t)(rnd_clrcache_t *cache, void *hidclr); -struct pcb_clrcache_s { +struct rnd_clrcache_s { htip_t ht; int hidsize; - pcb_clrcache_free_t hidfree; + rnd_clrcache_free_t hidfree; void *user_data; /* the caller can set this up after pcb_clrcache_init and use it in hidfree() */ }; -RND_INLINE void pcb_clrcache_init(pcb_clrcache_t *cache, int hidsize, pcb_clrcache_free_t hidfree) +RND_INLINE void rnd_clrcache_init(rnd_clrcache_t *cache, int hidsize, rnd_clrcache_free_t hidfree) { htip_init(&cache->ht, longhash, longkeyeq); cache->hidsize = hidsize; @@ -51,7 +51,7 @@ cache->user_data = NULL; } -RND_INLINE void pcb_clrcache_del(pcb_clrcache_t *cache, const rnd_color_t *color) +RND_INLINE void rnd_clrcache_del(rnd_clrcache_t *cache, const rnd_color_t *color) { void *old = htip_get(&cache->ht, color->packed); if (old == NULL) @@ -61,7 +61,7 @@ free(old); } -RND_INLINE void *pcb_clrcache_get(pcb_clrcache_t *cache, const rnd_color_t *color, int alloc) +RND_INLINE void *rnd_clrcache_get(rnd_clrcache_t *cache, const rnd_color_t *color, int alloc) { void *clr = htip_get(&cache->ht, color->packed); if (clr != NULL) @@ -75,7 +75,7 @@ return clr; } -RND_INLINE void pcb_clrcache_uninit(pcb_clrcache_t *cache) +RND_INLINE void rnd_clrcache_uninit(rnd_clrcache_t *cache) { htip_entry_t *e; Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 30934) +++ trunk/src/librnd/core/global_typedefs.h (revision 30935) @@ -53,7 +53,7 @@ typedef unsigned int rnd_cardinal_t; typedef struct rnd_color_s rnd_color_t; -typedef struct pcb_clrcache_s pcb_clrcache_t; +typedef struct rnd_clrcache_s rnd_clrcache_t; typedef struct pcb_pixmap_s pcb_pixmap_t; typedef struct rnd_action_s rnd_action_t; Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30934) +++ trunk/src/librnd/pcb_compat.h (revision 30935) @@ -183,3 +183,10 @@ #define pcb_clrdup rnd_clrdup #define pcb_color_init rnd_color_init #define pcb_color_is_drill rnd_color_is_drill +#define pcb_clrcache_s rnd_clrcache_s +#define pcb_clrcache_init rnd_clrcache_init +#define pcb_clrcache_del rnd_clrcache_del +#define pcb_clrcache_get rnd_clrcache_get +#define pcb_clrcache_uninit rnd_clrcache_uninit +#define pcb_clrcache_t rnd_clrcache_t +#define pcb_clrcache_free_t rnd_clrcache_free_t Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 30934) +++ trunk/src_plugins/export_png/png.c (revision 30935) @@ -78,7 +78,7 @@ static pcb_cam_t png_cam; -static pcb_clrcache_t color_cache; +static rnd_clrcache_t color_cache; static int color_cache_inited = 0; static htpp_t brush_cache; static int brush_cache_inited = 0; @@ -584,7 +584,7 @@ static void png_free_cache(void) { if (color_cache_inited) { - pcb_clrcache_uninit(&color_cache); + rnd_clrcache_uninit(&color_cache); color_cache_inited = 0; } if (brush_cache_inited) { @@ -958,15 +958,15 @@ } if (!color_cache_inited) { - pcb_clrcache_init(&color_cache, sizeof(color_struct), NULL); + rnd_clrcache_init(&color_cache, sizeof(color_struct), NULL); color_cache_inited = 1; } - if ((cc = pcb_clrcache_get(&color_cache, color, 0)) != NULL) { + if ((cc = rnd_clrcache_get(&color_cache, color, 0)) != NULL) { gc->color = cc; } else if (color->str[0] == '#') { - cc = pcb_clrcache_get(&color_cache, color, 1); + cc = rnd_clrcache_get(&color_cache, color, 1); gc->color = cc; gc->color->r = color->r; gc->color->g = color->g; Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30934) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30935) @@ -53,7 +53,7 @@ GdkColor clip_color; /* color cache for set_color */ - pcb_clrcache_t ccache; + rnd_clrcache_t ccache; int ccache_inited; } render_priv_t; @@ -503,10 +503,10 @@ pcb_gtk_color_cache_t *cc; if (!priv->ccache_inited) { - pcb_clrcache_init(&priv->ccache, sizeof(pcb_gtk_color_cache_t), NULL); + rnd_clrcache_init(&priv->ccache, sizeof(pcb_gtk_color_cache_t), NULL); priv->ccache_inited = 1; } - cc = pcb_clrcache_get(&priv->ccache, color, 1); + cc = rnd_clrcache_get(&priv->ccache, color, 1); if (!cc->color_set) { map_color(color, &cc->color); cc->color_set = 1; Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30934) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30935) @@ -48,7 +48,7 @@ double current_alpha_mult; /* color cache for set_color */ - pcb_clrcache_t ccache; + rnd_clrcache_t ccache; int ccache_inited; } render_priv_t; @@ -317,10 +317,10 @@ pcb_gtk_color_cache_t *cc; if (!priv->ccache_inited) { - pcb_clrcache_init(&priv->ccache, sizeof(pcb_gtk_color_cache_t), NULL); + rnd_clrcache_init(&priv->ccache, sizeof(pcb_gtk_color_cache_t), NULL); priv->ccache_inited = 1; } - cc = pcb_clrcache_get(&priv->ccache, gc->pcolor, 1); + cc = rnd_clrcache_get(&priv->ccache, gc->pcolor, 1); if (!cc->color_set) { if (gdk_color_parse(gc->pcolor->str, &cc->color)) gdk_color_alloc(colormap, &cc->color); Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 30934) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30935) @@ -69,7 +69,7 @@ static int idle_proc_set = 0; static int need_redraw = 0; -static pcb_clrcache_t ltf_ccache; +static rnd_clrcache_t ltf_ccache; static int ltf_ccache_inited; #ifndef XtRDouble @@ -2253,7 +2253,7 @@ gc->pcolor = *pcolor; if (!ltf_ccache_inited) { - pcb_clrcache_init(<f_ccache, sizeof(ltf_color_cache_t), NULL); + rnd_clrcache_init(<f_ccache, sizeof(ltf_color_cache_t), NULL); ltf_ccache_inited = 1; } @@ -2261,12 +2261,12 @@ gc->color = offlimit_color; gc->erase = 0; } - else if ((cc = pcb_clrcache_get(<f_ccache, pcolor, 0)) != NULL) { + else if ((cc = rnd_clrcache_get(<f_ccache, pcolor, 0)) != NULL) { gc->color = cc->pix; gc->erase = 0; } else { - cc = pcb_clrcache_get(<f_ccache, pcolor, 1); + cc = rnd_clrcache_get(<f_ccache, pcolor, 1); cc->pix = lesstif_parse_color(pcolor); #if 0 printf("lesstif_set_color `%s' %08x rgb/%d/%d/%d\n", name, color.pixel, color.red, color.green, color.blue);