pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.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: pike_types.c,v 1.132 2000/07/28 17:16:55 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.133 2000/08/15 16:00:03 grubba 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:132:    mapping_type_string=CONSTTYPE(tMapping);    function_type_string=CONSTTYPE(tFunction);    type_type_string=CONSTTYPE(tType);    void_type_string=CONSTTYPE(tVoid);    zero_type_string=CONSTTYPE(tZero);    any_type_string=CONSTTYPE(tOr(tVoid,tMix));    weak_type_string=CONSTTYPE(tOr4(tArray,tMultiset,tMapping,    tFuncV(tNone,tZero,tOr(tMix,tVoid))));   }    - static int type_length(char *t) + static ptrdiff_t type_length(char *t)   {    char *q=t;   one_more_type:    switch(EXTRACT_UCHAR(t++))    {    default:    fatal("error in type string %d.\n",EXTRACT_UCHAR(t-1));    /*NOTREACHED*/       break;
pike.git/src/pike_types.c:201:    break;    }    return t-q;   }         unsigned char type_stack[PIKE_TYPE_STACK_SIZE];   unsigned char *pike_type_mark_stack[PIKE_TYPE_STACK_SIZE/4];       - INT32 pop_stack_mark(void) + ptrdiff_t pop_stack_mark(void)   {    Pike_compiler->pike_type_mark_stackp--;    if(Pike_compiler->pike_type_mark_stackp<pike_type_mark_stack)    fatal("Type mark stack underflow\n");       return Pike_compiler->type_stackp - *Pike_compiler->pike_type_mark_stackp;   }      void pop_type_stack(void)   {
pike.git/src/pike_types.c:312:       default:    push_type(c);    }    }    type_stack_reverse();   }      void push_finished_type(struct pike_string *type)   { -  int e; +  ptrdiff_t e;    check_type_string(type);    for(e=type->len-1;e>=0;e--) push_type(type->str[e]);   }      void push_finished_type_backwards(struct pike_string *type)   {    int e;    check_type_string(type);    MEMCPY(Pike_compiler->type_stackp, type->str, type->len);    Pike_compiler->type_stackp+=type->len;
pike.git/src/pike_types.c:744: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if(ts!=Pike_compiler->type_stackp || ptms!=Pike_compiler->pike_type_mark_stackp)    fatal("Type stack whacked in parse_type.\n");   #endif       return ret;   }      #ifdef PIKE_DEBUG - void stupid_describe_type(char *a,INT32 len) + void stupid_describe_type(char *a, ptrdiff_t len)   { -  INT32 e; +  ptrdiff_t e;    for(e=0;e<len;e++)    {    if(e) printf(" ");    switch(EXTRACT_UCHAR(a+e))    {    case '0': case '1': case '2': case '3': case '4':    case '5': case '6': case '7': case '8': case '9':    printf("%c",EXTRACT_UCHAR(a+e));    break;