projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Separate out the code for creating and sending SSH version strings so that in
[u/mdw/putty]
/
mac
/
macterm.c
diff --git
a/mac/macterm.c
b/mac/macterm.c
index
d5a6014
..
4a75a0c
100644
(file)
--- a/
mac/macterm.c
+++ b/
mac/macterm.c
@@
-115,12
+115,7
@@
void mac_startsession(Session *s)
* Select protocol. This is farmed out into a table in a
* separate file to enable an ssh-free variant.
*/
* Select protocol. This is farmed out into a table in a
* separate file to enable an ssh-free variant.
*/
- s->back = NULL;
- for (i = 0; backends[i].backend != NULL; i++)
- if (backends[i].protocol == s->cfg.protocol) {
- s->back = backends[i].backend;
- break;
- }
+ s->back = backend_from_proto(s->cfg.protocol);
if (s->back == NULL)
fatalbox("Unsupported protocol number found");
if (s->back == NULL)
fatalbox("Unsupported protocol number found");
@@
-595,7
+590,7
@@
static void text_click(Session *s, EventRecord *event)
lastwhen = TickCount();
}
lastwhen = TickCount();
}
-void write_clip(void *cookie, wchar_t *data, int len, int must_deselect)
+void write_clip(void *cookie, wchar_t *data, int
*attr, int
len, int must_deselect)
{
#if !TARGET_API_MAC_CARBON
Session *s = cookie;
{
#if !TARGET_API_MAC_CARBON
Session *s = cookie;
@@
-1488,7
+1483,7
@@
void sys_cursor(void *frontend, int x, int y)
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
-void beep(void *frontend, int mode)
+void
do_
beep(void *frontend, int mode)
{
if (mode != BELL_VISUAL)
SysBeep(30);
{
if (mode != BELL_VISUAL)
SysBeep(30);
@@
-1845,6
+1840,12
@@
void ldisc_update(void *frontend, int echo, int edit)
{
}
{
}
+char *get_ttymode(void *frontend, const char *mode)
+{
+ Session *s = frontend;
+ return term_get_ttymode(s->term, mode);
+}
+
/*
* Mac PuTTY doesn't support printing yet.
*/
/*
* Mac PuTTY doesn't support printing yet.
*/
@@
-1892,6
+1893,12
@@
int from_backend(void *frontend, int is_stderr, const char *data, int len)
return term_data(s->term, is_stderr, data, len);
}
return term_data(s->term, is_stderr, data, len);
}
+int get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
+{
+ Session *s = p->frontend;
+ return term_get_userpass_input(s->term, p, in, inlen);
+}
+
/*
* Emacs magic:
* Local Variables:
/*
* Emacs magic:
* Local Variables: