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.352 2008/08/17 10:14:55 mast Exp $ + || $Id: pike_types.c,v 1.353 2008/09/08 21:07:54 grubba Exp $   */      #include "global.h"   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"
pike.git/src/pike_types.c:1917:    fprintf(stderr, "(%ld..%ld)",(long)min,(long)max);    break;    }    case T_FLOAT: fprintf(stderr, "float"); break;    case T_STRING:    {    INT32 min;    INT32 max;    s = s->car;    fprintf(stderr, "string"); -  if (s->type == T_ZERO) { -  fprintf(stderr, "(zero)"); -  } else if (s != int_type_string) { +  if (s != int_type_string) {    fprintf(stderr, "(");    while (s->type == T_OR) {    struct pike_type *char_type = s->car;    while(char_type->type == T_ASSIGN) {    char_type = char_type->cdr;    }    -  +  if (char_type->type == T_ZERO) { +  fprintf(stderr, "zero | "); +  s = s->cdr; +  continue; +  }   #ifdef PIKE_DEBUG    if (char_type->type != T_INT) {    Pike_fatal("Invalid node type (%d:%s) in string type.\n",    char_type->type, get_name_of_type(char_type->type));    }   #endif /* PIKE_DEBUG */    min = CAR_TO_INT(char_type);    max = CDR_TO_INT(char_type);    if (min != MIN_INT32) {    fprintf(stderr, "%d", min);
pike.git/src/pike_types.c:1948:    fprintf(stderr, "..");    if (max != MAX_INT32) {    fprintf(stderr, "%d", max);    }    fprintf(stderr, " | ");    s = s->cdr;    }    while(s->type == T_ASSIGN) {    s = s->cdr;    } +  if (s->type == T_ZERO) { +  fprintf(stderr, "zero"); +  } else {   #ifdef PIKE_DEBUG    if (s->type != T_INT) {    Pike_fatal("Invalid node type (%d:%s) in string type.\n",    s->type, get_name_of_type(s->type));    }   #endif /* PIKE_DEBUG */    min = CAR_TO_INT(s);    max = CDR_TO_INT(s);    if (min != MIN_INT32) {    fprintf(stderr, "%d", min);    }    fprintf(stderr, "..");    if (max != MAX_INT32) {    fprintf(stderr, "%d", max);    } -  +  }    fprintf(stderr, ")");    }    break;    }    case T_TYPE:    fprintf(stderr, "type(");    simple_describe_type(s->car);    fprintf(stderr, ")");    break;    case T_PROGRAM: