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.118 2000/01/04 01:19:38 mast Exp $"); + RCSID("$Id: pike_types.c,v 1.119 2000/01/16 05:56:03 hubbe 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:1457:    * match two type strings, return zero if they don't match, and return    * the part of 'a' that _did_ match if it did.    */   static char *low_match_types(char *a,char *b, int flags)   #ifdef PIKE_TYPE_DEBUG   {    int e;    char *s;    static char *low_match_types2(char *a,char *b, int flags);    -  if (l_flag) { +  if (l_flag>2) {    init_buf();    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat("low_match_types(");    low_describe_type(a);    if(type_length(a) + type_length(b) > 10)    {    my_strcat(",\n");    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat(" ");    low_describe_type(b);
pike.git/src/pike_types.c:1514: Inside #if defined(PIKE_TYPE_DEBUG)
   my_strcat("0");    }    my_strcat(");\n");    fprintf(stderr,"%s",(s=simple_free_buf()));    free(s);    indent++;    }       a=low_match_types2(a,b,flags);    -  if (l_flag) { +  if (l_flag>2) {    indent--;    init_buf();    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat("= ");    if(a)    low_describe_type(a);    else    my_strcat("NULL");    my_strcat("\n");    fprintf(stderr,"%s",(s=simple_free_buf()));
pike.git/src/pike_types.c:1582:    push_unfinished_type_with_markers(b, b_markers);    tmp=pop_unfinished_type();       type_stack_mark();    medium_or_pike_types(a_markers[m], tmp, 0);    if(a_markers[m]) free_string(a_markers[m]);    free_string(tmp);    a_markers[m]=pop_unfinished_type();      #ifdef PIKE_TYPE_DEBUG -  if (l_flag) { +  if (l_flag>2) {    char *s;    int e;    init_buf();    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat("a_markers[");    my_putchar(m+'0');    my_strcat("]=");    low_describe_type(a_markers[m]->str);    my_strcat("\n");    fprintf(stderr,"%s",(s=simple_free_buf()));
pike.git/src/pike_types.c:1666:    type_stack_mark();    push_unfinished_type_with_markers(a, a_markers);    tmp=pop_unfinished_type();       type_stack_mark();    medium_or_pike_types(b_markers[m], tmp, 0);    if(b_markers[m]) free_string(b_markers[m]);    free_string(tmp);    b_markers[m]=pop_unfinished_type();   #ifdef PIKE_TYPE_DEBUG -  if (l_flag) { +  if (l_flag>2) {    char *s;    int e;    init_buf();    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat("b_markers[");    my_putchar(m+'0');    my_strcat("]=");    low_describe_type(b_markers[m]->str);    my_strcat("\n");    fprintf(stderr,"%s",(s=simple_free_buf()));
pike.git/src/pike_types.c:1979: Inside #if defined(PIKE_TYPE_DEBUG)
   int array_cnt, unsigned int flags)   #ifdef PIKE_TYPE_DEBUG   {    int e;    char *s;    static int low_pike_types_le2(char *a, char *b,    int array_cnt, unsigned int flags);    int res;    char buf[50];    -  if (l_flag) { +  if (l_flag>2) {    init_buf();    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat("low_pike_types_le(");    low_describe_type(a);    if(type_length(a) + type_length(b) > 10)    {    my_strcat(",\n");    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat(" ");    low_describe_type(b);
pike.git/src/pike_types.c:2015: Inside #if defined(PIKE_TYPE_DEBUG)
   sprintf(buf, "0x%08x", flags);    my_strcat(buf);    my_strcat(");\n");    fprintf(stderr,"%s",(s=simple_free_buf()));    free(s);    indent++;    }       res=low_pike_types_le2(a, b, array_cnt, flags);    -  if (l_flag) { +  if (l_flag>2) {    indent--;       for(e=0;e<indent;e++) fprintf(stderr, " ");    fprintf(stderr, "= %d\n", res);    }    return res;   }      static int low_pike_types_le2(char *a, char *b,    int array_cnt, unsigned int flags)
pike.git/src/pike_types.c:2096:    for(i=array_cnt; i > 0; i--)    push_type(T_ARRAY);    tmp=pop_unfinished_type();       type_stack_mark();    medium_or_pike_types(a_markers[m], tmp, 0);    if(a_markers[m]) free_string(a_markers[m]);    free_string(tmp);    a_markers[m]=pop_unfinished_type();   #ifdef PIKE_TYPE_DEBUG -  if (l_flag) { +  if (l_flag>2) {    char *s;    int e;    init_buf();    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat("a_markers[");    my_putchar(m+'0');    my_strcat("]=");    low_describe_type(a_markers[m]->str);    my_strcat("\n");    fprintf(stderr,"%s",(s=simple_free_buf()));
pike.git/src/pike_types.c:2171:    for(i = array_cnt; i < 0; i++)    push_type(T_ARRAY);    tmp=pop_unfinished_type();       type_stack_mark();    medium_or_pike_types(b_markers[m], tmp, 0);    if(b_markers[m]) free_string(b_markers[m]);    free_string(tmp);    b_markers[m]=pop_unfinished_type();   #ifdef PIKE_TYPE_DEBUG -  if (l_flag) { +  if (l_flag>2) {    char *s;    int e;    init_buf();    for(e=0;e<indent;e++) my_strcat(" ");    my_strcat("b_markers[");    my_putchar(m+'0');    my_strcat("]=");    low_describe_type(b_markers[m]->str);    my_strcat("\n");    fprintf(stderr,"%s",(s=simple_free_buf()));