diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-28 07:19:25 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-28 07:19:25 +0000 |
commit | 7da9fbce1aed84ac9b02d8c4f7363ca02429d238 (patch) | |
tree | ccf8d14af5e134344cd477453866c2cd682e34db /crawl-ref/source/cio.cc | |
parent | f086209f1e223b89cb392fd71bdebe2f3551f1f7 (diff) | |
download | crawl-ref-7da9fbce1aed84ac9b02d8c4f7363ca02429d238.tar.gz crawl-ref-7da9fbce1aed84ac9b02d8c4f7363ca02429d238.zip |
Backport r10443: generalized way of dealing with "disconnect at --more--"
hacks.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10444 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/cio.cc')
-rw-r--r-- | crawl-ref/source/cio.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc index b9ff80c25f..b3382bf6fc 100644 --- a/crawl-ref/source/cio.cc +++ b/crawl-ref/source/cio.cc @@ -426,6 +426,15 @@ int line_reader::read_line(bool clear_previous) { int ch = getchm(c_getch); +#if defined(USE_UNIX_SIGNALS) && defined(SIGHUP_SAVE) && defined(USE_CURSES) + // Don't return a partial string if a HUP signal interrupted things + if (crawl_state.seen_hups) + { + buffer[0] = '\0'; + return (0); + } +#endif + if (keyfn) { int whattodo = (*keyfn)(ch); |