summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libunix.h
Commit message (Collapse)AuthorAgeFilesLines
* Simplify scrolling handling in message_out.Robert Vollmert2009-11-261-2/+1
| | | | | | | | | | The newline parameter to message_out is gone. Instead, a pointer to the message line is passed which may lie outside the message window. The window is then scrolled to make that line the last line. This also updates libnonunix.cc, but I haven't been able to test those changes.
* Adding you.in_branch(string) as a lua function.Enne Walker2009-10-311-1/+0
| | | | | | This also removes you.where_are_you() so as not to require lua scripts to know the value of C++ enums. This change also fixes stricmp incorrectly falling through to strcmp on non-MSVC platforms.
* libunix.h: declare itoa and stricmp as extern "C", itoa returns char*Steven Noonan2009-10-101-2/+2
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-3/+0
|
* Generalized solution to the "disconnect at --more--" problem (e.g., disconnectzelgadis2009-07-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | at the more after "You have lost your religion!" to avoid the negative consequences of excommunication): when a HUP signal is received, instead of immediately saving the game, close the stdin stream, which will cause all of the Curses calls which normal block on key-presses to unblock, so that the code after a more() call will execute before the disconnected game is saved (which will happen in _input() in acr.cc). This only affects Curses (non-tiles/console) UNIX builds which have both USE_UNIX_SIGNALS and SIGHUP_SAVE defined. Exceptions to the above: * If HUP is received during a call to yesno() with safeanswer == 0, then the game will be saved immediately, since there's no way for the function to tell which answer is safe to give automatically. * If HUP is received while selecting the target for a controlled teleport then the teleport will be canceled, since otherwise a target other than the intended one might be the one under the cursor when the disconnect happened. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10443 c06c8d41-db1a-0410-9941-cceddc491573
* Put platform dependant crash handling code into crash-X.cc files, and linkzelgadis2009-01-221-4/+0
| | | | | | | against them in the make files like libunix/libgui/etc are. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8675 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented crash data reporting, though it's only some stubs on Windows andzelgadis2009-01-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | DOS. On UNIX with USE_UNIX_SIGNALS defined, when any crash causing signal happens it will dump to a file the current crawl_state, anything caught by the items and monsters scans, and level building info if the crash happened during level generation. Also, if crawl is linked against the GNU C library (and the exectuable is in ELF format) it will dump the stack trace. The code attempts to automatically detect the presence of glibc, but that might not work on all systems. This should work on OS X, since there's an OS X man page for the glibc functions that get the stack trace. Don't know if it would work with MinGW. Actually getting function names for the stack trace requires the use of the "-rdynamic" linker option, which increases the size of the stripped executable by 27% (yikes!), but still prints the function names even when stripped. All of the function names in the stack trace are mangled C++ ones, but that shouldn't be too much of a problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8532 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-0/+7
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* [1896775][1896772] Charset handling fixes (Paul Du Bois).dshaligram2008-02-211-3/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3451 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-1/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* Merge cset_adjust prototype fix from 0.3.dshaligram2007-12-041-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2996 c06c8d41-db1a-0410-9941-cceddc491573
* Merged fix for IBM graphics glitches on Unix from 0.3 (2990-2991).dshaligram2007-12-031-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2992 c06c8d41-db1a-0410-9941-cceddc491573
* Minor view code cleanup; this ought to fix the DOS redraw issues as well.dshaligram2007-10-271-0/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2629 c06c8d41-db1a-0410-9941-cceddc491573
* Added glyphs_connected and friends for maps to test connectedness of pointsdshaligram2007-06-271-1/+0
| | | | | | | | after map transforms are applied. Fixed conflicts in bison grammar. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1669 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental mouse support for ncurses (enable with mouse_input=yes indshaligram2007-06-201-0/+2
| | | | | | .crawlrc). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1610 c06c8d41-db1a-0410-9941-cceddc491573
* Added support for Unicode characters in the map display with ncursesw (enableddshaligram2007-06-071-0/+1
| | | | | | | | | | | | by setting UNICODE_GLYPHS=y in makefile.unix). Removed the (1,1) offset between map and grid. Both map and grid are now in sync. Store object indexes instead of raw characters in env.map so that players can change charsets and have the display update immediately. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1552 c06c8d41-db1a-0410-9941-cceddc491573
* [1657502] Added use_fake_cursor option to make Crawl draw a cursor for Unixdshaligram2007-03-111-0/+1
| | | | | | | | | | | | terminals that cannot draw cursors on black spaces or darkgrey areas. May need some work, since the fake cursor tends to leave artifacts on the scrolling edge. Removed the +1 X offset to the viewport. Fixed crash when monster wielding a weapon of orc slaying hits player (Erik). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1016 c06c8d41-db1a-0410-9941-cceddc491573
* Fix compile breaking on cygwin's massively odd gcc 3.4.4.dshaligram2007-02-081-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@940 c06c8d41-db1a-0410-9941-cceddc491573
* First steps towards making delay_message_clear useful. The intent is to use adshaligram2007-01-121-2/+7
| | | | | | | | | | | | scrolling message window and show --more-- only when the message window is filled with new messages since the last mesclr (as suggested by Eidolos/doy on ##crawl). This currently works only on curses (breaks the DOS and Windows compiles), I'm working on fixing that. There are also some cursor glitches with prompts at the bottom of the message window that I need to fix. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@837 c06c8d41-db1a-0410-9941-cceddc491573
* An attempt at a more comprehensive fix for cursor inconsistencies betweendshaligram2006-12-171-3/+2
| | | | | | platforms. We'll probably need to tweak this further. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@659 c06c8d41-db1a-0410-9941-cceddc491573
* Restore old cursor behaviour on Windows, with little icky hooks to make it ↵dshaligram2006-11-221-0/+3
| | | | | | controllable for the newgame slider menu. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@459 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-2/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up a mistake in the SVN import.nlanza2006-08-131-0/+53
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573