static int send_raw_mouse;
-static char *app_name = "pterm";
+static const char *app_name = "pterm";
static void start_backend(struct gui_data *inst);
static void exit_callback(void *vinst);
return XGetDefault(GDK_DISPLAY(), app_name, key);
}
-void connection_fatal(void *frontend, char *p, ...)
+void connection_fatal(void *frontend, const char *p, ...)
{
struct gui_data *inst = (struct gui_data *)frontend;
}
/* Dummy routine, only required in plink. */
-void ldisc_update(void *frontend, int echo, int edit)
+void frontend_echoedit_update(void *frontend, int echo, int edit)
{
}
return TRUE; /* do respond to incoming EOF with outgoing */
}
-int get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
+int get_userpass_input(prompts_t *p, const unsigned char *in, int inlen)
{
struct gui_data *inst = (struct gui_data *)p->frontend;
int ret;
* NetHack keypad mode.
*/
if (nethack_mode) {
- char *keys = NULL;
+ const char *keys = NULL;
switch (event->keyval) {
case GDK_KP_1: case GDK_KP_End: keys = "bB\002"; break;
case GDK_KP_2: case GDK_KP_Down: keys = "jJ\012"; break;
return ret;
}
-void modalfatalbox(char *p, ...)
+void modalfatalbox(const char *p, ...)
{
va_list ap;
fprintf(stderr, "FATAL ERROR: ");
exit(1);
}
-void cmdline_error(char *p, ...)
+void cmdline_error(const char *p, ...)
{
va_list ap;
fprintf(stderr, "%s: ", appname);
#define SECOND_PASS_ONLY { if (!do_everything) continue; }
while (--argc > 0) {
- char *p = *++argv;
+ const char *p = *++argv;
int ret;
/*
struct gui_data *inst = (struct gui_data *)data;
term_pwron(inst->term, TRUE);
if (inst->ldisc)
- ldisc_send(inst->ldisc, NULL, 0, 0);
+ ldisc_echoedit_update(inst->ldisc);
}
void copy_all_menuitem(GtkMenuItem *item, gpointer data)
*/
if (inst->ldisc) {
ldisc_configure(inst->ldisc, inst->conf);
- ldisc_send(inst->ldisc, NULL, 0, 0);
+ ldisc_echoedit_update(inst->ldisc);
}
/* Pass new config data to the terminal */
term_reconfig(inst->term, inst->conf);
start_backend(inst);
- ldisc_send(inst->ldisc, NULL, 0, 0);/* cause ldisc to notice changes */
+ ldisc_echoedit_update(inst->ldisc); /* cause ldisc to notice changes */
/* now we're reday to deal with the child exit handler being
* called */