+2012-10-08 Eli Zaretskii <eliz@gnu.org>
+
+ * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
+ 'const char *'.
+ (x_to_w32_color): Don't modify the argument, modify a copy instead.
+
2012-10-08 Daniel Colascione <dancol@dancol.org>
* image.c: Permanent fix for JPEG compilation issue --- limit
}
static Lisp_Object
-w32_color_map_lookup (char *colorname)
+w32_color_map_lookup (const char *colorname)
{
Lisp_Object tail, ret = Qnil;
static Lisp_Object
-x_to_w32_color (char * colorname)
+x_to_w32_color (const char * colorname)
{
register Lisp_Object ret = Qnil;
if (colorname[0] == '#')
{
/* Could be an old-style RGB Device specification. */
- char *color;
- int size;
- color = colorname + 1;
+ int size = strlen (colorname + 1);
+ char *color = alloca (size + 1);
- size = strlen (color);
+ strcpy (color, colorname + 1);
if (size == 3 || size == 6 || size == 9 || size == 12)
{
UINT colorval;
}
else if (strnicmp (colorname, "rgb:", 4) == 0)
{
- char *color;
+ const char *color;
UINT colorval;
int i, pos;
pos = 0;
else if (strnicmp (colorname, "rgbi:", 5) == 0)
{
/* This is an RGB Intensity specification. */
- char *color;
+ const char *color;
UINT colorval;
int i, pos;
pos = 0;