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.40 1999/09/06 10:48:07 grubba Exp $"); + RCSID("$Id: mapping.c,v 1.41 1999/09/24 13:03:02 noring Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "language.h"   #include "error.h"   #include "pike_memory.h"   #include "dynamic_buffer.h"
pike.git/src/mapping.c:757:    for(e=0;p;e++,p=p->next)    {    if(p->pointer_a == (void *)m)    {    sprintf(buf,"@%ld",(long)e);    my_strcat(buf);    return;    }    }    -  sprintf(buf,"([ /* %ld elements */\n",(long) m->size); +  sprintf(buf, m->size == 1 ? "([ /* %ld element */\n" : +  "([ /* %ld elements */\n", +  (long)m->size);    my_strcat(buf);       q=0;       MAPPING_LOOP(m)    {    if(q)    {    my_putchar(',');    my_putchar('\n');