From: <dg...@us...> - 2007-11-14 19:43:41
|
Update of /cvsroot/xine/xine-ui/src/xitk/xine-toolkit In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28952/src/xitk/xine-toolkit Modified Files: widget.c Log Message: Mark xitk_color_names table constant. Index: widget.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/xine-toolkit/widget.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- widget.c 13 Nov 2007 21:12:21 -0000 1.71 +++ widget.c 14 Nov 2007 19:43:42 -0000 1.72 @@ -37,7 +37,7 @@ #include "_xitk.h" -static xitk_color_names_t xitk_color_names[] = { +static const xitk_color_names_t xitk_color_names[] = { { 255, 250, 250, "snow" }, { 248, 248, 255, "GhostWhite" }, { 245, 245, 245, "WhiteSmoke" }, @@ -1621,7 +1621,6 @@ */ xitk_color_names_t *xitk_get_color_name(char *color) { xitk_color_names_t *cn = NULL; - xitk_color_names_t *pcn = NULL; if(color == NULL) { XITK_WARNING("color was NULL.\n"); @@ -1661,6 +1660,7 @@ return cn; } else { + const xitk_color_names_t *pcn = NULL; for(pcn = xitk_color_names; pcn->colorname != NULL; pcn++) { if(!strncasecmp(pcn->colorname, color, strlen(pcn->colorname))) { |