From a9af3fda1d784c42d486a019a0a4e947f762af70 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 4 Jun 2023 18:42:58 +0100 Subject: Rename UI_UPDATE as MOVE_UI_UPDATE All the other constants named UI_* are special key names that can be passed to midend_process_key(), but UI_UPDATE is a special return value from the back-end interpret_move() function instead. This renaming makes the distinction clear and provides a naming convention for future special return values from interpret_move(). --- tents.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tents.c') diff --git a/tents.c b/tents.c index e772e57..ff4af33 100644 --- a/tents.c +++ b/tents.c @@ -1589,7 +1589,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, ui->dsy = ui->dey = y; ui->drag_ok = true; ui->cdisp = false; - return UI_UPDATE; + return MOVE_UI_UPDATE; } if ((IS_MOUSE_DRAG(button) || IS_MOUSE_RELEASE(button)) && @@ -1621,14 +1621,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, } if (IS_MOUSE_DRAG(button)) - return UI_UPDATE; + return MOVE_UI_UPDATE; /* * The drag has been released. Enact it. */ if (!ui->drag_ok) { ui->drag_button = -1; - return UI_UPDATE; /* drag was just cancelled */ + return MOVE_UI_UPDATE; /* drag was just cancelled */ } xmin = min(ui->dsx, ui->dex); @@ -1666,7 +1666,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, if (buflen == 0) { sfree(buf); - return UI_UPDATE; /* drag was terminated */ + return MOVE_UI_UPDATE; /* drag was terminated */ } else { buf[buflen] = '\0'; return buf; @@ -1694,7 +1694,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, if (len) return dupstr(tmpbuf); } else move_cursor(button, &ui->cx, &ui->cy, w, h, false); - return UI_UPDATE; + return MOVE_UI_UPDATE; } if (ui->cdisp) { char rep = 0; @@ -1721,7 +1721,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, } } else if (IS_CURSOR_SELECT(button)) { ui->cdisp = true; - return UI_UPDATE; + return MOVE_UI_UPDATE; } return NULL; -- cgit v1.1