pike.git / src / modules / Image / colors.c

version» Context lines:

pike.git/src/modules/Image/colors.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: colors.c,v 1.72 2004/03/05 23:04:02 nilsson Exp $ + || $Id: colors.c,v 1.73 2004/09/18 21:24:53 nilsson Exp $   */      /*   **! module Image   **! submodule Color   **!   **! This module keeps names and easy handling   **! for easy color support. It gives you an easy   **! way to get colors from names.   **!
pike.git/src/modules/Image/colors.c:184:   **! class Color   **! This is the color object. It has six readable variables,   **! <tt>r</tt>, <tt>g</tt>, <tt>b</tt>, for the <i>red</i>,   **! <i>green</i> and <i>blue</i> values,   **! and <tt>h</tt>, <tt>s</tt>, <tt>v</tt>, for   **! the <i>hue</i>, <i>saturation</i> anv <i>value</i> values.   */      #include "global.h"    - RCSID("$Id: colors.c,v 1.72 2004/03/05 23:04:02 nilsson Exp $"); -  +    #include "image_machine.h"      #include <math.h>      #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "interpret.h"   #include "svalue.h"   #include "array.h"
pike.git/src/modules/Image/colors.c:1236:      #define HEXTONUM(C) \    (((C)>='0' && (C)<='9')?(C)-'0': \    ((C)>='a' && (C)<='f')?(C)-'a'+10: \    ((C)>='A' && (C)<='F')?(C)-'A'+10:-1)      static void image_get_color(INT32 args)   {    struct svalue s;    int n; -  static char *callables[]={"light","dark","neon","dull","bright"}; +  static const char *callables[]={"light","dark","neon","dull","bright"};       if (args!=1)    Pike_error("Image.Color[]: illegal number of args.\n");       if (!colors)    make_colors();       if (sp[-1].type==T_STRING)    {    mapping_index_no_free(&s,colors,sp-1);