diff --git a/pdcurses/color.c b/pdcurses/color.c index 6095f4ef..672e8d3e 100644 --- a/pdcurses/color.c +++ b/pdcurses/color.c @@ -36,6 +36,7 @@ #undef can_change_color #undef color_content #undef pair_content +#undef PDC_set_line_color /* undefine any macros for functions called by this module if in debug mode */ #ifdef PDCDEBUG @@ -48,7 +49,7 @@ static int PDC_init_pair(); #endif #ifdef PDCDEBUG -char *rcsid_color = "$Id: color.c,v 1.1 2001/01/10 08:26:55 mark Exp $"; +char *rcsid_color = "$Id: color.c,v 1.2 2001/01/10 08:26:56 mark Exp $"; #endif /*man-start********************************************************************* @@ -63,6 +64,7 @@ char *rcsid_color = "$Id: color.c,v 1.1 2001/01/10 08:26:55 mark Exp $"; bool can_change_color(void); *** int color_content(short color, short *redp, short *greenp, short *bluep); int pair_content(short pair, short *fgp, short *bgp); + int PDC_set_line_color(short color); X/Open Description: To use these routines, start_color() must be called, usually @@ -99,6 +101,10 @@ char *rcsid_color = "$Id: color.c,v 1.1 2001/01/10 08:26:55 mark Exp $"; pair_content() is used to determine what the colors of a given color-pair consist of. + PDC_set_line_color() is used to set the color, globally, for the + color of the lines drawn for the attributes: A_UNDERLINE, A_OVERLINE, + A_LEFTLINE and A_RIGHTLINE. PDCurses only feature. + NOTE: has_colors() is implemented as a macro. X/Open Return Value: @@ -108,7 +114,7 @@ char *rcsid_color = "$Id: color.c,v 1.1 2001/01/10 08:26:55 mark Exp $"; X/Open Errors: No errors are defined for this function. - Portability X/Open BSD SYS V + Portability X/Open BSD SYS V PDCurses Dec '88 start_color - - 3.2 init_pair - - 3.2 @@ -117,6 +123,7 @@ char *rcsid_color = "$Id: color.c,v 1.1 2001/01/10 08:26:55 mark Exp $"; can_change_color - - 3.2 color_content - - 3.2 pair_content - - 3.2 + PDC_set_line_color - - - Y **man-end**********************************************************************/ @@ -349,6 +356,21 @@ short *background; return(OK); } +/***********************************************************************/ +#ifdef HAVE_PROTO +int PDC_CDECL PDC_set_line_color(short color) +#else +int PDC_CDECL PDC_set_line_color(color) +short color; +#endif +/***********************************************************************/ +{ + + if (color >= COLORS || color < 0) + return(ERR); + SP->line_color = color; + return(OK); +} #if defined(CHTYPE_LONG) /***********************************************************************/