pike.git / src / las.c

version» Context lines:

pike.git/src/las.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: las.c,v 1.41 1998/01/15 05:59:41 hubbe Exp $"); + RCSID("$Id: las.c,v 1.42 1998/01/19 18:38:46 hubbe Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:1278:    {    char *name;    int args;    switch(CAR(n)->token)    {    case F_IDENTIFIER:    name=ID_FROM_INT(new_program, CAR(n)->u.number)->name->str;    break;       case F_CONSTANT: +  switch(CAR(n)->u.sval.type) +  { +  case T_FUNCTION: +  name=ID_FROM_INT(CAR(n)->u.sval.u.object->prog, +  CAR(n)->u.sval.subtype)->name->str; +  break; +  +  case T_ARRAY: +  name="array call"; +  break; +  +  case T_PROGRAM: +  name="clone call"; +  break; +     default:    name="`() (function call)"; -  +  break;    }    -  +  default: +  name="unknown function"; +  } +     if(max_correct_args == count_arguments(s))    {    my_yyerror("To few arguments to %s.\n",name);    }else{    my_yyerror("Bad argument %d to %s.",    max_correct_args+1, name);    }    copy_shared_string(n->type, mixed_type_string);    }    free_string(s);