pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.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: pike_types.c,v 1.218 2003/06/30 17:06:10 mast Exp $ + || $Id: pike_types.c,v 1.219 2003/07/01 15:11:30 mast Exp $   */      #include "global.h" - RCSID("$Id: pike_types.c,v 1.218 2003/06/30 17:06:10 mast Exp $"); + RCSID("$Id: pike_types.c,v 1.219 2003/07/01 15:11:30 mast Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"   #include "constants.h"   #include "object.h"   #include "multiset.h"
pike.git/src/pike_types.c:805:    goto recurse;    } else {    push_type(T_ZERO);    }    TYPE_STACK_DEBUG("push_finished_type_with_markers");    return;    }    if (type->type == T_ASSIGN) {    /* Strip assign */   #if 0 -  fprintf(stderr, "Assign to marker %d.\n", CAR_TO_INT(type); +  fprintf(stderr, "Assign to marker %"PRINTPTRDIFFT"d.\n", +  CAR_TO_INT(type);   #endif /* 0 */    type = type->cdr;    goto recurse;    }    if (type->type == PIKE_T_NAME) {    /* Strip the name, since it won't be correct anymore. */    type = type->cdr;    goto recurse;    }    /* FIXME: T_SCOPE */
pike.git/src/pike_types.c:1407: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr, "%d", s->type-'0');    break;       case PIKE_T_NAME:    fprintf(stderr, "{ %s = ", ((struct pike_string *)s->car)->str);    simple_describe_type(s->cdr);    fprintf(stderr, " }");    break;       case T_SCOPE: -  fprintf(stderr, "scope(%"PRINTSIZET"d, ", CAR_TO_INT(s)); +  fprintf(stderr, "scope(%"PRINTPTRDIFFT"d, ", CAR_TO_INT(s));    simple_describe_type(s->cdr);    fprintf(stderr, ")");    break;    case T_TUPLE:    fprintf(stderr, "tuple(");    simple_describe_type(s->car);    fprintf(stderr, ", ");    simple_describe_type(s->cdr);    fprintf(stderr, ")");    break;    case T_ASSIGN: -  fprintf(stderr, "%"PRINTSIZET"d = ", CAR_TO_INT(s)); +  fprintf(stderr, "%"PRINTPTRDIFFT"d = ", CAR_TO_INT(s));    simple_describe_type(s->cdr);    break;    case T_INT:    {    INT32 min = CAR_TO_INT(s);    INT32 max = CDR_TO_INT(s);    fprintf(stderr, "int");    if(min!=MIN_INT32 || max!=MAX_INT32)    fprintf(stderr, "(%ld..%ld)",(long)min,(long)max);    break;
pike.git/src/pike_types.c:1444: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr, "type(");    simple_describe_type(s->car);    fprintf(stderr, ")");    break;    case T_PROGRAM:    fprintf(stderr, "program(");    simple_describe_type(s->car);    fprintf(stderr, ")");    break;    case T_OBJECT: -  fprintf(stderr, "object(%s %"PRINTSIZET"d)", +  fprintf(stderr, "object(%s %"PRINTPTRDIFFT"d)",    s->car?"is":"implements",    CDR_TO_INT(s));    break;    case T_FUNCTION:    case T_MANY:    fprintf(stderr, "function(");    while(s->type == T_FUNCTION) {    simple_describe_type(s->car);    s = s->cdr;    if ((s->type == T_FUNCTION) ||
pike.git/src/pike_types.c:1612:    } else {    my_strcat("program(");    my_describe_type(t->car);    my_strcat(")");    }    break;    case T_OBJECT:    if (t->cdr)    {    char buffer[100]; -  sprintf(buffer,"object(%s %"PRINTSIZET"d)", +  sprintf(buffer,"object(%s %"PRINTPTRDIFFT"d)",    t->car?"is":"implements",    CDR_TO_INT(t));    my_strcat(buffer);    }else{    my_strcat("object");    }    break;       case T_STRING: my_strcat("string"); break;    case T_TYPE:
pike.git/src/pike_types.c:2337: Inside #if defined(PIKE_TYPE_DEBUG)
   my_strcat("a_markers[");    my_putchar((char)(m+'0'));    my_strcat("]=");    my_describe_type(a_markers[m]);    my_strcat("\n");    fprintf(stderr,"%s",(s=simple_free_buf()));    free(s);    }   #endif   #ifdef PIKE_DEBUG -  if(PTR_TO_INT(a_markers[m]->type) == m+'0') +  if(a_markers[m]->type == m+'0')    Pike_fatal("Cyclic type!\n");   #endif    }    return ret;       case '0': case '1': case '2': case '3': case '4':    case '5': case '6': case '7': case '8': case '9':    {    int m = a->type - '0';    if(a_markers[m])
pike.git/src/pike_types.c:2423: Inside #if defined(PIKE_TYPE_DEBUG)
   my_strcat("b_markers[");    my_putchar((char)(m+'0'));    my_strcat("]=");    my_describe_type(b_markers[m]);    my_strcat("\n");    fprintf(stderr,"%s",(s=simple_free_buf()));    free(s);    }   #endif   #ifdef PIKE_DEBUG -  if(PTR_TO_INT(b_markers[m]->type) == m+'0') +  if(b_markers[m]->type == m+'0')    Pike_fatal("Cyclic type!\n");   #endif    }    return ret;       case '0': case '1': case '2': case '3': case '4':    case '5': case '6': case '7': case '8': case '9':    {    int m = b->type - '0';    if(b_markers[m])