const int share_can_be_upstream = TRUE;
/* 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)
{
}
+int frontend_is_utf8(void *frontend)
+{
+ return ucsdata.line_codepage == CP_UTF8;
+}
+
char *get_ttymode(void *frontend, const char *mode)
{
return term_get_ttymode(term, mode);
* Protect our process
*/
{
-#ifndef UNPROTECT
+#if !defined UNPROTECT && !defined NO_SECURITY
char *error = NULL;
if (! setprocessacl(error)) {
- logevent(NULL, "Could not restrict process ACL: %s",
- error);
+ char *message = dupprintf("Could not restrict process ACL: %s",
+ error);
+ logevent(NULL, message);
+ sfree(message);
sfree(error);
}
#endif
AppendMenu(m, MF_SEPARATOR, 0, 0);
AppendMenu(m, MF_ENABLED, IDM_NEWSESS, "Ne&w Session...");
AppendMenu(m, MF_ENABLED, IDM_DUPSESS, "&Duplicate Session");
- AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT) savedsess_menu,
+ AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT_PTR) savedsess_menu,
"Sa&ved Sessions");
AppendMenu(m, MF_ENABLED, IDM_RECONF, "Chan&ge Settings...");
AppendMenu(m, MF_SEPARATOR, 0, 0);
saved_menu = new_menu; /* XXX lame stacking */
new_menu = CreatePopupMenu();
AppendMenu(saved_menu, MF_POPUP | MF_ENABLED,
- (UINT) new_menu, specials[i].name);
+ (UINT_PTR) new_menu, specials[i].name);
break;
case TS_EXITMENU:
nesting--;
for (j = 0; j < lenof(popup_menus); j++) {
if (specials_menu) {
/* XXX does this free up all submenus? */
- DeleteMenu(popup_menus[j].menu, (UINT)specials_menu, MF_BYCOMMAND);
+ DeleteMenu(popup_menus[j].menu, (UINT_PTR)specials_menu,
+ MF_BYCOMMAND);
DeleteMenu(popup_menus[j].menu, IDM_SPECIALSEP, MF_BYCOMMAND);
}
if (new_menu) {
InsertMenu(popup_menus[j].menu, IDM_SHOWLOG,
MF_BYCOMMAND | MF_POPUP | MF_ENABLED,
- (UINT) new_menu, "S&pecial Command");
+ (UINT_PTR) new_menu, "S&pecial Command");
InsertMenu(popup_menus[j].menu, IDM_SHOWLOG,
MF_BYCOMMAND | MF_SEPARATOR, IDM_SPECIALSEP, 0);
}
/*
* Print a message box and close the connection.
*/
-void connection_fatal(void *frontend, char *fmt, ...)
+void connection_fatal(void *frontend, const char *fmt, ...)
{
va_list ap;
char *stuff, morestuff[100];
/*
* Report an error at the command-line parsing stage.
*/
-void cmdline_error(char *fmt, ...)
+void cmdline_error(const char *fmt, ...)
{
va_list ap;
char *stuff, morestuff[100];
unsigned int sessno = ((lParam - IDM_SAVED_MIN)
/ MENU_SAVED_STEP) + 1;
if (sessno < (unsigned)sesslist.nsessions) {
- char *session = sesslist.sessions[sessno];
+ const char *session = sesslist.sessions[sessno];
cl = dupprintf("putty @%s", session);
inherit_handles = FALSE;
freecl = TRUE;
*/
if (ldisc) {
ldisc_configure(ldisc, conf);
- ldisc_send(ldisc, NULL, 0, 0);
+ ldisc_echoedit_update(ldisc);
}
if (pal)
DeleteObject(pal);
case IDM_RESET:
term_pwron(term, TRUE);
if (ldisc)
- ldisc_send(ldisc, NULL, 0, 0);
+ ldisc_echoedit_update(ldisc);
break;
case IDM_ABOUT:
showabout(hwnd);
/*
* Print a message box and perform a fatal exit.
*/
-void fatalbox(char *fmt, ...)
+void fatalbox(const char *fmt, ...)
{
va_list ap;
char *stuff, morestuff[100];
/*
* Print a modal (Really Bad) message box and perform a fatal exit.
*/
-void modalfatalbox(char *fmt, ...)
+void modalfatalbox(const char *fmt, ...)
{
va_list ap;
char *stuff, morestuff[100];
/*
* Print a message box and don't close the connection.
*/
-void nonfatal(char *fmt, ...)
+void nonfatal(const char *fmt, ...)
{
va_list ap;
char *stuff, morestuff[100];
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)
{
int ret;
ret = cmdline_get_passwd_input(p, in, inlen);