Commit graph

9 commits

Author SHA1 Message Date
John "Elwin" Edwards
338214459d Fix a portability issue with md_hasclreol().
Some games' implementation of md_hasclreol() poked around in ncurses
internals, which does not work for some ncurses build configuration.
Most games did not actually call md_hasclreol(), so it was removed.
There is a standard terminfo function which can retrieve the value of
the clr_eol capability, so this was used for rogue5.
2017-12-27 10:26:06 -05:00
John "Elwin" Edwards
0936c8f216 Excise md_putchar().
The function wrapped the standard putchar(), doing nothing beside
discarding the return value.  That could cause problems with tputs(),
which expects an int to be returned.
2017-09-18 19:11:57 -04:00
John "Elwin" Edwards
62047972cc Use more portable random seed generation.
The new function md_random_seed() has replaced time() + getpid() and
similar methods.  Putting everything in mdport.c slightly reduces the
warnings and workarounds.
2017-01-28 15:49:41 -05:00
John "Elwin" Edwards
5d0e3dd646 Don't swap signal handlers in md_shellescape().
md_shellescape() sets SIGINT and SIGQUIT to be ignored, storing the
previous handlers, and restores them after the shell exits.  But it
mixed up the two handlers.

Since the signals were usually handled by the same function, this fix
doesn't have much effect, but anything that makes signal code less
confusing is a good thing.
2015-06-08 10:01:25 -04:00
John "Elwin" Edwards
5a25cd89da rogue[345]: fix backspace key in prompts.
md_readchar() mapped KEY_BACKSPACE to CTRL-H, but get_str(), which
handles prompts for strings, only backs up when it receives the erase
character.  The key should be mapped to md_erasechar().

This fixes Red Hat Bugzilla #847852.
2013-08-27 09:25:30 -07:00
John "Elwin" Edwards
75f5abe998 Improve support for keypad 5. 2011-10-28 16:00:05 +00:00
John "Elwin" Edwards
00669593bd rogue5: remove some NULLs. 2010-06-15 20:49:22 +00:00
John "Elwin" Edwards
53a15a3e2e rogue5: add savedir, logfile, bugfixes 2010-05-24 20:16:15 +00:00
John "Elwin" Edwards
3741c4867d Import Rogue 5.4 from the Roguelike Restoration Project (r1490) 2010-05-24 20:10:59 +00:00