summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libunix.cc
Commit message (Collapse)AuthorAgeFilesLines
* Backport r10443: generalized way of dealing with "disconnect at --more--"zelgadis2009-07-281-7/+45
| | | | | | | hacks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10444 c06c8d41-db1a-0410-9941-cceddc491573
* Plug a couple of memory holes. Unfortunately, between libSDL andj-p-e-g2009-06-151-0/+1
| | | | | | | libfreetype there's loads of leakage that I can't do anything about. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9983 c06c8d41-db1a-0410-9941-cceddc491573
* Remove tabs.dolorous2009-05-301-17/+17
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9852 c06c8d41-db1a-0410-9941-cceddc491573
* Add spacing fixes.dolorous2009-04-301-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9709 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2151183]: SIGHUP with the range view annotator active maintainedharanp2009-02-081-0/+6
| | | | | | | | | | | the annotated colours when saving. Fixed by adding the ability to store arbitrary exit hooks to be executed on (unusual) shutdown; for now they're executed FIFO, but it should probably be LIFO with a stack. Anyway the only thing that uses this now is the range view annotator. Oh, and it only works if you're using libunix.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8999 c06c8d41-db1a-0410-9941-cceddc491573
* Added castamir's patch to fix 2550022. Seems to work.haranp2009-02-031-27/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8885 c06c8d41-db1a-0410-9941-cceddc491573
* Put platform dependant crash handling code into crash-X.cc files, and linkzelgadis2009-01-221-154/+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
* Limit crash handling recursion to being commented upon just once.zelgadis2009-01-181-1/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8544 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, forgot to put "#ifndef USE_TILE" around unixcurses_shutdown() (though itzelgadis2009-01-181-0/+2
| | | | | | | | probably doesn't make much difference if the game is in the process of crashing). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8536 c06c8d41-db1a-0410-9941-cceddc491573
* When dumping info upon a crash:zelgadis2009-01-181-6/+10
| | | | | | | | | | | | * For Unix builds, shut down curses in case the crash reporter can't open up a file and has to dump the crash directly to stderr. * Include all saved messages in the crash report. * Use EOL instead of \n or \r\n. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8535 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented crash data reporting, though it's only some stubs on Windows andzelgadis2009-01-181-0/+146
| | | | | | | | | | | | | | | | | | | | | | | 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
* Conditionalise define_key on ncurses as a token gesture to classic curses ↵dshaligram2009-01-101-0/+2
| | | | | | compatibility. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8381 c06c8d41-db1a-0410-9941-cceddc491573
* [2149330] Apply castamir's keypad patch.dshaligram2009-01-101-0/+85
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8380 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-16/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* Enable core dumps automatically for dgamelaunch builds ↵dshaligram2008-09-131-0/+13
| | | | | | (-DDGL_ENABLE_CORE_DUMP) to make it easier to track down crashes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6912 c06c8d41-db1a-0410-9941-cceddc491573
* 0.4->trunk r6788: Fixed bug where start time of games would go backward or ↵dshaligram2008-08-071-0/+8
| | | | | | forward in time on dgl builds (oops). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6789 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1870427: Max hp misreported if frail and rotted.j-p-e-g2008-07-061-9/+9
| | | | | | | | | | Fix 2002931: feature_item_brand not working No, it's not the important bugs, but at least these are bugs I can reproduce. :P git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6433 c06c8d41-db1a-0410-9941-cceddc491573
* Add spelling fixes where possible: "gray" -> "grey".dolorous2008-07-041-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6381 c06c8d41-db1a-0410-9941-cceddc491573
* Apply patch 1888160: Missing langinfo.h for UNICODEj-p-e-g2008-04-141-17/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4234 c06c8d41-db1a-0410-9941-cceddc491573
* Add a neutral monster brand (defaulting to darkgrey).j-p-e-g2008-03-211-6/+7
| | | | | | | | | | | | Of course we still need something like this for Tiles! Make Ctrl+Dir call close_door() if the square in question is a closed door. I've tested it, and found this change (suggested by dpeg) extremely convenient. Also fixed the information leak about an invisible monster blocking a doorway without time passing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3778 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed use_fake_cursor brokenness for DEC, fixed stringize_glyph mangling DEC ↵dshaligram2008-02-211-5/+7
| | | | | | if Crawl was built with Unicode support. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3452 c06c8d41-db1a-0410-9941-cceddc491573
* [1896775][1896772] Charset handling fixes (Paul Du Bois).dshaligram2008-02-211-44/+66
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3451 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1861017: add info on enchanting hides to enchant armour descriptionj-p-e-g2008-01-141-1/+1
| | | | | | | | | | | | | FR 1840678: upon failed sacrifice give hint on correct item class part of FR 1857701: Give a message when a weapon of returning does NOT return (and add a message_colour line in init.txt) Also, change Zin's donation messages to reflect the piety status the player will have once the piety pool has emptied into the actual piety, and modify descriptions of the good gods (by David). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3274 c06c8d41-db1a-0410-9941-cceddc491573
* Monsters get multilevel resists (incomplete). Monster data needs to bedshaligram2008-01-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | adjusted per monster to hand out the right resists. The current MR_RES_FIRE gives one level of resistance only. Added a real ghost structure, discarded the old ghost values array. Adjusted bones file format so bones will work out-of-the-box with Hearse. Breaks bones format, older bones will be rejected. Fixed some maps with bad DEPTHs. Added more safe answers in Y/N prompts, added a check to make it less likely that Crawl will spin in a tight loop reading input from a closed tty. (Experimental) !a will override existing foe of friendlies in LOS. Blademasters no longer pick up stuff to throw (Erik). Zombies of swimming things are also swimming things. Currently applies only to zombies explicitly placed in .des files, since fish zombies cannot be generated otherwise (can of worms). Morgue is now saved before showing the inventory and other boring end-of-game stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3231 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* Merged fix for IBM graphics glitches on Unix from 0.3 (2990-2991).dshaligram2007-12-031-2/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2992 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor whitespace and comment fixes.dolorous2007-12-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2986 c06c8d41-db1a-0410-9941-cceddc491573
* Allow UNICODE_LOCALE=. in makefile.unix to specify a setlocale(LC_ALL,"") ↵dshaligram2007-11-201-2/+5
| | | | | | call instead of forcing a specific locale (adapted from Guus' Debian patch). Also fixed some makefile.unix checks to strip variables that are prone to trailing spaces. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2885 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed level-map not showing column 79 if the term is 80 columns (bobbens).dshaligram2007-11-021-0/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2723 c06c8d41-db1a-0410-9941-cceddc491573
* Minor view code cleanup; this ought to fix the DOS redraw issues as well.dshaligram2007-10-271-0/+38
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2629 c06c8d41-db1a-0410-9941-cceddc491573
* Unicode support tweak: always set locale to what's specified in ↵dshaligram2007-10-041-1/+1
| | | | | | UNICODE_LOCALE, defaulting to en_US.UTF-8. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2322 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+1
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* Add trap_item_brand that behaves like stair_item_brand.j-p-e-g2007-09-131-0/+1
| | | | | | | Defaults to 'none'. (FR 1793669) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2083 c06c8d41-db1a-0410-9941-cceddc491573
* [1742338] Fixed Hell portals not being revealed correctly when the horn isdshaligram2007-06-301-1/+2
| | | | | | sounded. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1701 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental mouse support for ncurses (enable with mouse_input=yes indshaligram2007-06-201-1/+77
| | | | | | .crawlrc). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1610 c06c8d41-db1a-0410-9941-cceddc491573
* Handle terminal resize on Windows (brute force; Windows has fascinatinglydshaligram2007-06-191-1/+1
| | | | | | stupid ideas of when the terminal is actually resized). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1604 c06c8d41-db1a-0410-9941-cceddc491573
* Simplified SIGWINCH handling - Crawl only handles SIGWINCH if it's waiting fordshaligram2007-06-191-2/+0
| | | | | | | a command (i.e. sitting in the main play screen) since it appears that deferred handling causes ncurses strange problems. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1603 c06c8d41-db1a-0410-9941-cceddc491573
* Basic SIGWINCH handling for Unix. Still needs to handle some cases (resizingdshaligram2007-06-171-6/+47
| | | | | | the term in the level-map doesn't work right, for instance). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1593 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed compile breaking on Linux.dshaligram2007-06-101-0/+2
| | | | | | Orb guardians are no longer valid polymorph targets. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1570 c06c8d41-db1a-0410-9941-cceddc491573
* Tweaks to build with Unicode support on Mac OS. Unfortunately none of thedshaligram2007-06-101-0/+1
| | | | | | | | widely-used Mac terminal emulators has a clue on how to handle Unicode block characters (Terminal.app, iTerm, Terminator,...; they all suck), so Mac Unicode lovers will probably need to run X and urxvt or something along those lines. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1567 c06c8d41-db1a-0410-9941-cceddc491573
* When showing glyphs in messages (as in the tutorial), use stringize_glyph() todshaligram2007-06-081-3/+27
| | | | | | | | | convert Unicode glyphs to multibyte sequences. Added multibyte_strlen to calculate string lengths correctly when dealing with multibyte strings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1560 c06c8d41-db1a-0410-9941-cceddc491573
* Unicode builds were mangling IBM graphics, fixed.dshaligram2007-06-081-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1556 c06c8d41-db1a-0410-9941-cceddc491573
* Added support for Unicode characters in the map display with ncursesw (enableddshaligram2007-06-071-25/+96
| | | | | | | | | | | | 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
* [1699948] Allow changing the viewport size if you're using a larger terminaldshaligram2007-06-041-8/+5
| | | | | | | | | than 80x24. Also allow moving the PC around the viewport without scrolling the viewport if the viewport is large enough. This is not tested on DOS and Windows yet. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1524 c06c8d41-db1a-0410-9941-cceddc491573
* [1603676] Stairs override items on the same square for display purposes ifdshaligram2007-06-011-6/+7
| | | | | | | | stair_item_brand is set (defaults to reverse). Fixed compile error in clua.cc (oops). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1499 c06c8d41-db1a-0410-9941-cceddc491573
* Patches from debian package (Guus Sliepen.)haranp2007-04-161-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1325 c06c8d41-db1a-0410-9941-cceddc491573
* [1657502] Added use_fake_cursor option to make Crawl draw a cursor for Unixdshaligram2007-03-111-0/+38
| | | | | | | | | | | | 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-12/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@940 c06c8d41-db1a-0410-9941-cceddc491573