X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=windows%2Fwindow.c;h=fc51e57fb2b5fbbe95fbdc37d76831dd7cee2e82;hb=15386cbe927fc85ac2fed0bb47704645c4b67dad;hp=ec7e17190a8fae28a88e1b2fcca30dd48ad5831a;hpb=7346e9bc4b8e51c77bfd92c4a4127ce2d26cb089;p=PuTTY.git diff --git a/windows/window.c b/windows/window.c index ec7e1719..fc51e57f 100644 --- a/windows/window.c +++ b/windows/window.c @@ -225,7 +225,7 @@ const int share_can_be_downstream = TRUE; 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) { } @@ -398,10 +398,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) #ifndef UNPROTECT 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); } - sfree(error); #endif } /* @@ -1148,7 +1150,7 @@ void set_raw_mouse_mode(void *frontend, int activate) /* * 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]; @@ -1170,7 +1172,7 @@ void connection_fatal(void *frontend, char *fmt, ...) /* * 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]; @@ -2187,7 +2189,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, 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; @@ -2280,7 +2282,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, */ if (ldisc) { ldisc_configure(ldisc, conf); - ldisc_send(ldisc, NULL, 0, 0); + ldisc_echoedit_update(ldisc); } if (pal) DeleteObject(pal); @@ -2423,7 +2425,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, 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); @@ -5379,7 +5381,7 @@ void optimised_move(void *frontend, int to, int from, int lines) /* * 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]; @@ -5396,7 +5398,7 @@ void fatalbox(char *fmt, ...) /* * 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]; @@ -5414,7 +5416,7 @@ void modalfatalbox(char *fmt, ...) /* * 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]; @@ -5821,7 +5823,7 @@ int from_backend_eof(void *frontend) 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);