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

version» Context lines:

pike.git/src/modules/Image/colors.c:751:   **! and blue (equal to <tt>-><ref>rgb</ref>()</tt>), or   **! to a string, giving the name (equal to <tt>-><ref>name</ref>()</tt>).   **! returns the name as string or rgb as array   **! see also: rgb, name   */      static void image_color_cast(INT32 args)   {    if (args!=1 ||    TYPEOF(sp[-1]) != T_STRING) -  bad_arg_error("Image.Color.Color->cast",sp-args,args,0,"",sp-args, -  "Bad arguments to Image.Color.Color->cast()\n"); +  bad_arg_error("cast",sp-args,args,0,"",sp-args, +  "Bad arguments to cast.\n");       if (sp[-1].u.string==literal_array_string)    {    image_color_rgb(args);    return;    }    if (sp[-1].u.string==literal_string_string)    {    image_color_name(args);    return;
pike.git/src/modules/Image/colors.c:782:   }      static void image_color__sprintf(INT32 args)   {    int prec,x;       if (args<2)    SIMPLE_TOO_FEW_ARGS_ERROR("_sprintf",2);       if (TYPEOF(sp[-args]) != T_INT) -  SIMPLE_BAD_ARG_ERROR("_sprintf",0,"integer"); +  SIMPLE_BAD_ARG_ERROR("_sprintf",0,"int");    if (TYPEOF(sp[1-args]) != T_MAPPING)    SIMPLE_BAD_ARG_ERROR("_sprintf",1,"mapping");       pop_n_elems(args-2);       push_text("precision");    f_index(2);    if (TYPEOF(sp[-1]) != T_INT)    SIMPLE_BAD_ARG_ERROR("_sprintf",1,"mapping(\"precision\":int)");    prec=sp[-1].u.integer;
pike.git/src/modules/Image/colors.c:1218:    if (args>=0) return 0;    return image_color_svalue(sp+args,rgb);   }         static void image_color_add(INT32 args)   {    rgb_group rgb;       if (!image_color_arg(-args,&rgb)) -  SIMPLE_BAD_ARG_ERROR("Image.Color.Color->`+",1,"Color"); +  SIMPLE_BAD_ARG_ERROR("`+",1,"Image.Color");       pop_n_elems(args);    _image_make_rgb_color((int)(THIS->rgb.r+rgb.r),    (int)(THIS->rgb.g+rgb.g),    (int)(THIS->rgb.b+rgb.b));   }            #define HEXTONUM(C) \
pike.git/src/modules/Image/colors.c:1407:    /* try other stuff here */       pop_stack();    push_undefined();    return;   }      static void image_guess_color(INT32 args)   {    if (args!=1 && TYPEOF(sp[-args]) != T_STRING) -  bad_arg_error("Image.Color->guess",sp-args,args,0,"",sp-args, -  "Bad arguments to Image.Color->guess()\n"); +  bad_arg_error("guess",sp-args,args,0,"",sp-args, +  "Bad arguments to guess.\n");       f_lower_case(1);    push_text(" ");    o_subtract();       stack_dup();    image_get_color(1);    if (TYPEOF(sp[-1]) == T_OBJECT)    {    stack_swap();
pike.git/src/modules/Image/colors.c:1657:    _image_make_rgb_color(i,i,i);   }      static void image_make_html_color(INT32 args)   {    int i;       if (args!=1 ||    TYPEOF(sp[-1]) != T_STRING)    { -  bad_arg_error("Image.Color.html",sp-args,args,0,"",sp-args, -  "Bad arguments to Image.Color.html()\n"); +  bad_arg_error("html",sp-args,args,0,"",sp-args, +  "Bad arguments to html.\n");    return;    }       f_lower_case(1);    for (i=0; (size_t)i<sizeof(html_color)/sizeof(html_color[0]); i++)    if (html_color[i].pname==sp[-1].u.string)    {    _image_make_rgb_color(html_color[i].r,    html_color[i].g,    html_color[i].b);