build with TEXTCOLOR undef'd turned up a couple of things
Also, one more has_color in obsolete sys/mac folder. Adjusted code.
This commit is contained in:
@@ -269,6 +269,33 @@ _mt_init_stuff(void)
|
|||||||
clear_tty(_mt_window);
|
clear_tty(_mt_window);
|
||||||
|
|
||||||
InitMenuRes();
|
InitMenuRes();
|
||||||
|
|
||||||
|
{
|
||||||
|
/* update the window proc has_color table */
|
||||||
|
int i, setting = 0;
|
||||||
|
Rect r;
|
||||||
|
// Point p = {0, 0};
|
||||||
|
GDHandle gh = (GDHandle) 0;
|
||||||
|
|
||||||
|
if (_mt_in_color) {
|
||||||
|
GetWindowBounds(_mt_window, kWindowContentRgn, &r);
|
||||||
|
// SetPortWindowPort(_mt_window);
|
||||||
|
// LocalToGlobal (&p);
|
||||||
|
// OffsetRect (&r, p.h, p.v);
|
||||||
|
gh = GetMaxDevice(&r);
|
||||||
|
/* > 4 bpp */
|
||||||
|
setting = ((*((*gh)->gdPMap))->pixelSize > 4) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < CLR_MAX ; ++i) {
|
||||||
|
tty_procs.has_color[i] =
|
||||||
|
(i == CLR_BLACK || i == NO_COLOR || i == CLR_WHITE)
|
||||||
|
? 1
|
||||||
|
: (_mt_in_color && gh)
|
||||||
|
? setting
|
||||||
|
: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -302,6 +329,8 @@ getreturn(char *str)
|
|||||||
(void) tgetch();
|
(void) tgetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* this function is commented out */
|
||||||
|
/* the tty has_color[] table is filled in during init above */
|
||||||
int
|
int
|
||||||
has_color(int color)
|
has_color(int color)
|
||||||
{
|
{
|
||||||
@@ -327,6 +356,7 @@ has_color(int color)
|
|||||||
|
|
||||||
return (*((*gh)->gdPMap))->pixelSize > 4; /* > 4 bpp */
|
return (*((*gh)->gdPMap))->pixelSize > 4; /* > 4 bpp */
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
tty_delay_output(void)
|
tty_delay_output(void)
|
||||||
|
|||||||
@@ -715,7 +715,6 @@ tty_delay_output()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/*
|
/*
|
||||||
* CLR_BLACK 0
|
* CLR_BLACK 0
|
||||||
* CLR_RED 1
|
* CLR_RED 1
|
||||||
@@ -788,7 +787,6 @@ init_ttycolor()
|
|||||||
#endif
|
#endif
|
||||||
init_ttycolor_completed = TRUE;
|
init_ttycolor_completed = TRUE;
|
||||||
}
|
}
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
int
|
int
|
||||||
|
|||||||
+1
-1
@@ -4311,7 +4311,7 @@ unsigned long *bmarray;
|
|||||||
the condition where this gets used always has the same value */
|
the condition where this gets used always has the same value */
|
||||||
#define condcolor(bm,bmarray) NO_COLOR
|
#define condcolor(bm,bmarray) NO_COLOR
|
||||||
#define term_start_color(color) /*empty*/
|
#define term_start_color(color) /*empty*/
|
||||||
#define term_end_color(color) /*empty*/
|
#define term_end_color() /*empty*/
|
||||||
#endif /* TEXTCOLOR */
|
#endif /* TEXTCOLOR */
|
||||||
|
|
||||||
STATIC_OVL int
|
STATIC_OVL int
|
||||||
|
|||||||
Reference in New Issue
Block a user