Give the window-port side of *_update_inventory() an argument.
Calls in the core still omit that; invent.c's update_inventory()
is the only place that cares.
display effect. on MSDOS without the termcap
lib, whether or not to pause for visual effect.
-Boolean option for Amiga, or for others if ALTMETA was set at compile time:
-altmeta For Amiga, treat Alt+key as Meta+key. [True]
+Boolean option if ALTMETA was set at compile time:
altmeta For unix and VMS, treat two character sequence
"ESC c" as M-c (Meta+c, 8th bit set) when nethack [False]
obtains a command from player's keyboard.
menu_* specify single character accelerators for menu commands.
Here is a list of all commands with their default keystroke
followed by a list of window-ports that implement them:
- 'x' is X11, 't' is tty, 'g' is Gem, 'a' is Amiga.
- menu_deselect_all deselect all items in a menu [-](xtga)
- menu_deselect_page deselect all items on this menu page [\](tga)
- menu_first_page jump to the first page in a menu [^](tga)
- menu_invert_all invert all items in a menu [@](xtga)
- menu_invert_page invert all items on this menu page [~](tga)
- menu_last_page jump to the last page in a menu [|](tga)
- menu_next_page goto the next menu page [>](tga)
- menu_previous_page goto the previous menu page [<](tga)
- menu_search search for a menu item [:](xtga)
- menu_select_all select all items in a menu [.](xtga)
- menu_select_page select all items on this menu page [,](tga)
+ (t is tty, c is curses, w is Windows GUI, x is X11, q is Qt)
+ menu_first_page jump to the first page in a menu [^](tcwxq)
+ menu_last_page jump to the last page in a menu [|](tcwxq)
+ menu_next_page advance to the next menu page [>](tcwxq)
+ menu_previous_page back up to the previous menu page [<](tcwxq)
+ menu_select_all select all items in a menu [.](tcwxq)
+ menu_select_page select all items on this menu page [,](tcwq)
+ menu_deselect_all deselect all items in a menu [-](tcwxq)
+ menu_deselect_page deselect all items on this menu page [\](tcwq)
+ menu_invert_all invert all items in a menu [@](tcwxq)
+ menu_invert_page invert all items on this menu page [~](tcwq)
+ menu_search prompt for target text and invert [:](tcwxq)
+ items which match that
msghistory number of top line messages to save [20]
name the name of your character [defaults to username on multi-
user systems, asks "who are you?" on single-user systems or if
display_file(str, boolean complain)
-- Display the file named str. Complain about missing files
iff complain is TRUE.
-update_inventory()
+update_inventory(arg)
-- Indicate to the window port that the inventory has been
changed.
-- Merely calls display_inventory() for window-ports that
leave the window up, otherwise empty.
+ -- 'arg' is not used yet
doprev_message()
-- Display previous messages. Used by the ^P command.
-- On the tty-port this scrolls WIN_MESSAGE back one line.
#define DEFAULT_LINES_DISPLAYED 12 /* # of lines displayed message window */
#define MAX_HISTORY 60 /* max history saved on message window */
+/* flags for X11_yn_function_core() */
+#define YN_NORMAL 0U /* no flags */
+#define YN_NO_LOGMESG 1U /* suppress echo of prompt+response to message window
+ * and dumplog message history */
+
/* Window variables (winX.c). */
extern struct xwindow window_list[MAX_WINDOWS];
extern XtAppContext app_context; /* context of application */
char, int, const char *, unsigned int);
extern void X11_end_menu(winid, const char *);
extern int X11_select_menu(winid, int, MENU_ITEM_P **);
-extern void X11_update_inventory(void);
+extern void X11_update_inventory(int);
extern void X11_mark_synch(void);
extern void X11_wait_synch(void);
#ifdef CLIPPING
extern int X11_nh_poskey(int *, int *, int *);
extern void X11_nhbell(void);
extern int X11_doprev_message(void);
+extern char X11_yn_function_core(const char *, const char *, char, unsigned);
extern char X11_yn_function(const char *, const char *, char);
extern void X11_getlin(const char *, char *);
extern int X11_get_ext_cmd(void);
const char *str, unsigned int itemflags);
extern void curses_end_menu(winid wid, const char *prompt);
extern int curses_select_menu(winid wid, int how, MENU_ITEM_P **selected);
-extern void curses_update_inventory(void);
+extern void curses_update_inventory(int);
extern void curses_mark_synch(void);
extern void curses_wait_synch(void);
extern void curses_cliparound(int x, int y);
void (*win_end_menu)(winid, const char *);
int (*win_select_menu)(winid, int, MENU_ITEM_P **);
char (*win_message_menu)(char, int, const char *);
- void (*win_update_inventory)(void);
+ void (*win_update_inventory)(int);
void (*win_mark_synch)(void);
void (*win_wait_synch)(void);
#ifdef CLIPPING
extern void safe_end_menu(winid, const char *);
extern int safe_select_menu(winid, int, MENU_ITEM_P **);
extern char safe_message_menu(char, int, const char *);
-extern void safe_update_inventory(void);
+extern void safe_update_inventory(int);
extern void safe_mark_synch(void);
extern void safe_wait_synch(void);
#ifdef CLIPPING
E void tty_end_menu(winid, const char *);
E int tty_select_menu(winid, int, MENU_ITEM_P **);
E char tty_message_menu(char, int, const char *);
-E void tty_update_inventory(void);
+E void tty_update_inventory(int);
E void tty_mark_synch(void);
E void tty_wait_synch(void);
#ifdef CLIPPING
return;
/*
- * Ought to check (windowprocs.wincap2 & WC2_PERM_INVENT) here....
+ * Ought to check (windowprocs.wincap & WC_PERM_INVENT) here....
*
* We currently don't skip this call when iflags.perm_invent is False
* because curses uses that to disable a previous perm_invent window
* (after toggle via 'O'; perhaps the options code should handle that).
*/
- (*windowprocs.win_update_inventory)();
+ (*windowprocs.win_update_inventory)(0);
}
/* should of course only be called for things in invent */
hup_curs, hup_putstr, hup_putstr, /* putmixed */
hup_display_file, hup_void_fdecl_winid_ulong, /* start_menu */
hup_add_menu, hup_end_menu, hup_select_menu, genl_message_menu,
- hup_void_ndecl, /* update_inventory */
+ hup_void_fdecl_int, /* update_inventory */
hup_void_ndecl, /* mark_synch */
hup_void_ndecl, /* wait_synch */
#ifdef CLIPPING
hup_cliparound,
#endif
#ifdef POSITIONBAR
- (void (*)(char *)) hup_void_fdecl_constchar_p,
- /* update_positionbar */
+ (void (*)(char *)) hup_void_fdecl_constchar_p, /* update_positionbar */
#endif
hup_print_glyph,
hup_void_fdecl_constchar_p, /* raw_print */
return window->SelectMenu(how,menu_list);
}
-void NetHackQtBind::qt_update_inventory()
+void NetHackQtBind::qt_update_inventory(int arg UNUSED)
{
if (main)
main->updateInventory(); // update the paper doll inventory subset
+
/* doesn't work yet
if (g.program_state.something_worth_saving && iflags.perm_invent)
display_inventory(NULL, false);
const char *str, unsigned int itemflags);
static void qt_end_menu(winid wid, const char *prompt);
static int qt_select_menu(winid wid, int how, MENU_ITEM_P **menu_list);
- static void qt_update_inventory();
+ static void qt_update_inventory(int);
static void qt_mark_synch();
static void qt_wait_synch();
void (*input_func)(Widget, XEvent *, String *, Cardinal *);
int click_x, click_y, click_button; /* Click position on a map window */
/* (filled by set_button_values()). */
-int updated_inventory;
+int updated_inventory; /* used to indicate perm_invent updating */
static int (*old_error_handler) (Display *, XErrorEvent *);
}
}
+/* display persistent inventory in its own window */
void
-X11_update_inventory(void)
+X11_update_inventory(int arg UNUSED)
{
struct xwindow *wp = 0;
/* persistent inventory is up but perm_invent is off, take it down */
x11_no_perminv(wp);
}
+ return;
}
/* The current implementation has all of the saved lines on the screen. */
XtDestroyWidget(yn_popup), yn_popup = (Widget) 0;
}
-/* X11-specific edition of yn_function(), the routine called by the core
- to show a prompt and get a single keystroke answer, often 'y' vs 'n' */
+/* guts of the X11_yn_function(), not to be confused with core code;
+ requires an extra argument: ynflags */
char
-X11_yn_function(
+X11_yn_function_core(
const char *ques, /* prompt text */
const char *choices, /* allowed response chars; any char if Null */
- char def) /* default if user hits <space> or <return> */
+ char def, /* default if user hits <space> or <return> */
+ unsigned ynflags) /* flags; currently just log-it or not */
{
static XFontStruct *yn_font = 0;
static Dimension yn_minwidth = 0;
char buf[BUFSZ], buf2[BUFSZ];
Arg args[4];
Cardinal num_args;
+ boolean suppress_logging = (ynflags & YN_NO_LOGMESG) != 0U;
yn_choices = choices; /* set up globals for callback to use */
yn_def = def;
nh_XtPopdown(yn_popup); /* this removes the event grab */
}
- char *p = trimspaces(buf); /* remove !slow's extra whitespace */
- pline("%s %s", p, (yn_return == '\033') ? "ESC" : visctrl(yn_return));
+ if (!suppress_logging) {
+ char *p = trimspaces(buf); /* remove !slow's extra whitespace */
+
+ pline("%s %s", p, (yn_return == '\033') ? "ESC" : visctrl(yn_return));
+ }
return yn_return;
}
+/* X11-specific edition of yn_function(), the routine called by the core
+ to show a prompt and get a single key answer, often 'y' vs 'n' */
+char
+X11_yn_function(
+ const char *ques, /* prompt text */
+ const char *choices, /* allowed response chars; any char if Null */
+ char def) /* default if user hits <space> or <return> */
+{
+ char res = X11_yn_function_core(ques, choices, def, YN_NORMAL);
+
+ return res;
+}
+
/* used when processing window-capability-specific run-time options;
we support toggling tiles on and off via iflags.wc_tiled_map */
void
if (!strcmp(pref, "tiled_map")) {
if (WIN_MAP != WIN_ERR)
display_map_window(&window_list[WIN_MAP]);
+ } else if (!strcmp(pref, "perm_invent")) {
+ ; /* TODO... */
}
}
}
void
-chainin_update_inventory()
+chainin_update_inventory(int arg)
{
- (*cibase->nprocs->win_update_inventory)(cibase->ndata);
+ (*cibase->nprocs->win_update_inventory)(cibase->ndata, arg);
}
void
}
void
-chainout_update_inventory(vp)
-void *vp;
+chainout_update_inventory(void *vp, int arg)
{
struct chainout_data *tdp = vp;
- (*tdp->nprocs->win_update_inventory)();
+ (*tdp->nprocs->win_update_inventory)(arg);
}
void
}
void
-trace_update_inventory(vp)
-void *vp;
+trace_update_inventory(void *vp, int arg)
{
struct trace_data *tdp = vp;
- fprintf(wc_tracelogf, "%supdate_inventory()\n", INDENT);
+ fprintf(wc_tracelogf, "%supdate_inventory(%d)\n", INDENT, arg);
PRE;
- (*tdp->nprocs->win_update_inventory)(tdp->ndata);
+ (*tdp->nprocs->win_update_inventory)(tdp->ndata, arg);
POST;
}
const char *prompt; /* Menu prompt text */
nhmenu_item *entries; /* Menu entries */
int num_entries; /* Number of menu entries */
- int num_pages; /* Number of display pages for entry */
+ int num_pages; /* Number of display pages for menu */
int height; /* Window height of menu */
int width; /* Window width of menu */
unsigned long mbehavior; /* menu flags */
boolean reuse_accels; /* Non-unique accelerators per page */
boolean bottom_heavy; /* display multi-page menu starting at end */
- struct nhm *prev_menu; /* Pointer to previous entry */
- struct nhm *next_menu; /* Pointer to next entry */
+ struct nhm *prev_menu; /* Pointer to previous menu */
+ struct nhm *next_menu; /* Pointer to next menu */
} nhmenu;
typedef enum menu_op_type {
return NULL; /* Not found */
}
-
static char
menu_get_accel(boolean first)
{
wrefresh(win);
}
+/* split out from menu_get_selections() so that perm_invent scrolling
+ can be controlled from outside the normal menu activity */
+boolean
+curs_nonselect_menu_action(WINDOW *win, void *menu_v, int how,
+ int curletter, int *curpage_p,
+ char selectors[256], int *num_selected_p)
+{
+ nhmenu_item *menu_item_ptr;
+ nhmenu *menu = (nhmenu *) menu_v;
+ boolean dismiss = FALSE;
+ int menucmd = (curletter <= 0 || curletter >= 255) ? curletter
+ : (int) (uchar) map_menu_cmd(curletter);
+
+ switch (menucmd) {
+ case KEY_ESC:
+ *num_selected_p = -1;
+ dismiss = TRUE;
+ break;
+ case '\n':
+ case '\r':
+ dismiss = TRUE;
+ break;
+#ifdef NCURSES_MOUSE_VERSION
+ case KEY_MOUSE: {
+ MEVENT mev;
+
+ if (getmouse(&mev) == OK && how != PICK_NONE) {
+ if (wmouse_trafo(win, &mev.y, &mev.x, FALSE)) {
+ int y = mev.y;
+
+ menu_item_ptr = get_menuitem_y(menu, win, *curpage_p, y);
+
+ if (menu_item_ptr) {
+ if (how == PICK_ONE) {
+ menu_clear_selections(menu);
+ menu_select_deselect(win, menu_item_ptr,
+ SELECT, *curpage_p);
+ *num_selected_p = 1;
+ dismiss = TRUE;
+ } else {
+ menu_select_deselect(win, menu_item_ptr,
+ INVERT, *curpage_p);
+ }
+ }
+ }
+ }
+ break;
+ } /* case KEY_MOUSE */
+#endif /*NCURSES_MOUSE_VERSION*/
+ case KEY_RIGHT:
+ case KEY_NPAGE:
+ case MENU_NEXT_PAGE:
+ case ' ':
+ if (*curpage_p < menu->num_pages) {
+ ++(*curpage_p);
+ menu_display_page(menu, win, *curpage_p, selectors);
+ } else if (menucmd == ' ') {
+ dismiss = TRUE;
+ break;
+ }
+ break;
+ case KEY_LEFT:
+ case KEY_PPAGE:
+ case MENU_PREVIOUS_PAGE:
+ if (*curpage_p > 1) {
+ --(*curpage_p);
+ menu_display_page(menu, win, *curpage_p, selectors);
+ }
+ break;
+ case KEY_END:
+ case MENU_LAST_PAGE:
+ if (*curpage_p != menu->num_pages) {
+ *curpage_p = menu->num_pages;
+ menu_display_page(menu, win, *curpage_p, selectors);
+ }
+ break;
+ case KEY_HOME:
+ case MENU_FIRST_PAGE:
+ if (*curpage_p != 1) {
+ *curpage_p = 1;
+ menu_display_page(menu, win, *curpage_p, selectors);
+ }
+ break;
+ case MENU_SEARCH: {
+ char search_key[BUFSZ];
+
+ search_key[0] = '\0';
+ curses_line_input_dialog("Search for:", search_key, BUFSZ);
+
+ refresh();
+ touchwin(win);
+ wrefresh(win);
+
+ if (!*search_key)
+ break;
+
+ menu_item_ptr = menu->entries;
+
+ while (menu_item_ptr != NULL) {
+ if (menu_item_ptr->identifier.a_void != NULL
+ && strstri(menu_item_ptr->str, search_key)) {
+ if (how == PICK_ONE) {
+ menu_clear_selections(menu);
+ menu_select_deselect(win, menu_item_ptr,
+ SELECT, *curpage_p);
+ *num_selected_p = 1;
+ dismiss = TRUE;
+ break;
+ } else {
+ menu_select_deselect(win, menu_item_ptr,
+ INVERT, *curpage_p);
+ }
+ }
+ menu_item_ptr = menu_item_ptr->next_item;
+ }
+
+ menu_item_ptr = menu->entries;
+ break;
+ } /* case MENU_SEARCH */
+ default:
+ if (how == PICK_NONE) {
+ *num_selected_p = 0;
+ dismiss = TRUE;
+ break;
+ }
+ }
+
+ return dismiss;
+}
static int
-menu_get_selections(WINDOW * win, nhmenu *menu, int how)
+menu_get_selections(WINDOW *win, nhmenu *menu, int how)
{
int curletter, menucmd;
int count = -1;
int curpage = !menu->bottom_heavy ? 1 : menu->num_pages;
int num_selected = 0;
boolean dismiss = FALSE;
- char search_key[BUFSZ], selectors[256];
+ char selectors[256];
nhmenu_item *menu_item_ptr = menu->entries;
menu_display_page(menu, win, curpage, selectors);
}
if (curletter <= 0 || curletter >= 256 || !selectors[curletter]) {
- menucmd = (curletter <= 0 || curletter >= 255) ? curletter
- : (int) (uchar) map_menu_cmd(curletter);
- switch (menucmd) {
- case KEY_ESC:
- num_selected = -1;
- dismiss = TRUE;
- break;
- case '\n':
- case '\r':
- dismiss = TRUE;
- break;
-#ifdef NCURSES_MOUSE_VERSION
- case KEY_MOUSE: {
- MEVENT mev;
-
- if (getmouse(&mev) == OK && how != PICK_NONE) {
- if (wmouse_trafo(win, &mev.y, &mev.x, FALSE)) {
- int y = mev.y;
-
- menu_item_ptr = get_menuitem_y(menu, win, curpage, y);
-
- if (menu_item_ptr) {
- if (how == PICK_ONE) {
- menu_clear_selections(menu);
- menu_select_deselect(win, menu_item_ptr,
- SELECT, curpage);
- num_selected = 1;
- dismiss = TRUE;
- } else {
- menu_select_deselect(win, menu_item_ptr,
- INVERT, curpage);
- }
- }
- }
- }
- }
- break;
-#endif /*NCURSES_MOUSE_VERSION*/
- case KEY_RIGHT:
- case KEY_NPAGE:
- case MENU_NEXT_PAGE:
- case ' ':
- if (curpage < menu->num_pages) {
- curpage++;
- menu_display_page(menu, win, curpage, selectors);
- } else if (curletter == ' ') {
- dismiss = TRUE;
- break;
- }
- break;
- case KEY_LEFT:
- case KEY_PPAGE:
- case MENU_PREVIOUS_PAGE:
- if (curpage > 1) {
- curpage--;
- menu_display_page(menu, win, curpage, selectors);
- }
- break;
- case KEY_END:
- case MENU_LAST_PAGE:
- if (curpage != menu->num_pages) {
- curpage = menu->num_pages;
- menu_display_page(menu, win, curpage, selectors);
- }
- break;
- case KEY_HOME:
- case MENU_FIRST_PAGE:
- if (curpage != 1) {
- curpage = 1;
- menu_display_page(menu, win, curpage, selectors);
- }
- break;
- case MENU_SEARCH:
- search_key[0] = '\0';
- curses_line_input_dialog("Search for:", search_key, BUFSZ);
-
- refresh();
- touchwin(win);
- wrefresh(win);
-
- if (!*search_key)
- break;
-
- menu_item_ptr = menu->entries;
-
- while (menu_item_ptr != NULL) {
- if (menu_item_ptr->identifier.a_void != NULL
- && strstri(menu_item_ptr->str, search_key)) {
- if (how == PICK_ONE) {
- menu_clear_selections(menu);
- menu_select_deselect(win, menu_item_ptr,
- SELECT, curpage);
- num_selected = 1;
- dismiss = TRUE;
- break;
- } else {
- menu_select_deselect(win, menu_item_ptr,
- INVERT, curpage);
- }
- }
-
- menu_item_ptr = menu_item_ptr->next_item;
- }
-
- menu_item_ptr = menu->entries;
- break;
- default:
- if (how == PICK_NONE) {
- num_selected = 0;
- dismiss = TRUE;
- break;
- }
- }
+ dismiss = curs_nonselect_menu_action(win, (void *) menu, how,
+ curletter, &curpage,
+ selectors, &num_selected);
+ if (num_selected == -1)
+ return -1;
}
menu_item_ptr = menu->entries;
return num_selected;
}
-
/* Select, deselect, or toggle selected for the given menu entry.
For search operations, the toggled entry might be on a different
page than the one currently shown. */
int curses_display_nhmenu(winid wid, int how, MENU_ITEM_P **_selected);
boolean curses_menu_exists(winid wid);
void curses_del_menu(winid, boolean);
+boolean curs_nonselect_menu_action(WINDOW *win, void *menu, int how,
+ int curletter, int *curpage_p,
+ char selectors[256], int *num_selected_p);
#endif /* CURSDIAL_H */
}
void
-curses_update_inventory(void)
+curses_update_inventory(int arg UNUSED)
{
- /* Don't do anything if perm_invent is off unless we
- changed the option. */
+ /* Don't do anything if perm_invent is off unless it was on and
+ player just changed the option. */
if (!iflags.perm_invent) {
if (curses_get_nhwin(INV_WIN)) {
curs_reset_windows(TRUE, FALSE);
struct window_procs safe_procs = {
"safe-startup", 0L, 0L,
- {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
- safe_init_nhwindows, safe_player_selection, safe_askname, safe_get_nh_event,
+ {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
+ safe_init_nhwindows, safe_player_selection, safe_askname,
+ safe_get_nh_event,
safe_exit_nhwindows, safe_suspend_nhwindows, safe_resume_nhwindows,
safe_create_nhwindow, safe_clear_nhwindow, safe_display_nhwindow,
safe_destroy_nhwindow, safe_curs, safe_putstr, safe_putmixed,
safe_display_file, safe_start_menu, safe_add_menu, safe_end_menu,
- safe_select_menu, safe_message_menu, safe_update_inventory, safe_mark_synch,
+ safe_select_menu, safe_message_menu, safe_update_inventory,
+ safe_mark_synch,
safe_wait_synch,
#ifdef CLIPPING
safe_cliparound,
}
void
-safe_update_inventory(void)
+safe_update_inventory(int arg UNUSED)
{
return;
}
return ((how == PICK_ONE && morc == let) || morc == '\033') ? morc : '\0';
}
+/* update persistent inventory window */
void
-tty_update_inventory(void)
+tty_update_inventory(int arg UNUSED)
{
+ /* tty doesn't support persistent inventory window */
return;
}
window up, otherwise empty.
*/
void
-mswin_update_inventory(void)
+mswin_update_inventory(int arg)
{
- logDebug("mswin_update_inventory()\n");
+ logDebug("mswin_update_inventory(%d)\n", arg);
if (iflags.perm_invent && g.program_state.something_worth_saving
&& iflags.window_inited && WIN_INVEN != WIN_ERR)
display_inventory(NULL, FALSE);
mswin_print_glyph(winid wid, xchar x, xchar y,
const glyph_info *glyphinfo, const glyph_info *bkglyphinfo)
{
- logDebug("mswin_print_glyph(%d, %d, %d, %d, %d, %lu)\n", wid, x, y, glyphinfo->glyph, bkglyphinfo->glyph);
+ logDebug("mswin_print_glyph(%d, %d, %d, %d, %d, %lu)\n",
+ wid, x, y, glyphinfo->glyph, bkglyphinfo->glyph);
if ((wid >= 0) && (wid < MAXWINDOWS)
&& (GetNHApp()->windowlist[wid].win != NULL)) {
}
if (stricmp(pref, "perm_invent") == 0) {
- mswin_update_inventory();
+ mswin_update_inventory(0);
return;
}
}
DISABLE_WARNING_FORMAT_NONLITERAL
void
-mswin_status_update(int idx, genericptr_t ptr, int chg, int percent, int color, unsigned long *condmasks)
+mswin_status_update(int idx, genericptr_t ptr, int chg, int percent,
+ int color, unsigned long *condmasks)
{
long cond, *condptr = (long *) ptr;
char *text = (char *) ptr;
MSNHMsgUpdateStatus update_cmd_data;
int ochar, ci;
- logDebug("mswin_status_update(%d, %p, %d, %d, %x, %p)\n", idx, ptr, chg, percent, color, condmasks);
+ logDebug("mswin_status_update(%d, %p, %d, %d, %x, %p)\n",
+ idx, ptr, chg, percent, color, condmasks);
if (idx >= 0) {
const char *str, unsigned int itemflags);
void mswin_end_menu(winid wid, const char *prompt);
int mswin_select_menu(winid wid, int how, MENU_ITEM_P **selected);
-void mswin_update_inventory(void);
+void mswin_update_inventory(int);
void mswin_mark_synch(void);
void mswin_wait_synch(void);
void mswin_cliparound(int x, int y);