]> granicus.if.org Git - nethack/commit
strdup/dupstr (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 29 Jan 2012 03:00:17 +0000 (03:00 +0000)
committernethack.rankin <nethack.rankin>
Sun, 29 Jan 2012 03:00:17 +0000 (03:00 +0000)
commit061d8ec947429f7d0e35816bd8f2179088e747a1
treedb2836a5e4449cb447a5ec25701227f52a8fb174
parentc76362833ad2017833fe2411170ea075912858bf
strdup/dupstr (trunk only)

     Add dupstr() as a substitute for strdup() so that out-of-memory
handling will be consistent with the rest of nethack, and make it aware
of nethack's heap logging.  It's treated like alloc() so that its caller
can be logged for NH_HEAPLOG.

     I put it into use in a few places, but there are lots more candidates
besides the existing calls to strdup() that should be replaced.
include/global.h
src/alloc.c
src/do.c
src/do_name.c
src/eat.c