pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.115 2001/01/25 08:37:59 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.116 2001/02/08 00:53:07 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "pike_memory.h"   #include "dynamic_buffer.h"   #include "interpret.h"
pike.git/src/mapping.c:1558:    }    }       a = mapping_indices(m);    SET_ONERROR(err, do_free_array, a);       if(! m->data->size) { /* mapping_indices may remove elements */    my_strcat("([ ])");    }    else { +  int save_t_flag = t_flag; +     if (m->data->size == 1) {    my_strcat("([ /* 1 element */\n");    } else {    sprintf(buf, "([ /* %ld elements */\n", (long)m->data->size);    my_strcat(buf);    }    -  +  t_flag = 0;    if(!SETJMP(catch))    sort_array_destructively(a);    UNSETJMP(catch); -  +  t_flag = save_t_flag;       /* no mapping locking required (I hope) */    for(e = 0; e < a->size; e++)    {    struct svalue *tmp;    if(e)    my_strcat(",\n");       for(d = 0; d < indent; d++)    my_putchar(' ');