with palette_reset()'s expectations.
git-svn-id: svn://svn.tartarus.org/sgt/putty@2231
cda61777-01e9-0310-a592-
d414129be87e
-/* $Id: macterm.c,v 1.2 2002/11/19 22:05:48 ben Exp $ */
+/* $Id: macterm.c,v 1.3 2002/11/19 23:59:27 ben Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
#define DEFAULT_BG 18
#define DEFAULT_BG_BOLD 19
#define CURSOR_FG 20
#define DEFAULT_BG 18
#define DEFAULT_BG_BOLD 19
#define CURSOR_FG 20
-#define CURSOR_FG_BOLD 21
-#define CURSOR_BG 22
-#define CURSOR_BG_BOLD 23
#define PTOCC(x) ((x) < 0 ? -(-(x - s->font_width - 1) / s->font_width) : \
(x) / s->font_width)
#define PTOCC(x) ((x) < 0 ? -(-(x - s->font_width - 1) / s->font_width) : \
(x) / s->font_width)
int style = 0;
struct do_text_args a;
RgnHandle textrgn;
int style = 0;
struct do_text_args a;
RgnHandle textrgn;
-#if 0
- fprintf(stderr, "printing at (%d,%d) %d chars (attr=%x, lattr=%x):\n",
- x, y, len, attr, lattr);
- for (i = 0; i < len; i++)
- fprintf(stderr, "%c", text[i]);
- fprintf(stderr, "\n");
-#endif
-
/* First check this text is relevant */
a.textrect.top = y * s->font_height;
a.textrect.bottom = (y + 1) * s->font_height;
/* First check this text is relevant */
a.textrect.top = y * s->font_height;
a.textrect.bottom = (y + 1) * s->font_height;
break;
case 2:
if (a->attr & TATTR_ACTCURS) {
break;
case 2:
if (a->attr & TATTR_ACTCURS) {
- PmForeColor(bright ? CURSOR_FG_BOLD : CURSOR_FG);
+ PmForeColor(CURSOR_FG);
PmBackColor(CURSOR_BG);
TextMode(srcCopy);
} else {
PmBackColor(CURSOR_BG);
TextMode(srcCopy);
} else {
break;
default:
if (a->attr & TATTR_ACTCURS) {
break;
default:
if (a->attr & TATTR_ACTCURS) {
- fgcolour = bright ? CURSOR_FG_BOLD : CURSOR_FG;
bgcolour = CURSOR_BG;
TextMode(srcCopy);
} else {
bgcolour = CURSOR_BG;
TextMode(srcCopy);
} else {
unsigned long attr, int lattr)
{
unsigned long attr, int lattr)
{
- /* FIXME: Should do something here! */
+ do_text(ctx, x, y, text, len, attr, lattr);
static const int first[21] = {
0, 2, 4, 6, 8, 10, 12, 14,
1, 3, 5, 7, 9, 11, 13, 15,
static const int first[21] = {
0, 2, 4, 6, 8, 10, 12, 14,
1, 3, 5, 7, 9, 11, 13, 15,
};
if (!HAVE_COLOR_QD())
return;
real_palette_set(s, first[n], r, g, b);
};
if (!HAVE_COLOR_QD())
return;
real_palette_set(s, first[n], r, g, b);
real_palette_set(s, first[n]+1, r, g, b);
if (first[n] == DEFAULT_BG)
mac_adjustwinbg(s);
real_palette_set(s, first[n]+1, r, g, b);
if (first[n] == DEFAULT_BG)
mac_adjustwinbg(s);