pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:14:   #include "language.h"   #include "error.h"   #include "pike_types.h"   #include "fsort.h"   #include "builtin_functions.h"   #include "pike_memory.h"   #include "gc.h"   #include "main.h"   #include "security.h"    - RCSID("$Id: array.c,v 1.52 1999/08/17 22:00:00 hubbe Exp $"); + RCSID("$Id: array.c,v 1.53 1999/08/21 23:21:06 noring Exp $");      struct array empty_array=   {    1, /* Never free */   #ifdef PIKE_SECURITY    0,   #endif    &empty_array, /* Next */    &empty_array, /* previous (circular) */    0, /* Size = 0 */
pike.git/src/array.c:166:    switch(ind->type)    {    case T_INT:    i=ind->u.integer;    if(i<0) i+=a->size;    if(i<0 || i>=a->size) {    struct svalue tmp;    tmp.type=T_ARRAY;    tmp.u.array=a;    if (a->size) { -  index_error(0,0,0,&tmp,ind,"Index %d is out of range 0 - %d.\n", i, a->size-1); +  index_error(0,0,0,&tmp,ind,"Index %d is out of array range 0 - %d.\n", i, a->size-1);    } else {    index_error(0,0,0,&tmp,ind,"Attempt to index the empty array with %d.\n", i);    }    }    array_index_no_free(s,a,i);    break;       case T_STRING:    {    check_stack(4);
pike.git/src/array.c:238:   {    INT32 i;    switch (ind->type) {    case T_INT:    if(ind->type != T_INT)    error("Index is not an integer.\n");    i=ind->u.integer;    if(i<0) i+=a->size;    if(i<0 || i>=a->size) {    if (a->size) { -  error("Index %d is out of range 0 - %d.\n", i, a->size-1); +  error("Index %d is out of array range 0 - %d.\n", i, a->size-1);    } else {    error("Attempt to index the empty array with %d.\n", i);    }    }    array_set_index(a,i,s);    break;       case T_STRING:    {    INT32 i, n;
pike.git/src/array.c:943:    struct svalue *ind,    TYPE_T t)   {    INT32 i;    if(ind->type != T_INT)    error("Index is not an integer.\n");    i=ind->u.integer;    if(i<0) i+=a->size;    if(i<0 || i>=a->size) {    if (a->size) { -  error("Index %d is out of range 0 - %d.\n", i, a->size-1); +  error("Index %d is out of array range 0 - %d.\n", i, a->size-1);    } else {    error("Attempt to index the empty array with %d.\n", i);    }    }    return low_array_get_item_ptr(a,i,t);   }      /*    * organize an array of INT32 to specify how to zip two arrays together    * to maintain the order.