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

version» Context lines:

pike.git/src/modules/Image/orient.c:1: - /* $Id: orient.c,v 1.17 2000/08/11 19:22:14 grubba Exp $ */ + /* $Id: orient.c,v 1.18 2000/12/01 08:10:02 hubbe Exp $ */      /*   **! module Image   **! note - **! $Id: orient.c,v 1.17 2000/08/11 19:22:14 grubba Exp $ + **! $Id: orient.c,v 1.18 2000/12/01 08:10:02 hubbe Exp $   **! class Image   */      #include "global.h"      #include <math.h>   #include <ctype.h>      #include "stralloc.h"   #include "global.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "threads.h"   #include "array.h" - #include "error.h" + #include "pike_error.h"      #include "image.h"      #include <builtin_functions.h>      /* This must be included last! */   #include "module_magic.h"      extern struct program *image_program;   #ifdef THIS
pike.git/src/modules/Image/orient.c:155:      void image_orient(INT32 args)   {    struct object *o[5];    struct image *img[5],*this,*img1;    int n;    rgb_group *d,*s1,*s2,*s3,*s0;    double mag;    int i, w, h;    -  if (!THIS->img) { error("Called Image.Image object is not initialized\n");; return; } +  if (!THIS->img) { Pike_error("Called Image.Image object is not initialized\n");; return; }       this=THIS;       if (args)    {    if (sp[-args].type==T_INT)    mag=sp[-args].u.integer;    else if (sp[-args].type==T_FLOAT)    mag=sp[-args].u.float_number;    else {
pike.git/src/modules/Image/orient.c:183:       if (args==1)    pop_n_elems(args);       if (args>1)    {    if (sp[1-args].type!=T_ARRAY)    bad_arg_error("image->orient\\n",sp-args,args,2,"",sp+2-1-args,    "Bad argument 2 to image->orient\n()\n");    if (sp[1-args].u.array->size!=4) -  error("The array given as argument 2 to image->orient do not have size 4\n"); +  Pike_error("The array given as argument 2 to image->orient do not have size 4\n");    for(i=0; i<4; i++)    if ((sp[1-args].u.array->item[i].type!=T_OBJECT) ||    (!(sp[1-args].u.array->item[i].u.object)) ||    (sp[1-args].u.array->item[i].u.object->prog!=image_program)) -  error("The array given as argument 2 to image->orient do not contain images\n"); +  Pike_error("The array given as argument 2 to image->orient do not contain images\n");    img1=(struct image*)sp[1-args].u.array->item[0].u.object->storage;       w=this->xsize;    h=this->ysize;       for(i=0; i<4; i++)    {    img1=(struct image*)sp[1-args].u.array->item[i].u.object->storage;    if ((img1->xsize!=w)||    (img1->ysize!=h)) -  error("The images in the array given as argument 2 to image->orient have different sizes\n"); +  Pike_error("The images in the array given as argument 2 to image->orient have different sizes\n");    }    for(i=0; i<4; i++)    img[i]=(struct image*)sp[1-args].u.array->item[i].u.object->storage;    pop_n_elems(args);    push_int(this->xsize);    push_int(this->ysize);    o[4]=clone_object(image_program,2);    img[4]=(struct image*)get_storage(o[4],image_program);    push_object(o[4]);    w=1;
pike.git/src/modules/Image/orient.c:274:    push_object(o[4]);    }   }         void image_orient4(INT32 args)   {    struct object *o[5];    struct image *img[5];    -  if (!THIS->img) { error("Called Image.Image object is not initialized\n");; return; } +  if (!THIS->img) { Pike_error("Called Image.Image object is not initialized\n");; return; }       pop_n_elems(args);    _image_orient(THIS,o,img);       pop_n_elems(1);    f_aggregate(4);   }