summaryrefslogtreecommitdiff
path: root/src/main-x11.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
committerBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
commitfe26f99e8a580a8bb71eb1cc565d57fbe30289cd (patch)
treece2e3cfa31dd6f79b283d62675be499bd254fd60 /src/main-x11.c
parent3e64546c68c7b64606451b0fb35a3c95fb1dae3b (diff)
Avoid unnecessary uses of the Term global
Diffstat (limited to 'src/main-x11.c')
-rw-r--r--src/main-x11.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main-x11.c b/src/main-x11.c
index 33c30374..5c577bda 100644
--- a/src/main-x11.c
+++ b/src/main-x11.c
@@ -1662,7 +1662,7 @@ static void Term_text_x11(void *data, int x, int y, int n, byte a, const char *s
/*
* Initialize a term_data
*/
-static errr term_data_init(term_data *td, int i)
+static term *term_data_init(term_data *td, int i)
{
const char *name = angband_term_name[i];
@@ -1908,7 +1908,7 @@ static errr term_data_init(term_data *td, int i)
Term_activate(td->term_ptr);
/* Success */
- return (0);
+ return td->term_ptr;
}
@@ -2003,10 +2003,10 @@ errr init_x11(int argc, char *argv[])
term_data *td = &data[i];
/* Initialize the term_data */
- term_data_init(td, i);
+ term *t = term_data_init(td, i);
/* Save global entry */
- angband_term[i] = Term;
+ angband_term[i] = t;
}
/* Raise the "Angband" window */