2 * Common pieces between the platform console frontend modules.
12 //const char console_abandoned_msg[] = "Connection abandoned.\n";
14 const SeatDialogPromptDescriptions
*console_prompt_descriptions(Seat
*seat
)
16 static const SeatDialogPromptDescriptions descs
= {
17 .hk_accept_action
= "hit Yes",
18 .hk_connect_once_action
= "hit No",
19 .hk_cancel_action
= "hit Cancel",
20 .hk_cancel_action_Participle
= "Hitting Cancel",
21 .weak_accept_action
= "hit Yes",
22 .weak_cancel_action
= "hit No",
27 bool console_batch_mode
= false;
30 * Error message and/or fatal exit functions, all based on
31 * console_print_error_msg which the platform front end provides.
33 void modalfatalbox(const char *fmt
, ...)
36 char *stuff
, morestuff
[100];
38 stuff
= dupvprintf(fmt
, ap
);
40 sprintf(morestuff
, "%.70s Fatal Error", appname
);
41 MessageBox(GetParentHwnd(), stuff
, morestuff
, MB_SYSTEMMODAL
| MB_ICONERROR
| MB_OK
);
46 void nonfatal(const char *fmt
, ...)
49 char *stuff
, morestuff
[100];
51 stuff
= dupvprintf(fmt
, ap
);
53 sprintf(morestuff
, "%.70s Error", appname
);
54 MessageBox(GetParentHwnd(), stuff
, morestuff
, MB_SYSTEMMODAL
| MB_ICONERROR
| MB_OK
);
58 void console_connection_fatal(Seat
*seat
, const char *msg
)
61 sprintf(morestuff
, "%.70s Fatal Error", appname
);
62 MessageBox(GetParentHwnd(), msg
, morestuff
, MB_SYSTEMMODAL
| MB_ICONERROR
| MB_OK
);
67 * Console front ends redo their select() or equivalent every time, so
68 * they don't need separate timer handling.
70 void timer_change_notify(unsigned long next
)