Skip to content

Commit 77d3053

Browse files
ret2libcradare
authored andcommitted
core/graph: rename "small" into "mini" for consistency
1 parent 4228c1d commit 77d3053

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

libr/core/graph.c

+17-17
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ static const char *mousemodes[] = {
2929
#define DEFAULT_SPEED 1
3030
#define PAGEKEY_SPEED (h / 2)
3131
/* 15 */
32-
#define SMALLNODE_TEXT_CUR "<@@@@@@>"
33-
#define SMALLNODE_MIN_WIDTH 8
34-
#define SMALLNODE_TITLE_LEN 4
35-
#define SMALLNODE_CENTER_X 3
32+
#define MINIGRAPH_NODE_TEXT_CUR "<@@@@@@>"
33+
#define MINIGRAPH_NODE_MIN_WIDTH 8
34+
#define MINIGRAPH_NODE_TITLE_LEN 4
35+
#define MINIGRAPH_NODE_CENTER_X 3
3636
#define MININODE_MIN_WIDTH 16
3737

3838
#define ZOOM_STEP 10
@@ -124,7 +124,7 @@ static const char *mode2str(const RAGraph *g, const char *prefix) {
124124
const char *submode;
125125

126126
if (is_mini (g)) {
127-
submode = "SMALL";
127+
submode = "MINI";
128128
} else if (is_offset (g)) {
129129
submode = "OFF";
130130
} else if (is_summary (g)) {
@@ -154,16 +154,16 @@ static char *get_title(ut64 addr) {
154154

155155
static int agraph_refresh(struct agraph_refresh_data *grd);
156156

157-
static void update_node_dimension(const RGraph *g, int is_small, int zoom) {
157+
static void update_node_dimension(const RGraph *g, int is_mini, int zoom) {
158158
const RList *nodes = r_graph_get_nodes (g);
159159
RGraphNode *gn;
160160
RListIter *it;
161161
RANode *n;
162162

163163
graph_foreach_anode (nodes, it, gn, n) {
164-
if (is_small) {
164+
if (is_mini) {
165165
n->h = 1;
166-
n->w = SMALLNODE_MIN_WIDTH;
166+
n->w = MINIGRAPH_NODE_MIN_WIDTH;
167167
} else if (n->is_mini) {
168168
n->h = 1;
169169
n->w = MININODE_MIN_WIDTH;
@@ -187,27 +187,27 @@ static void update_node_dimension(const RGraph *g, int is_small, int zoom) {
187187
}
188188
}
189189

190-
static void small_RANode_print(const RAGraph *g, const RANode *n,
190+
static void mini_RANode_print(const RAGraph *g, const RANode *n,
191191
int cur, bool print_details) {
192192
char title[TITLE_LEN];
193193
int x, delta_x = 0;
194194

195-
if (!G (n->x + SMALLNODE_CENTER_X, n->y) &&
196-
!G (n->x + SMALLNODE_CENTER_X + n->w, n->y)) {
195+
if (!G (n->x + MINIGRAPH_NODE_CENTER_X, n->y) &&
196+
!G (n->x + MINIGRAPH_NODE_CENTER_X + n->w, n->y)) {
197197
return;
198198
}
199199

200-
x = n->x + SMALLNODE_CENTER_X + g->can->sx;
200+
x = n->x + MINIGRAPH_NODE_CENTER_X + g->can->sx;
201201
if (x < 0) {
202202
delta_x = -x;
203203
}
204-
if (!G (n->x + SMALLNODE_CENTER_X + delta_x, n->y)) {
204+
if (!G (n->x + MINIGRAPH_NODE_CENTER_X + delta_x, n->y)) {
205205
return;
206206
}
207207

208208
if (print_details) {
209209
if (cur) {
210-
W (&SMALLNODE_TEXT_CUR[delta_x]);
210+
W (&MINIGRAPH_NODE_TEXT_CUR[delta_x]);
211211
(void) G (-g->can->sx, -g->can->sy + 2);
212212
snprintf (title, sizeof (title) - 1,
213213
"[ %s ]", n->title);
@@ -220,8 +220,8 @@ static void small_RANode_print(const RAGraph *g, const RANode *n,
220220
int l = strlen (n->title);
221221

222222
str = n->title;
223-
if (l > SMALLNODE_TITLE_LEN) {
224-
str += l - SMALLNODE_TITLE_LEN;
223+
if (l > MINIGRAPH_NODE_TITLE_LEN) {
224+
str += l - MINIGRAPH_NODE_TITLE_LEN;
225225
}
226226
}
227227
snprintf (title, sizeof (title) - 1, "__%s__", str);
@@ -2258,7 +2258,7 @@ static void agraph_update_seek(RAGraph *g, RANode *n, int force) {
22582258
static void agraph_print_node(const RAGraph *g, RANode *n) {
22592259
const int cur = g->curnode && get_anode (g->curnode) == n;
22602260
if (is_mini (g) || n->is_mini) {
2261-
small_RANode_print (g, n, cur, is_mini (g));
2261+
mini_RANode_print (g, n, cur, is_mini (g));
22622262
} else {
22632263
normal_RANode_print (g, n, cur);
22642264
}

0 commit comments

Comments
 (0)