add a macro to ease conditional testing based on active window port
Add WINDOWPORT macro
example:
if (WINDOWPORT("tty"))
pline("Look at me, I'm on tty at the moment!");
This commit is contained in:
@@ -260,6 +260,11 @@ struct wc_Opt {
|
||||
unsigned long wc_bit;
|
||||
};
|
||||
|
||||
/* Macro for the currently active Window Port whose function
|
||||
pointers have been loaded */
|
||||
#define WINDOWPORT(wn) \
|
||||
(windowprocs.name && !strncmpi((wn), windowprocs.name, strlen((wn))))
|
||||
|
||||
/* role selection by player_selection(); this ought to be in the core... */
|
||||
#define RS_NAME 0
|
||||
#define RS_ROLE 1
|
||||
|
||||
Reference in New Issue
Block a user