pike.git / src / array.c

version» Context lines:

pike.git/src/array.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: array.c,v 1.170 2004/09/22 13:40:27 mast Exp $ + || $Id: array.c,v 1.171 2004/09/27 21:26:13 mast Exp $   */      #include "global.h"   #include "svalue.h"   #include "array.h"   #include "object.h"   #include "las.h"   #include "stralloc.h"   #include "interpret.h"   #include "opcodes.h"
pike.git/src/array.c:1572:       tmpa=reorder_and_copy_array(a,ordera);    SET_ONERROR(r1,do_free_array,tmpa);       tmpb=reorder_and_copy_array(b,orderb);    SET_ONERROR(r2,do_free_array,tmpb);       zipper=merge(tmpa,tmpb,op);    SET_ONERROR(r3,free,zipper);    + #if 0 +  { +  int i;    -  +  simple_describe_array (a); +  simple_describe_array (b); +  +  fprintf (stderr, "order a: "); +  for (i = 0; i < a->size; i++) +  fprintf (stderr, "%d ", ordera[i]); +  fprintf (stderr, "\n"); +  +  fprintf (stderr, "order b: "); +  for (i = 0; i < b->size; i++) +  fprintf (stderr, "%d ", orderb[i]); +  fprintf (stderr, "\n"); +  +  simple_describe_array (tmpa); +  simple_describe_array (tmpb); +  +  fprintf (stderr, "zipper: "); +  for (i = 1; i < *zipper + 1; i++) +  fprintf (stderr, "%d ", zipper[i]); +  fprintf (stderr, "\n"); +  } + #endif +     fsort_with_order( (zipper+1), zipper+*zipper, array_merge_fun,    ordera, orderb );       ret=array_zip(tmpa,tmpb,zipper);    UNSET_ONERROR(r3); free((char *)zipper);    UNSET_ONERROR(r2); free_array(tmpb);    UNSET_ONERROR(r1); free_array(tmpa);    UNSET_ONERROR(r5); free((char *)orderb);    UNSET_ONERROR(r4); free((char *)ordera);    return ret;