From a5bcd5a541c7b4e79f6c694517fb5b4d14b5d9b4 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 18 Oct 2005 21:05:22 +0000 Subject: [PATCH] rename color_t -> gvcolor_t to avoid conflict with ocaml --- lib/common/color.h | 6 +++--- lib/common/colorprocs.h | 2 +- lib/common/colxlate.c | 2 +- lib/common/figgen.c | 2 +- lib/common/gdgen.c | 2 +- lib/common/hpglgen.c | 2 +- lib/common/mpgen.c | 2 +- lib/common/picgen.c | 4 ++-- lib/common/psgen.c | 2 +- lib/common/svggen.c | 2 +- lib/common/vrmlgen.c | 4 ++-- lib/common/vtxgen.c | 2 +- lib/gvc/gvcint.h | 2 +- lib/gvc/gvcjob.h | 2 +- lib/gvc/gvplugin_render.h | 2 +- lib/gvc/gvrender.c | 6 +++--- 16 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/common/color.h b/lib/common/color.h index d69b5f069..161f137e1 100644 --- a/lib/common/color.h +++ b/lib/common/color.h @@ -28,11 +28,11 @@ typedef struct hsbcolor_t { unsigned char h, s, b; } hsbcolor_t; -/* possible representations of color in color_t */ +/* possible representations of color in gvcolor_t */ typedef enum { HSV_DOUBLE, RGBA_BYTE, RGBA_WORD, CMYK_BYTE, RGBA_DOUBLE, COLOR_STRING, COLOR_INDEX } color_type_t; -/* color_t can hold a color spec in a choice or representations */ +/* gvcolor_t can hold a color spec in a choice or representations */ typedef struct color_s { union { double RGBA[4]; @@ -44,7 +44,7 @@ typedef struct color_s { int index; } u; color_type_t type; -} color_t; +} gvcolor_t; #define COLOR_MALLOC_FAIL -1 #define COLOR_UNKNOWN 1 diff --git a/lib/common/colorprocs.h b/lib/common/colorprocs.h index bd7514689..68f9f163d 100644 --- a/lib/common/colorprocs.h +++ b/lib/common/colorprocs.h @@ -21,7 +21,7 @@ extern "C" { #endif -extern int colorxlate(char *str, color_t * color, color_type_t target_type); +extern int colorxlate(char *str, gvcolor_t * color, color_type_t target_type); extern char *canontoken(char *str); #ifdef __cplusplus diff --git a/lib/common/colxlate.c b/lib/common/colxlate.c index 266f9ed4a..d08b9a990 100644 --- a/lib/common/colxlate.c +++ b/lib/common/colxlate.c @@ -159,7 +159,7 @@ char *canontoken(char *str) return (char*)canon; } -int colorxlate(char *str, color_t * color, color_type_t target_type) +int colorxlate(char *str, gvcolor_t * color, color_type_t target_type) { static hsbcolor_t *last; static unsigned char *canon; diff --git a/lib/common/figgen.c b/lib/common/figgen.c index 2a2676b30..b6087753c 100644 --- a/lib/common/figgen.c +++ b/lib/common/figgen.c @@ -269,7 +269,7 @@ static unsigned char fig_resolve_color(char *name) unsigned char i; int new; char *tok; - color_t color; + gvcolor_t color; static char *figcolor[] = { "black", "blue", "green", "cyan", "red", "magenta", "yellow", "white", (char *) NULL diff --git a/lib/common/gdgen.c b/lib/common/gdgen.c index b1cb605a5..2d1b292e3 100644 --- a/lib/common/gdgen.c +++ b/lib/common/gdgen.c @@ -87,7 +87,7 @@ static int white, black, transparent; static int gd_resolve_color(char *name) { - color_t color; + gvcolor_t color; if (!(strcmp(name, "transparent"))) { /* special case for "transparent" color */ diff --git a/lib/common/hpglgen.c b/lib/common/hpglgen.c index 5fdca4724..ff7971065 100644 --- a/lib/common/hpglgen.c +++ b/lib/common/hpglgen.c @@ -601,7 +601,7 @@ static void hpgl_set_font(char *name, double size) static void hpgl_set_color(char *name) { - color_t color; + gvcolor_t color; #ifdef HPDEBUG fprintf(stderr, "set color %s\n", name); diff --git a/lib/common/mpgen.c b/lib/common/mpgen.c index b5a814603..1496f86d2 100644 --- a/lib/common/mpgen.c +++ b/lib/common/mpgen.c @@ -131,7 +131,7 @@ static void mp_set_font(char *name, double size) static void mp_set_color(char *name) { static char *op[] = { "graph", "node", "edge", "sethsb" }; - color_t color; + gvcolor_t color; if (strcmp(name, S[SP].color)) { colorxlate(name, &color, HSV_DOUBLE); diff --git a/lib/common/picgen.c b/lib/common/picgen.c index 2682f88bc..1c694cd5e 100644 --- a/lib/common/picgen.c +++ b/lib/common/picgen.c @@ -452,7 +452,7 @@ static void pic_textline(point p, textline_t * line) static void pic_set_color(char *name) { - color_t color; + gvcolor_t color; S[SP].color = name; colorxlate(name, &color, HSV_DOUBLE); @@ -533,7 +533,7 @@ static void pic_polygon(point * A, int n, int filled) pf1 = cvt2ptf(A[0]); /* opposite */ pf2 = cvt2ptf(A[2]); /* corners */ if (filled) { - color_t color; + gvcolor_t color; colorxlate(S[SP].color, &color, HSV_DOUBLE); fprintf(Output_file, "setfillval %f\n", color.u.HSV[2]); diff --git a/lib/common/psgen.c b/lib/common/psgen.c index c09905c65..7f73dfadc 100644 --- a/lib/common/psgen.c +++ b/lib/common/psgen.c @@ -269,7 +269,7 @@ static void ps_set_font(char *name, double size) static void ps_set_color(char *name) { static char *op[] = { "graph", "node", "edge", "sethsb" }; - color_t color; + gvcolor_t color; colorxlate(name, &color, HSV_DOUBLE); fprintf(Output_file, "%.3f %.3f %.3f %scolor\n", diff --git a/lib/common/svggen.c b/lib/common/svggen.c index ca28d91db..958cd6915 100644 --- a/lib/common/svggen.c +++ b/lib/common/svggen.c @@ -294,7 +294,7 @@ char *svg_resolve_color(char *name, int useKnown) static char buf[SMALLBUF]; char *tok; - color_t color; + gvcolor_t color; tok = canontoken(name); if (!useKnown || (bsearch(&tok, svg_known_colors, diff --git a/lib/common/vrmlgen.c b/lib/common/vrmlgen.c index 506698eba..04c6f1219 100644 --- a/lib/common/vrmlgen.c +++ b/lib/common/vrmlgen.c @@ -154,7 +154,7 @@ static FILE *nodefile(node_t * n) static unsigned char vrml_resolve_color(char *name) { - color_t color; + gvcolor_t color; if (!(strcmp(name, "transparent"))) { /* special case for "transparent" color */ @@ -174,7 +174,7 @@ static void vrml_set_pencolor(char *name) static void vrml_set_fillcolor(char *name) { - color_t color; + gvcolor_t color; cstk[SP].fillcolor = name; colorxlate(name, &color, RGBA_BYTE); cstk[SP].r = (double) color.u.rgba[0] / 255.0; diff --git a/lib/common/vtxgen.c b/lib/common/vtxgen.c index 90fda13b1..26d36b94c 100644 --- a/lib/common/vtxgen.c +++ b/lib/common/vtxgen.c @@ -408,7 +408,7 @@ static void vtx_node_style(void) static void vtx_set_color(char *name) { - color_t color; + gvcolor_t color; context_t *cp; cp = &(cstk[SP]); diff --git a/lib/gvc/gvcint.h b/lib/gvc/gvcint.h index cead70a89..7f02900ef 100644 --- a/lib/gvc/gvcint.h +++ b/lib/gvc/gvcint.h @@ -128,7 +128,7 @@ extern "C" { int SP; /* render defaults set from graph */ - color_t bgcolor; /* background color */ + gvcolor_t bgcolor; /* background color */ /* keybindings for keyboard events */ gvevent_key_binding_t *keybindings; diff --git a/lib/gvc/gvcjob.h b/lib/gvc/gvcjob.h index b72e23bac..3d334f0aa 100644 --- a/lib/gvc/gvcjob.h +++ b/lib/gvc/gvcjob.h @@ -44,7 +44,7 @@ extern "C" { typedef struct { char *fontfam, fontopt; - color_t pencolor, fillcolor; + gvcolor_t pencolor, fillcolor; pen_type pen; fill_type fill; double penwidth; diff --git a/lib/gvc/gvplugin_render.h b/lib/gvc/gvplugin_render.h index 7f1bae9e2..aba4aa4b4 100644 --- a/lib/gvc/gvplugin_render.h +++ b/lib/gvc/gvplugin_render.h @@ -49,7 +49,7 @@ extern "C" { char *target); void (*end_anchor) (GVJ_t * job); void (*textline) (GVJ_t * job, pointf p, textline_t * str); - void (*resolve_color) (GVJ_t * job, color_t * color); + void (*resolve_color) (GVJ_t * job, gvcolor_t * color); void (*ellipse) (GVJ_t * job, pointf * A, int filled); void (*polygon) (GVJ_t * job, pointf * A, int n, int filled); void (*beziercurve) (GVJ_t * job, pointf * A, int n, diff --git a/lib/gvc/gvrender.c b/lib/gvc/gvrender.c index 37148276c..1c9473128 100644 --- a/lib/gvc/gvrender.c +++ b/lib/gvc/gvrender.c @@ -194,7 +194,7 @@ static int gvrender_comparestr(const void *s1, const void *s2) } static void gvrender_resolve_color(gvrender_features_t * features, - char *name, color_t * color) + char *name, gvcolor_t * color) { char *tok; int rc; @@ -694,7 +694,7 @@ void gvrender_textline(GVJ_t * job, pointf p, textline_t * line) void gvrender_set_pencolor(GVJ_t * job, char *name) { gvrender_engine_t *gvre = job->render.engine; - color_t *color = &(job->style->pencolor); + gvcolor_t *color = &(job->style->pencolor); if (gvre) { gvrender_resolve_color(job->render.features, name, color); @@ -714,7 +714,7 @@ void gvrender_set_pencolor(GVJ_t * job, char *name) void gvrender_set_fillcolor(GVJ_t * job, char *name) { gvrender_engine_t *gvre = job->render.engine; - color_t *color = &(job->style->fillcolor); + gvcolor_t *color = &(job->style->fillcolor); if (gvre) { gvrender_resolve_color(job->render.features, name, color); -- 2.50.1