pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:16:   #include "pike_types.h"   #include "fsort.h"   #include "builtin_functions.h"   #include "pike_memory.h"   #include "gc.h"   #include "main.h"   #include "security.h"   #include "stuff.h"   #include "bignum.h"    - RCSID("$Id: array.c,v 1.82 2000/08/15 11:17:07 grubba Exp $"); + RCSID("$Id: array.c,v 1.83 2000/08/15 16:19:12 grubba Exp $");      PMOD_EXPORT 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:697:    if(a->u.integer < b->u.integer) return -1;    if(a->u.integer > b->u.integer) return 1;    return 0;       case T_FLOAT:    if(a->u.float_number < b->u.float_number) return -1;    if(a->u.float_number > b->u.float_number) return 1;    return 0;       case T_STRING: -  return my_quick_strcmp(a->u.string, b->u.string); +  return DO_NOT_WARN((int)my_quick_strcmp(a->u.string, b->u.string));       default:    return set_svalue_cmpfun(a,b);    }   }      static int alpha_svalue_cmpfun(struct svalue *a, struct svalue *b)   {    if(a->type == b->type)    {
pike.git/src/array.c:721:    if(a->u.integer < b->u.integer) return -1;    if(a->u.integer > b->u.integer) return 1;    return 0;       case T_FLOAT:    if(a->u.float_number < b->u.float_number) return -1;    if(a->u.float_number > b->u.float_number) return 1;    return 0;       case T_STRING: -  return my_strcmp(a->u.string, b->u.string); +  return DO_NOT_WARN((int)my_strcmp(a->u.string, b->u.string));       case T_ARRAY:    if(a==b) return 0;    if(!a->u.array->size) return -1;    if(!b->u.array->size) return 1;    return alpha_svalue_cmpfun(ITEM(a->u.array), ITEM(b->u.array));       default:    return set_svalue_cmpfun(a,b);   
pike.git/src/array.c:1025:       if(i & PIKE_ARRAY_OP_A) *(ptr++)=ap;    if(i & PIKE_ARRAY_OP_B) *(ptr++)=~bp;    if(i & PIKE_ARRAY_OP_SKIP_A) ap++;    if(i & PIKE_ARRAY_OP_SKIP_B) bp++;    }       if((opcode >> 8) & PIKE_ARRAY_OP_A) while(ap<a->size) *(ptr++)=ap++;    if(opcode & PIKE_ARRAY_OP_B) while(bp<b->size) *(ptr++)=~(bp++);    -  *ret=(ptr-ret-1); +  *ret = DO_NOT_WARN((INT32)(ptr-ret-1));       return ret;   }      /*    * This routine merges two arrays in the order specified by 'zipper'    * zipper normally produced by merge() above    */   PMOD_EXPORT struct array *array_zip(struct array *a, struct array *b,INT32 *zipper)   {
pike.git/src/array.c:1701:    copy_svalues_recursively_no_free(ITEM(ret),ITEM(a),a->size,&doing);       ret->type_field=a->type_field;    return ret;   }      PMOD_EXPORT void apply_array(struct array *a, INT32 args)   {    INT32 e;    struct array *ret; -  INT32 argp; +  ptrdiff_t argp;       argp=Pike_sp-args - Pike_interpreter.evaluator_stack;       check_stack(a->size + args + 1);    check_array_for_destruct(a);    for(e=0;e<a->size;e++)    { -  assign_svalues_no_free(Pike_sp,Pike_interpreter.evaluator_stack+argp,args,BIT_MIXED); +  assign_svalues_no_free(Pike_sp, Pike_interpreter.evaluator_stack + argp, +  args, BIT_MIXED);    Pike_sp+=args;    apply_svalue(ITEM(a)+e,args);    }    ret=aggregate_array(a->size);    pop_n_elems(args);    push_array(ret);   }      PMOD_EXPORT struct array *reverse_array(struct array *a)   {