E boolean FDECL(get_menu_coloring, (char *, int *, int *));
E void NDECL(free_menu_coloring);
E boolean FDECL(msgtype_parse_add, (char *));
-E int FDECL(msgtype_type, (const char *));
+E int FDECL(msgtype_type, (const char *, BOOLEAN_P));
E void NDECL(msgtype_free);
/* ### pager.c ### */
}
int
-msgtype_type(msg)
+msgtype_type(msg, norepeat)
const char *msg;
+boolean norepeat; /* called from Norep(via pline) */
{
struct plinemsg_type *tmp = plinemsg_types;
return tmp->msgtype;
tmp = tmp->next;
}
- return MSGTYP_NORMAL;
+ return norepeat ? MSGTYP_NOREP : MSGTYP_NORMAL;
}
int
iflags.last_msg = PLNMSG_UNKNOWN;
return;
}
-#ifndef MAC
- if (no_repeat && !strcmp(line, toplines))
+
+ msgtyp = msgtype_type(line, no_repeat);
+ if (msgtyp == MSGTYP_NOSHOW
+ || (msgtyp == MSGTYP_NOREP && !strcmp(line, prevmsg)))
return;
-#endif /* MAC */
if (vision_full_recalc)
vision_recalc(0);
if (u.ux)
flush_screen(1); /* %% */
- msgtyp = msgtype_type(line);
- if (msgtyp == MSGTYP_NOSHOW) return;
- if (msgtyp == MSGTYP_NOREP && !strcmp(line, prevmsg)) return;
+
putstr(WIN_MESSAGE, 0, line);
/* this gets cleared after every pline message */
iflags.last_msg = PLNMSG_UNKNOWN;
- strncpy(prevmsg, line, BUFSZ);
- if (msgtyp == MSGTYP_STOP) display_nhwindow(WIN_MESSAGE, TRUE); /* --more-- */
+ strncpy(prevmsg, line, BUFSZ), prevmsg[BUFSZ - 1] = '\0';
+ if (msgtyp == MSGTYP_STOP)
+ display_nhwindow(WIN_MESSAGE, TRUE); /* --more-- */
#if !(defined(USE_STDARG) || defined(USE_VARARGS))
/* provide closing brace for the nested block