pike.git / src / program.c

version» Context lines:

pike.git/src/program.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: program.c,v 1.575 2004/11/05 16:21:23 grubba Exp $ + || $Id: program.c,v 1.576 2004/11/05 17:56:34 grubba Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:7613:    find_child_cache[h].id=i;    return i;    }    }    }    return -1;   }      void yywarning(char *fmt, ...)   { -  char buf[4711]; -  va_list args; -  +     /* If we have parse errors we might get erroneous warnings,    * so don't print them.    * This has the additional benefit of making it easier to    * visually locate the actual error message.    */    if (Pike_compiler->num_parse_error) return;    -  +  /* Don't bother generating the warning message if we don't have +  * anywhere to report it... +  */ +  if ((error_handler && error_handler->prog) || get_master()) { +  struct string_builder s; +  va_list args; +  +  init_string_builder(&s, 0);    va_start(args,fmt); -  Pike_vsnprintf (buf, sizeof (buf), fmt, args); +  string_builder_vsprintf(&s, fmt, args);    va_end(args);    -  if ((error_handler && error_handler->prog) || get_master()) { +     ref_push_string(lex.current_file);    push_int(lex.current_line); -  push_text(buf); +  push_string(finish_string_builder(&s));    -  low_safe_apply_handler("compile_warning", error_handler, compat_handler, 3); +  low_safe_apply_handler("compile_warning", +  error_handler, compat_handler, 3);    pop_stack();    }   }            /* returns 1 if a implements b */   static int low_implements(struct program *a, struct program *b)   {    int e;