Add MSGTYPE config option

MSGTYPE allows the user to define how messages in the message
area behave. For example:

  MSGTYPE=stop "You swap places with "

would always make that message prompt for -more-.  Allowed types
are "show" (normal message), "hide" (do not show), "stop" (wait
for user), and "norep" (do not repeat message).

Adding this, because it's relatively simple, proven to work, and
it seemed to be the major thing betatesters felt was lacking when
compared to NAO.
This commit is contained in:
Pasi Kallinen
2015-05-27 18:29:12 +03:00
parent c447088538
commit f0eca282a8
9 changed files with 356 additions and 0 deletions

View File

@@ -395,6 +395,20 @@ struct autopickup_exception {
struct autopickup_exception *next;
};
struct plinemsg_type {
xchar msgtype; /* one of MSGTYP_foo */
struct nhregex *regex;
char *pattern;
struct plinemsg_type *next;
};
#define MSGTYP_NORMAL 0
#define MSGTYP_NOREP 1
#define MSGTYP_NOSHOW 2
#define MSGTYP_STOP 3
E struct plinemsg_type *plinemsg_types;
#ifdef PANICTRACE
E char *ARGV0;
#endif

View File

@@ -1638,6 +1638,9 @@ E int FDECL(sym_val, (char *));
E boolean FDECL(add_menu_coloring, (char *));
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 void NDECL(msgtype_free);
/* ### pager.c ### */