Skip to content

Commit

Permalink
Properly set TRUE value of bitfields of size 1
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniels committed Apr 8, 2024
1 parent 606fdf5 commit 30f1f96
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions internal/ccall/common/emit.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ initMapData (GVJ_t* job, char* lbl, char* url, char* tooltip, char* target, char
if (flags & GVRENDER_DOES_TOOLTIPS) {
if (tooltip && tooltip[0]) {
obj->tooltip = strdup_and_subst_obj(tooltip, gobj);
obj->explicit_tooltip = TRUE;
obj->explicit_tooltip |= TRUE;
assigned = 1;
}
else if (obj->label) {
Expand Down Expand Up @@ -2537,7 +2537,7 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
obj->u.e = e;
obj->emit_state = EMIT_EDRAW;
if (ED_label(e) && !ED_label(e)->html && mapBool(agget(e,"labelaligned"),FALSE))
obj->labeledgealigned = TRUE;
obj->labeledgealigned |= TRUE;

/* We handle the edge style and penwidth here because the width
* is needed below for calculating polygonal image maps
Expand Down Expand Up @@ -2593,13 +2593,13 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
obj->labelurl = strdup(dflt_url);
if (((s = agget(e, "tailhref")) && s[0]) || ((s = agget(e, "tailURL")) && s[0])) {
obj->tailurl = strdup_and_subst_obj(s, (void*)e);
obj->explicit_tailurl = TRUE;
obj->explicit_tailurl |= TRUE;
}
else if (dflt_url)
obj->tailurl = strdup(dflt_url);
if (((s = agget(e, "headhref")) && s[0]) || ((s = agget(e, "headURL")) && s[0])) {
obj->headurl = strdup_and_subst_obj(s, (void*)e);
obj->explicit_headurl = TRUE;
obj->explicit_headurl |= TRUE;
}
else if (dflt_url)
obj->headurl = strdup(dflt_url);
Expand All @@ -2609,7 +2609,7 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
if ((s = agget(e, "target")) && s[0])
dflt_target = strdup_and_subst_obj(s, (void*)e);
if ((s = agget(e, "edgetarget")) && s[0]) {
obj->explicit_edgetarget = TRUE;
obj->explicit_edgetarget |= TRUE;
obj->target = strdup_and_subst_obj(s, (void*)e);
}
else if (dflt_target)
Expand All @@ -2620,12 +2620,12 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
obj->labeltarget = strdup(dflt_target);
if ((s = agget(e, "tailtarget")) && s[0]) {
obj->tailtarget = strdup_and_subst_obj(s, (void*)e);
obj->explicit_tailtarget = TRUE;
obj->explicit_tailtarget |= TRUE;
}
else if (dflt_target)
obj->tailtarget = strdup(dflt_target);
if ((s = agget(e, "headtarget")) && s[0]) {
obj->explicit_headtarget = TRUE;
obj->explicit_headtarget |= TRUE;
obj->headtarget = strdup_and_subst_obj(s, (void*)e);
}
else if (dflt_target)
Expand All @@ -2638,7 +2638,7 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
char* tooltip = preprocessTooltip (s, e);
obj->tooltip = strdup_and_subst_obj(tooltip, (void*)e);
free (tooltip);
obj->explicit_tooltip = TRUE;
obj->explicit_tooltip |= TRUE;
}
else if (obj->label)
obj->tooltip = strdup(obj->label);
Expand All @@ -2647,7 +2647,7 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
char* tooltip = preprocessTooltip (s, e);
obj->labeltooltip = strdup_and_subst_obj(tooltip, (void*)e);
free (tooltip);
obj->explicit_labeltooltip = TRUE;
obj->explicit_labeltooltip |= TRUE;
}
else if (obj->label)
obj->labeltooltip = strdup(obj->label);
Expand All @@ -2656,7 +2656,7 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
char* tooltip = preprocessTooltip (s, e);
obj->tailtooltip = strdup_and_subst_obj(tooltip, (void*)e);
free (tooltip);
obj->explicit_tailtooltip = TRUE;
obj->explicit_tailtooltip |= TRUE;
}
else if (obj->taillabel)
obj->tailtooltip = strdup(obj->taillabel);
Expand All @@ -2665,7 +2665,7 @@ static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles)
char* tooltip = preprocessTooltip (s, e);
obj->headtooltip = strdup_and_subst_obj(tooltip, (void*)e);
free (tooltip);
obj->explicit_headtooltip = TRUE;
obj->explicit_headtooltip |= TRUE;
}
else if (obj->headlabel)
obj->headtooltip = strdup(obj->headlabel);
Expand Down

0 comments on commit 30f1f96

Please sign in to comment.