Colin's const-fixing Patch Of Death. Seems to build fine on Windows
[u/mdw/putty] / mac / macterm.c
index b9478e9..88eb266 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: macterm.c,v 1.72 2003/03/29 23:07:55 ben Exp $ */
+/* $Id: macterm.c,v 1.75 2003/05/04 14:18:18 simon Exp $ */
 /*
  * Copyright (c) 1999 Simon Tatham
  * Copyright (c) 1999, 2002 Ben Harris
@@ -105,7 +105,7 @@ void post_paint(Session *s);
 
 void mac_startsession(Session *s)
 {
-    char *errmsg;
+    const char *errmsg;
     int i;
     WinInfo *wi;
 
@@ -157,7 +157,7 @@ void mac_startsession(Session *s)
     s->logctx = log_init(s->term, &s->cfg);
     term_provide_logctx(s->term, s->logctx);
 
-    errmsg = s->back->init(s->term, &s->backhandle, &s->cfg, s->cfg.host,
+    errmsg = s->back->init(s, &s->backhandle, &s->cfg, s->cfg.host,
                           s->cfg.port, &s->realhost, s->cfg.tcp_nodelay);
     if (errmsg != NULL)
        fatalbox("%s", errmsg);
@@ -193,9 +193,9 @@ static void mac_workoutfontscale(Session *s, int wantwidth,
     const char text = 'W';
     FontInfo fi;
 #if TARGET_API_MAC_CARBON
-    CQDProcsPtr gp = GetPortGrafProcs(GetWindowPort(s->window));;
+    CQDProcsPtr gp = GetPortGrafProcs(GetWindowPort(s->window));
 #else
-    QDProcsPtr gp = s->window->grafProcs;;
+    QDProcsPtr gp = s->window->grafProcs;
 #endif
 
     numer.v = denom.v = 1; /* always */
@@ -1847,6 +1847,13 @@ int askappend(void *frontend, Filename filename)
     return 2;
 }
 
+int from_backend(void *frontend, int is_stderr, const char *data, int len)
+{
+    Session *s = frontend;
+
+    return term_data(s->term, is_stderr, data, len);
+}
+
 /*
  * Emacs magic:
  * Local Variables: