comparison src/xfaces.c @ 12077:74b296435fd9

(load_color): misleading comment rewritten.
author Karl Heuer <kwzh@gnu.org>
date Mon, 05 Jun 1995 17:35:01 +0000
parents ddc5961c9f36
children 395a1d99820b
comparison
equal deleted inserted replaced
12076:ee38e93ccf7e 12077:74b296435fd9
345 345
346 if (NILP (name)) 346 if (NILP (name))
347 return FACE_DEFAULT; 347 return FACE_DEFAULT;
348 348
349 CHECK_STRING (name, 0); 349 CHECK_STRING (name, 0);
350 /* if the colormap is full, defined_color will return a best match
351 to the values in an an existing cell. */
350 result = defined_color(f, (char *) XSTRING (name)->data, &color, 1); 352 result = defined_color(f, (char *) XSTRING (name)->data, &color, 1);
351 if (! result) 353 if (! result)
352 Fsignal (Qerror, Fcons (build_string ("undefined color"), 354 Fsignal (Qerror, Fcons (build_string ("undefined color"),
353 Fcons (name, Qnil))); 355 Fcons (name, Qnil)));
354 /* Ignore the return value of XallocColor, so that
355 we use a color close to the one requested
356 if we can't get the exact request. */
357 return (unsigned long) color.pixel; 356 return (unsigned long) color.pixel;
358 } 357 }
359 358
360 static void 359 static void
361 unload_color (f, pixel) 360 unload_color (f, pixel)