diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-06-26 07:25:00 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-06-26 07:28:53 +0200 |
commit | ec23e119e24a32f4607dfdc0f43e8726febc4043 (patch) | |
tree | 34a13ebe1eb56cdc69a08df7a7b9ce879fd6e3e0 /src | |
parent | 27b26f3940a589d8df800254b66de87f75b28758 (diff) |
Remove pointless Term_user
Diffstat (limited to 'src')
-rw-r--r-- | src/dungeon.cc | 7 | ||||
-rw-r--r-- | src/main-win.c | 11 | ||||
-rw-r--r-- | src/main-xxx.c | 23 | ||||
-rw-r--r-- | src/store.cc | 7 | ||||
-rw-r--r-- | src/z-term.c | 23 | ||||
-rw-r--r-- | src/z-term.h | 3 |
6 files changed, 0 insertions, 74 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc index a79fd8b0..1c9d4e82 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -4266,13 +4266,6 @@ static void process_command(void) /*** System Commands ***/ - /* Hack -- User interface */ - case '!': - { - (void)Term_user(0); - break; - } - /* Single line from a pref file */ case '"': { diff --git a/src/main-win.c b/src/main-win.c index 91d6b0f3..d9e2ff43 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -1445,16 +1445,6 @@ static void term_data_redraw(term_data *td) /* - * Interact with the User - */ -static errr Term_user_win(int n) -{ - /* Success */ - return (0); -} - - -/* * React to global changes */ static errr Term_xtra_win_react(void) @@ -2202,7 +2192,6 @@ static void term_data_link(term_data *td) t->char_blank = ' '; /* Prepare the template hooks */ - t->user_hook = Term_user_win; t->xtra_hook = Term_xtra_win; t->curs_hook = Term_curs_win; t->wipe_hook = Term_wipe_win; diff --git a/src/main-xxx.c b/src/main-xxx.c index c80f01f0..56dc48f6 100644 --- a/src/main-xxx.c +++ b/src/main-xxx.c @@ -185,28 +185,6 @@ static void Term_nuke_xxx(term *t) /* - * Do a "user action" on the current "term" - * - * This function allows the visual module to do implementation defined - * things when the user activates the "system defined command" command. - * - * This function is normally not used. - * - * In general, this function should return zero if the action is successfully - * handled, and non-zero if the action is unknown or incorrectly handled. - */ -static errr Term_user_xxx(int n) -{ - term_data *td = (term_data*)(Term->data); - - /* XXX XXX XXX */ - - /* Unknown */ - return (1); -} - - -/* * Do a "special thing" to the current "term" * * This function must react to a large number of possible arguments, each @@ -654,7 +632,6 @@ static void term_data_link(int i) td->t->nuke_hook = Term_nuke_xxx; /* Prepare the template hooks */ - td->t->user_hook = Term_user_xxx; td->t->xtra_hook = Term_xtra_xxx; td->t->curs_hook = Term_curs_xxx; td->t->wipe_hook = Term_wipe_xxx; diff --git a/src/store.cc b/src/store.cc index b65ffdfe..1e61c413 100644 --- a/src/store.cc +++ b/src/store.cc @@ -3027,13 +3027,6 @@ static bool_ store_process_command(void) /*** System Commands ***/ - /* Hack -- User interface */ - case '!': - { - (void)Term_user(0); - break; - } - /* Single line from a pref file */ case '"': { diff --git a/src/z-term.c b/src/z-term.c index e9941117..be9190b6 100644 --- a/src/z-term.c +++ b/src/z-term.c @@ -184,17 +184,12 @@ * * Term->init_hook = Init the term * Term->nuke_hook = Nuke the term - * Term->user_hook = Perform user actions * Term->xtra_hook = Perform extra actions * Term->curs_hook = Draw (or Move) the cursor * Term->wipe_hook = Draw some blank spaces * Term->text_hook = Draw some text in the window * Term->pict_hook = Draw some attr/chars in the window * - * The "Term->user_hook" hook provides a simple hook to an implementation - * defined function, with application defined semantics. It is available - * to the program via the "Term_user()" function. - * * The "Term->xtra_hook" hook provides a variety of different functions, * based on the first parameter (which should be taken from the various * TERM_XTRA_* defines) and the second parameter (which may make sense @@ -254,12 +249,6 @@ * files use "white space" ("attr 1" / "char 32") to "erase" or "clear" * any window, for efficiency. * - * The game "Angband" uses the "Term_user" hook to allow any of the - * "main-xxx.c" files to interact with the user, by calling this hook - * whenever the user presses the "!" key when the game is waiting for - * a new command. This could be used, for example, to provide "unix - * shell commands" to the Unix versions of the game. - * * See "main-xxx.c" for a simple skeleton file which can be used to * create a "visual system" for a new platform when porting Angband. */ @@ -416,18 +405,6 @@ static errr term_win_copy(term_win *s, term_win *f, int w, int h) /* - * Execute the "Term->user_hook" hook, if available (see above). - */ -errr Term_user(int n) -{ - /* Verify the hook */ - if (!Term->user_hook) return ( -1); - - /* Call the hook */ - return ((*Term->user_hook)(n)); -} - -/* * Execute the "Term->xtra_hook" hook, if available (see above). * And *hacky* get a return code */ diff --git a/src/z-term.h b/src/z-term.h index 51e5760b..677b7510 100644 --- a/src/z-term.h +++ b/src/z-term.h @@ -215,8 +215,6 @@ struct term void (*init_hook)(term *t); void (*nuke_hook)(term *t); - errr (*user_hook)(int n); - errr (*xtra_hook)(int n, int v); errr (*curs_hook)(int x, int y); @@ -280,7 +278,6 @@ extern term *Term; /**** Available Functions ****/ -extern errr Term_user(int n); extern errr Term_xtra(int n, int v); extern long Term_xtra_long; |