Branch: Tag:

2003-01-05

2003-01-05 01:03:55 by Martin Nilsson <mani@lysator.liu.se>

Use the SIMPLE_ macros.

Rev: src/backend.cmod:1.32
Rev: src/builtin.cmod:1.102
Rev: src/cpp.c:1.114
Rev: src/modules/sprintf/sprintf.c:1.100
Rev: src/opcodes.c:1.129
Rev: src/threads.c:1.194

2:   || 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: builtin.cmod,v 1.101 2002/12/01 18:58:20 mast Exp $ + || $Id: builtin.cmod,v 1.102 2003/01/05 00:54:02 nilsson Exp $   */      #include "global.h"
44:    struct array *res;    int i;    -  if (!(p = program_from_svalue(Pike_sp - args))) { -  Pike_error("_describe_program(): Bad argument 1 (expected program).\n"); -  } +  if (!(p = program_from_svalue(Pike_sp - args))) +  SIMPLE_BAD_ARG_ERROR("_describe_program", 1, "program");       for (i=0; i < (int)p->num_identifier_references;i++) {    struct reference *ref = p->identifier_references + i;
158:    }    }    if(x->type != T_INT) -  Pike_error("Bad argument 1 to int2char.\n"); +  SIMPLE_BAD_ARG_ERROR("int2char", 1, "int");       c=x->u.integer;   
211:    }    }    if(x->type != T_INT) -  Pike_error("Bad argument 1 to int2hex.\n"); +  SIMPLE_BAD_ARG_ERROR("int2hex", 1, "int");       c=x->u.integer;   
684:    switch(func->type)    {    default: -  bad_arg_error("function_name", Pike_sp-args, args, 1, -  "function|program", Pike_sp-args, -  "Bad argument.\n"); +  SIMPLE_BAD_ARG_ERROR("function_name", 1, "function|program");    return; /* NOTREACHED */       case PIKE_T_PROGRAM: