-/* $Id: macterm.c,v 1.65 2003/02/04 01:53:50 ben Exp $ */
+/* $Id: macterm.c,v 1.66 2003/02/04 02:03:53 ben Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
TextEncoding enc;
OptionBits fbflags;
- SetPort(GetWindowPort(s->window));
+ SetPort((GrafPtr)GetWindowPort(s->window));
GetFNum(s->cfg.font.name, &s->fontnum);
TextFont(s->fontnum);
TextFace(s->cfg.font.face);
RgnHandle visrgn;
#endif
- SetPort(GetWindowPort(window));
+ SetPort((GrafPtr)GetWindowPort(window));
s = (Session *)GetWRefCon(window);
GlobalToLocal(&mouse);
part = FindControl(mouse, window, &control);
static ControlActionUPP mac_scrolltracker_upp = NULL;
s = (Session *)GetWRefCon(window);
- SetPort(GetWindowPort(window));
+ SetPort((GrafPtr)GetWindowPort(window));
mouse = event->where;
GlobalToLocal(&mouse);
part = FindControl(mouse, window, &control);
static int lastrow = -1, lastcol = -1;
static Mouse_Action lastact = MA_NOTHING;
- SetPort(GetWindowPort(s->window));
+ SetPort((GrafPtr)GetWindowPort(s->window));
localwhere = event->where;
GlobalToLocal(&localwhere);
#endif
s = (Session *)GetWRefCon(window);
- SetPort(GetWindowPort(window));
+ SetPort((GrafPtr)GetWindowPort(window));
BeginUpdate(window);
pre_paint(s);
#if TARGET_API_MAC_CARBON
Rect clip;
RgnHandle savergn;
- SetPort(GetWindowPort(s->window));
+ SetPort((GrafPtr)GetWindowPort(s->window));
/*
* Stop DrawGrowIcon giving us space for a horizontal scrollbar
* See Tech Note TB575 for details.
assert(len <= 1024);
- SetPort(GetWindowPort(s->window));
+ SetPort((GrafPtr)GetWindowPort(s->window));
fontwidth = s->font_width;
if ((lattr & LATTR_MODE) != LATTR_NORM)
a.denom = s->font_bigdenom;
break;
}
- SetPort(GetWindowPort(s->window));
+ SetPort((GrafPtr)GetWindowPort(s->window));
TextFont(s->fontnum);
style = s->cfg.font.face;
if ((attr & ATTR_BOLD) && !s->cfg.bold_colour)
static pascal void do_text_for_device(short depth, short devflags,
GDHandle device, long cookie) {
- struct do_text_args *a;
+ struct do_text_args *a = (struct do_text_args *)cookie;
int bgcolour, fgcolour, bright, reverse, tmp;
#if TARGET_API_MAC_CARBON
CQDProcsPtr gp = GetPortGrafProcs(GetWindowPort(a->s->window));
QDProcsPtr gp = a->s->window->grafProcs;
#endif
- a = (struct do_text_args *)cookie;
-
bright = (a->attr & ATTR_BOLD) && a->s->cfg.bold_colour;
reverse = a->attr & ATTR_REVERSE;
if (HAVE_COLOR_QD()) {
s->term->attr_mask = 0;
- SetPort(GetWindowPort(s->window));
+ SetPort((GrafPtr)GetWindowPort(s->window));
#if TARGET_API_MAC_CARBON
visrgn = NewRgn();
GetPortVisibleRegion(GetWindowPort(s->window), visrgn);
RgnHandle update = NewRgn();
Point g2l = { 0, 0 };
- SetPort(GetWindowPort(s->window));
+ SetPort((GrafPtr)GetWindowPort(s->window));
/*
* Work out the part of the update region that will scrolled by