Richard's lazy-scrolling patch. This builds up scroll operations in a list,
[u/mdw/putty] / mac / macterm.c
index fc0262e..17008c0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: macterm.c,v 1.58 2003/01/27 23:03:30 simon Exp $ */
+/* $Id: macterm.c,v 1.61 2003/02/01 12:26:33 ben Exp $ */
 /*
  * Copyright (c) 1999 Simon Tatham
  * Copyright (c) 1999, 2002 Ben Harris
@@ -692,7 +692,9 @@ void mac_keyterm(WindowPtr window, EventRecord *event) {
 
     ObscureCursor();
 
+#if 0
     fprintf(stderr, "Got key event %08x\n", event->message);
+#endif
 
     /* No meta key yet -- that'll be rather fun. */
 
@@ -1092,7 +1094,7 @@ static pascal void do_text_for_device(short depth, short devflags,
        if (depth > 2) {
            fgcolour = ((a->attr & ATTR_FGMASK) >> ATTR_FGSHIFT);
            fgcolour = (fgcolour & 0xF) * 2 + (fgcolour & 0x10 ? 1 : 0);
-           bgcolour = ((a->attr & ATTR_BGMASK) >> ATTR_BGSHIFT) * 2;
+           bgcolour = ((a->attr & ATTR_BGMASK) >> ATTR_BGSHIFT);
            bgcolour = (bgcolour & 0xF) * 2 + (bgcolour & 0x10 ? 1 : 0);
        } else {
            /*
@@ -1504,8 +1506,8 @@ void palette_reset(void *frontend) {
  * Scroll the screen. (`lines' is +ve for scrolling forward, -ve
  * for backward.)
  */
-void do_scroll(void *frontend, int topline, int botline, int lines) {
-    Session *s = frontend;
+void do_scroll(Context ctx, int topline, int botline, int lines) {
+    Session *s = ctx;
     Rect r;
     RgnHandle scrollrgn = NewRgn();
     RgnHandle movedupdate = NewRgn();