Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -220,12 +220,12 @@ curses_copy_of(const char *s)
|
||||
{
|
||||
if (!s)
|
||||
s = "";
|
||||
return strcpy((char *) alloc((unsigned) (strlen(s) + 1)), s);
|
||||
return dupstr(s);
|
||||
}
|
||||
|
||||
|
||||
/* Determine the number of lines needed for a string for a dialog window
|
||||
of the given width */
|
||||
of the given width */
|
||||
|
||||
int
|
||||
curses_num_lines(const char *str, int width)
|
||||
@@ -588,7 +588,7 @@ curses_view_file(const char *filename, boolean must_exist)
|
||||
|
||||
wid = curses_get_wid(NHW_MENU);
|
||||
curses_create_nhmenu(wid);
|
||||
identifier = malloc(sizeof (anything));
|
||||
identifier = (anything *) alloc(sizeof (anything));
|
||||
identifier->a_void = NULL;
|
||||
|
||||
while (dlb_fgets(buf, BUFSZ, fp) != NULL) {
|
||||
@@ -632,7 +632,7 @@ curses_get_count(int first_digit)
|
||||
current_count = LARGEST_INT;
|
||||
}
|
||||
|
||||
pline("Count: %ld", current_count);
|
||||
custompline(SUPPRESS_HISTORY, "Count: %ld", current_count);
|
||||
current_char = curses_read_char();
|
||||
}
|
||||
|
||||
@@ -647,13 +647,17 @@ curses_get_count(int first_digit)
|
||||
|
||||
|
||||
/* Convert the given NetHack text attributes into the format curses
|
||||
understands, and return that format mask. */
|
||||
understands, and return that format mask. */
|
||||
|
||||
int
|
||||
curses_convert_attr(int attr)
|
||||
{
|
||||
int curses_attr;
|
||||
|
||||
/* first, strip off control flags masked onto the display attributes
|
||||
(caller should have already done this...) */
|
||||
attr &= ~(ATR_URGENT | ATR_NOHISTORY);
|
||||
|
||||
switch (attr) {
|
||||
case ATR_NONE:
|
||||
curses_attr = A_NORMAL;
|
||||
|
||||
Reference in New Issue
Block a user