pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:97:    *! Returns @expr{(a <= b) && (b <= a)@}.    *! @endmixed    *!    *! @seealso    *! @[copy_value()], @[`==()]    */   PMOD_EXPORT void f_equal(INT32 args)   {    int i;    if(args != 2) -  SIMPLE_TOO_FEW_ARGS_ERROR("equal", 2); +  SIMPLE_WRONG_NUM_ARGS_ERROR("equal", 2);       i=is_equal(Pike_sp-2,Pike_sp-1);    pop_n_elems(args);    push_int(i);   }      /*! @decl array aggregate(mixed ... elements)    *!    *! Construct an array with the arguments as indices.    *!
pike.git/src/builtin_functions.c:261:    *!    *! @seealso    *! @[hash()], @[hash_7_0]    */   static void f_hash_7_4(INT32 args)   {    size_t i = 0;    struct pike_string *s = Pike_sp[-args].u.string;       if(!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("7.4::hash",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("7.4::hash",1);       if(TYPEOF(Pike_sp[-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("7.4::hash", 1, "string");       i = simple_hashmem((unsigned char *)s->str, s->len<<s->size_shift,    100<<s->size_shift);       if(args > 1)    {    if(TYPEOF(Pike_sp[1-args]) != T_INT)
pike.git/src/builtin_functions.c:323:    *! This function is not NUL-safe, and is byte-order dependant.    *!    *! @seealso    *! @[hash()], @[hash_7_4]    */   static void f_hash_7_0( INT32 args )   {    struct pike_string *s = Pike_sp[-args].u.string;    unsigned int i;    if(!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("7.0::hash",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("7.0::hash",1);    if(TYPEOF(Pike_sp[-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("7.0::hash", 1, "string");       if( s->size_shift )    {    f_hash_7_4( args );    return;    }       i = (unsigned int)hashstr( (unsigned char *)s->str,
pike.git/src/builtin_functions.c:381:    *!    *! @seealso    *! @[hash_7_0()], @[hash_7_4()], @[hash_value]    */   PMOD_EXPORT void f_hash(INT32 args)   {    size_t i = 0;    struct pike_string *s;       if(!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("hash",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("hash",1);       if(TYPEOF(Pike_sp[-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("hash", 1, "string");       s = Pike_sp[-args].u.string;    switch(s->size_shift) {    case 0:    i = simple_hashmem(STR0(s), s->len, 100);    break;    case 1:
pike.git/src/builtin_functions.c:436:    *! This is the hashing method used by mappings.    *!    *! @seealso    *! @[hash()], @[lfun::__hash()]    */   void f_hash_value(INT32 args)   {    unsigned INT32 h;       if(!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("hash_value",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("hash_value",1);       h = hash_svalue (Pike_sp - args);    pop_n_elems (args);    push_int (h);   }      /*! @decl mixed copy_value(mixed value)    *!    *! Copy a value recursively.    *!
pike.git/src/builtin_functions.c:460:    *! The resulting value will always be equal to the copied (as tested with    *! the function @[equal()]), but they may not the the same value (as tested    *! with @[`==()]).    *!    *! @seealso    *! @[equal()]    */   PMOD_EXPORT void f_copy_value(INT32 args)   {    if(!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("copy_value",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("copy_value",1);       pop_n_elems(args-1);    push_undefined(); /* Placeholder */    copy_svalues_recursively_no_free(Pike_sp-1,Pike_sp-2,1,0);    free_svalue(Pike_sp-2);    move_svalue (Pike_sp - 2, Pike_sp - 1);    Pike_sp--;    dmalloc_touch_svalue(Pike_sp-1);   }   
pike.git/src/builtin_functions.c:891:    *!    *! @seealso    *! @[indices()], @[values()], @[zero_type()], @[has_value()],    *! @[has_prefix()], @[has_suffix()]    */   PMOD_EXPORT void f_search(INT32 args)   {    ptrdiff_t start;       if(args < 2) -  SIMPLE_TOO_FEW_ARGS_ERROR("search", 2); +  SIMPLE_WRONG_NUM_ARGS_ERROR("search", 2);       switch(TYPEOF(Pike_sp[-args]))    {    case T_STRING:    {    struct pike_string *haystack = Pike_sp[-args].u.string;       start=0;    if(args > 2)    {
pike.git/src/builtin_functions.c:1102:    *! When @[s] is an object, it needs to implement    *! @[lfun::_sizeof()] and @[lfun::`[]].    *!    *! @seealso    *! @[has_suffix()], @[has_value()], @[search()]    */   PMOD_EXPORT void f_has_prefix(INT32 args)   {    struct pike_string *a, *b;    -  if(args<2) -  SIMPLE_TOO_FEW_ARGS_ERROR("has_prefix", 2); +  if(args!=2) +  SIMPLE_WRONG_NUM_ARGS_ERROR("has_prefix", 2);    if((TYPEOF(Pike_sp[-args]) != T_STRING) &&    (TYPEOF(Pike_sp[-args]) != T_OBJECT))    SIMPLE_ARG_TYPE_ERROR("has_prefix", 1, "string|object");    if(TYPEOF(Pike_sp[1-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("has_prefix", 2, "string");       b = Pike_sp[1-args].u.string;       if (TYPEOF(Pike_sp[-args]) == T_OBJECT) {    ptrdiff_t i;
pike.git/src/builtin_functions.c:1208:    *! Returns @expr{1@} if the string @[s] ends with @[suffix],    *! returns @expr{0@} (zero) otherwise.    *!    *! @seealso    *! @[has_prefix()], @[has_value()], @[search()]    */   PMOD_EXPORT void f_has_suffix(INT32 args)   {    struct pike_string *a, *b;    -  if(args<2) -  SIMPLE_TOO_FEW_ARGS_ERROR("has_suffix", 2); +  if(args!=2) +  SIMPLE_WRONG_NUM_ARGS_ERROR("has_suffix", 2);    if(TYPEOF(Pike_sp[-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("has_suffix", 1, "string");    if(TYPEOF(Pike_sp[1-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("has_suffix", 2, "string");       a = Pike_sp[-args].u.string;    b = Pike_sp[1-args].u.string;       /* First handle some common special cases. */    if ((b->len > a->len) || (b->size_shift > a->size_shift)
pike.git/src/builtin_functions.c:1295:    *! a proper index by @[has_index()]    *!    *! @seealso    *! @[has_value()], @[has_prefix()], @[has_suffix()], @[indices()],    *! @[search()], @[values()], @[zero_type()]    */   PMOD_EXPORT void f_has_index(INT32 args)   {    int t = 0;    -  if(args < 2) -  SIMPLE_TOO_FEW_ARGS_ERROR("has_index", 2); -  if(args > 2) -  pop_n_elems(args-2); +  if(args != 2) +  SIMPLE_WRONG_NUM_ARGS_ERROR("has_index", 2);       switch(TYPEOF(Pike_sp[-2]))    {    case T_STRING:    if(TYPEOF(Pike_sp[-1]) == T_INT)    t = (0 <= Pike_sp[-1].u.integer && Pike_sp[-1].u.integer < Pike_sp[-2].u.string->len);       pop_n_elems(args);    push_int(t);    break;
pike.git/src/builtin_functions.c:1390:    *! @code    *! search(@[haystack], @[value]) != -1    *! @endcode    *!    *! @seealso    *! @[has_index()], @[indices()], @[search()], @[has_prefix()],    *! @[has_suffix()], @[values()], @[zero_type()]    */   PMOD_EXPORT void f_has_value(INT32 args)   { -  if(args < 2) -  SIMPLE_TOO_FEW_ARGS_ERROR("has_value", 2); -  if(args > 2) -  pop_n_elems(args-2); +  if(args != 2) +  SIMPLE_WRONG_NUM_ARGS_ERROR("has_value", 2);       switch(TYPEOF(Pike_sp[-2]))    {    case T_MAPPING:    f_search(2);    f_zero_type(1);       if(TYPEOF(Pike_sp[-1]) == T_INT)    Pike_sp[-1].u.integer = !Pike_sp[-1].u.integer;    else
pike.git/src/builtin_functions.c:1468:    *! Calling @[add_constant()] without a value will remove that name from    *! the list of constants. As with replacing, this will not affect already    *! compiled programs.    *!    *! @seealso    *! @[all_constants()]    */   PMOD_EXPORT void f_add_constant(INT32 args)   {    if(args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("add_constant", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("add_constant", 1);       if(TYPEOF(Pike_sp[-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("add_constant", 1, "string");       if(args>1)    {    dmalloc_touch_svalue(Pike_sp-args+1);    low_add_efun(Pike_sp[-args].u.string, Pike_sp-args+1);    }else{    low_add_efun(Pike_sp[-args].u.string, 0);
pike.git/src/builtin_functions.c:1550:    *! If the argument to @[zero_type()] is a destructed object or a function    *! in a destructed object, @expr{2@} will be returned.    *!    *! In all other cases @[zero_type()] will return @expr{0@} (zero).    *!    *! @seealso    *! @[find_call_out()]    */   PMOD_EXPORT void f_zero_type(INT32 args)   { -  if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("zero_type",1); +  if(args != 1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("zero_type",1);       if(IS_DESTRUCTED(Pike_sp-args))    {    pop_n_elems(args);    push_int(NUMBER_DESTRUCTED);    }    else if(TYPEOF(Pike_sp[-args]) != T_INT)    {    pop_n_elems(args);    push_int(0);
pike.git/src/builtin_functions.c:2984:    *! If you throw an array with where the first index contains an error    *! message and the second index is a backtrace, (the output from    *! @[backtrace()]) then it will be treated exactly like a real error    *! by overlying functions.    *!    *! @seealso    *! @[catch]    */   PMOD_EXPORT void f_throw(INT32 args)   { -  if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("throw", 1); +  if(args != 1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("throw", 1);    assign_svalue(&throw_value,Pike_sp-args);    pop_n_elems(args);    throw_severity=0;    pike_throw();   }      int in_forked_child = 0;      /*! @decl void exit(int returncode, void|string fmt, mixed ... extra)    *!
pike.git/src/builtin_functions.c:3013:    *! @[werror] to output a message on stderr.    *!    *! @seealso    *! @[_exit()]    */   PMOD_EXPORT void f_exit(INT32 args)   {    static int in_exit=0;       if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("exit", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("exit", 1);       if(TYPEOF(Pike_sp[-args]) != T_INT)    SIMPLE_ARG_TYPE_ERROR("exit", 1, "int");       if(in_exit) Pike_error("exit already called!\n");    in_exit=1;       if(args>1 && TYPEOF(Pike_sp[1-args]) == T_STRING) {    struct svalue *s =    simple_mapping_string_lookup(get_builtin_constants(), "werror");
pike.git/src/builtin_functions.c:3277:    *! @endmixed    *!    *! @seealso    *! @[values()], @[types()], @[lfun::_indices()]    */   PMOD_EXPORT void f_indices(INT32 args)   {    ptrdiff_t size;    struct array *a = NULL;    -  if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("indices", 1); +  if(args != 1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("indices", 1);       switch(TYPEOF(Pike_sp[-args]))    {    case T_STRING:    size=Pike_sp[-args].u.string->len;    goto qjump;       case T_ARRAY:    size=Pike_sp[-args].u.array->size;   
pike.git/src/builtin_functions.c:3584:    *! symbols is returned.    *! @endmixed    *!    *! @seealso    *! @[indices()], @[types()], @[lfun::_values()]    */   PMOD_EXPORT void f_values(INT32 args)   {    ptrdiff_t size;    struct array *a = NULL; -  if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("values", 1); +  if(args != 1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("values", 1);       switch(TYPEOF(Pike_sp[-args]))    {    case T_STRING:    size = Pike_sp[-args].u.string->len;    a = allocate_array_no_init(size,0);    while(--size >= 0)    {    /* Elements are already integers. */    ITEM(a)[size].u.integer = index_shared_string(Pike_sp[-args].u.string, size);
pike.git/src/builtin_functions.c:3674:    *!    *! @seealso    *! @[indices()], @[values()], @[lfun::_types()]    */   PMOD_EXPORT void f_types(INT32 args)   {    ptrdiff_t size;    struct array *a = NULL;    struct pike_type *default_type = mixed_type_string;    -  if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("types", 1); +  if(args != 1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("types", 1);       switch(TYPEOF(Pike_sp[-args]))    {    case T_STRING:    default_type = int_type_string;    size=Pike_sp[-args].u.string->len;    goto qjump;       case T_MAPPING:    size = Pike_sp[-args].u.mapping->data->size;
pike.git/src/builtin_functions.c:3746:    *!    *! Return the program from which @[o] was instantiated. If the    *! object was instantiated from a class using parent references    *! the generating function will be returned.    *!    *! If @[o] is not an object or has been destructed @expr{0@} (zero)    *! will be returned.    */   PMOD_EXPORT void f_object_program(INT32 args)   { -  if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("object_program", 1); +  if(args != 1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("object_program", 1);       if(TYPEOF(Pike_sp[-args]) == T_OBJECT)    {    struct object *o=Pike_sp[-args].u.object;    struct program *p = o->prog;       if(p)    {    if (SUBTYPEOF(Pike_sp[-args])) {    /* FIXME: This probably works for the subtype-less case as well.
pike.git/src/builtin_functions.c:4394:    }    }       stack_dup();    f_indices(1);    stack_swap();    f_values(1);    args++;    }    else -  SIMPLE_TOO_FEW_ARGS_ERROR("replace", 3); +  SIMPLE_WRONG_NUM_ARGS_ERROR("replace", 3);    } else if (args > 3) {    pop_n_elems(args-3);    args = 3;    }       switch(TYPEOF(Pike_sp[-args]))    {    case T_ARRAY:    {    array_replace(Pike_sp[-args].u.array,Pike_sp+1-args,Pike_sp+2-args);
pike.git/src/builtin_functions.c:4674:   /*! @decl int objectp(mixed arg)    *!    *! Returns @expr{1@} if @[arg] is an object, @expr{0@} (zero) otherwise.    *!    *! @seealso    *! @[mappingp()], @[programp()], @[arrayp()], @[stringp()], @[functionp()],    *! @[multisetp()], @[floatp()], @[intp()]    */   PMOD_EXPORT void f_objectp(INT32 args)   { -  if(args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("objectp", 1); +  if(args!=1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("objectp", 1);    if(TYPEOF(Pike_sp[-args]) != T_OBJECT || !Pike_sp[-args].u.object->prog    || is_bignum_object(Pike_sp[-args].u.object))    {    pop_n_elems(args);    push_int(0);    }else{    pop_n_elems(args);    push_int(1);    }   }
pike.git/src/builtin_functions.c:4698:    *!    *! Returns @expr{1@} if @[arg] is a function, @expr{0@} (zero) otherwise.    *!    *! @seealso    *! @[mappingp()], @[programp()], @[arrayp()], @[stringp()], @[objectp()],    *! @[multisetp()], @[floatp()], @[intp()]    */   PMOD_EXPORT void f_functionp(INT32 args)   {    int res = 0; -  if(args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("functionp", 1); +  if(args!=1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("functionp", 1);    if( TYPEOF(Pike_sp[-args]) == T_FUNCTION &&    (SUBTYPEOF(Pike_sp[-args]) == FUNCTION_BUILTIN ||    Pike_sp[-args].u.object->prog))    res=1;    pop_n_elems(args);    push_int(res);   }      PMOD_EXPORT int callablep(struct svalue *s)   {
pike.git/src/builtin_functions.c:4776:    *!    *! Returns @expr{1@} if @[arg] is a callable, @expr{0@} (zero) otherwise.    *!    *! @seealso    *! @[mappingp()], @[programp()], @[arrayp()], @[stringp()], @[objectp()],    *! @[multisetp()], @[floatp()], @[intp()]    */   PMOD_EXPORT void f_callablep(INT32 args)   {    int res = 0; -  if(args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("callablep", 1); +  if(args!=1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("callablep", 1);       res = callablep(&Pike_sp[-args]);    pop_n_elems(args);    push_int(res);   }   #ifndef HAVE_AND_USE_POLL   #undef HAVE_POLL   #endif      static void delaysleep(double delay, unsigned do_abort_on_signal,
pike.git/src/builtin_functions.c:4983:   #ifdef TYPEP   #undef TYPEP   #endif         #define TYPEP(ID,NAME,TYPE,TYPE_NAME) \    PMOD_EXPORT void ID(INT32 args) \    { \    int t; \    struct program *p; \ -  if (args<1) \ -  SIMPLE_TOO_FEW_ARGS_ERROR(NAME, 1); \ +  if (args!=1) \ +  SIMPLE_WRONG_NUM_ARGS_ERROR(NAME, 1); \    if (TYPEOF(Pike_sp[-args]) == T_OBJECT && \    (p = Pike_sp[-args].u.object->prog)) \    { \    int fun = FIND_LFUN(p->inherits[SUBTYPEOF(Pike_sp[-args])].prog, \    LFUN__IS_TYPE); \    if (fun != -1) \    { \    int id_level = \    p->inherits[SUBTYPEOF(Pike_sp[-args])].identifier_level; \    ref_push_string(literal_##TYPE_NAME##_string); \
pike.git/src/builtin_functions.c:5014:      /*! @decl int undefinedp(mixed arg)    *!    *! Returns @expr{1@} if @[arg] is undefined, @expr{0@} (zero) otherwise.    *!    *! @seealso    *! @[zero_type], @[destructedp], @[intp]    */   PMOD_EXPORT void f_undefinedp(INT32 args)   { -  if( args<1 ) -  SIMPLE_TOO_FEW_ARGS_ERROR("undefinedp", 1); +  if( args!=1 ) +  SIMPLE_WRONG_NUM_ARGS_ERROR("undefinedp", 1);    f_zero_type(args);    Pike_sp[-1].u.integer = ( Pike_sp[-1].u.integer == NUMBER_UNDEFINED);   }      /*! @decl int destructedp(mixed arg)    *!    *! Returns @expr{1@} if @[arg] is a destructed object, @expr{0@}    *! (zero) otherwise.    *!    *! @seealso    *! @[zero_type], @[undefinedp], @[intp]    */   PMOD_EXPORT void f_destructedp(INT32 args)   { -  if( args<1 ) -  SIMPLE_TOO_FEW_ARGS_ERROR("destructedp", 1); +  if( args!=1 ) +  SIMPLE_WRONG_NUM_ARGS_ERROR("destructedp", 1);    f_zero_type(args);    Pike_sp[-1].u.integer = ( Pike_sp[-1].u.integer == NUMBER_DESTRUCTED);   }      /*! @decl int programp(mixed arg)    *!    *! Returns @expr{1@} if @[arg] is a program, @expr{0@} (zero) otherwise.    *!    *! @seealso    *! @[mappingp()], @[intp()], @[arrayp()], @[stringp()], @[objectp()],    *! @[multisetp()], @[floatp()], @[functionp()]    */   PMOD_EXPORT void f_programp(INT32 args)   { -  if(args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("programp", 1); +  if(args!=1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("programp", 1);    switch(TYPEOF(Pike_sp[-args]))    {    case T_PROGRAM:    pop_n_elems(args);    push_int(1);    return;       case T_FUNCTION:    if(program_from_function(Pike_sp-args))    {
pike.git/src/builtin_functions.c:5190:    *!    *! @seealso    *! @[Array.sort_array], @[reverse()]    */   PMOD_EXPORT void f_sort(INT32 args)   {    INT32 e,*order;    struct array *a;       if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("sort", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("sort", 1);    if(TYPEOF(Pike_sp[-args]) != T_ARRAY)    SIMPLE_ARG_TYPE_ERROR("sort", 1, "array");    a = Pike_sp[-args].u.array;       for(e=1;e<args;e++)    {    if(TYPEOF(Pike_sp[e-args]) != T_ARRAY)    SIMPLE_ARG_TYPE_ERROR("sort", e+1, "array");       if(Pike_sp[e-args].u.array->size != a->size)
pike.git/src/builtin_functions.c:5723:    *! @[time()], @[ctime()], @[localtime()], @[gmtime()]    */   PMOD_EXPORT void f_mktime (INT32 args)   {    INT_TYPE sec, min, hour, mday, mon, year;    INT_TYPE isdst = -1, tz = 0;    struct tm date;    time_t retval;       if (args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("mktime", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("mktime", 1);       if(args == 1)    {    memset(&date, 0, sizeof(date));       push_static_text("sec");    push_static_text("min");    push_static_text("hour");    push_static_text("mday");    push_static_text("mon");
pike.git/src/builtin_functions.c:5965:    return 0;   }      PMOD_EXPORT void f_glob(INT32 args)   {    INT32 i;    struct array *a;    struct svalue *glob;    int nglobs;    -  if(args < 2) -  SIMPLE_TOO_FEW_ARGS_ERROR("glob", 2); +  if(args != 2) +  SIMPLE_WRONG_NUM_ARGS_ERROR("glob", 2);    -  if(args > 2) -  pop_n_elems(args-2); -  args=2; -  +     if (TYPEOF(Pike_sp[-args]) == T_STRING)    {    glob=Pike_sp-args;    nglobs = 1;    }    else if( TYPEOF(Pike_sp[-args]) == PIKE_T_ARRAY)    {    struct array *ga = Pike_sp[-args].u.array;    glob = ga->item;    nglobs = ga->size;
pike.git/src/builtin_functions.c:7519:    *! Return the runtime type of @[x].    *!    *! @seealso    *! @[typeof()]    */   PMOD_EXPORT void f__typeof(INT32 args)   {    struct pike_type *t;       if(!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("_typeof", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("_typeof", 1);       t = get_type_of_svalue(Pike_sp-args);       pop_n_elems(args);    push_type_value(t);   }      /*! @decl void replace_master(object o)    *!    *! Replace the master object with @[o].
pike.git/src/builtin_functions.c:7546:    *! FIXME: Tell how to inherit the master.    *!    *! @seealso    *! @[master()]    */   PMOD_EXPORT void f_replace_master(INT32 args)   {    struct object *new_master;       if(!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("replace_master", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("replace_master", 1);    if(TYPEOF(Pike_sp[-args]) != T_OBJECT)    SIMPLE_ARG_TYPE_ERROR("replace_master", 1, "object");    new_master = Pike_sp[-args].u.object;    if(!new_master->prog)    bad_arg_error("replace_master", Pike_sp-args, args, 1, "object", Pike_sp-args,    "Called with destructed object.\n");       if (SUBTYPEOF(Pike_sp[-args]))    bad_arg_error("replace_master", Pike_sp-args, args, 1, "object", Pike_sp-args,    "Subtyped master objects are not supported yet.\n");
pike.git/src/builtin_functions.c:7806: Inside #if defined(PROFILING)
   *! This function is only available if the runtime was compiled with    *! the option @tt{--with-profiling@}.    */   static void f_get_prof_info(INT32 args)   {    struct program *prog = 0;    int num_functions;    int i;       if (!args) { -  SIMPLE_TOO_FEW_ARGS_ERROR("get_profiling_info", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("get_profiling_info", 1);    }    prog = program_from_svalue(Pike_sp-args);    if(!prog)    SIMPLE_ARG_TYPE_ERROR("get_profiling_info", 1, "program");       /* ({ num_clones, ([ "fun_name":({ num_calls, total_time, self_time }) ]) })    */       pop_n_elems(args-1);    args = 1;
pike.git/src/builtin_functions.c:8046:    */   PMOD_EXPORT void f_transpose(INT32 args)   {    struct array *out;    struct array *in;    struct array *outinner;    INT32 sizeininner=0,sizein=0;    INT32 j,i;    TYPE_FIELD type=0;    -  if (args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("transpose", 1); +  if (args!=1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("transpose", 1);       if (TYPEOF(Pike_sp[-args]) != T_ARRAY)    SIMPLE_ARG_TYPE_ERROR("transpose", 1, "array(array)");       in=Pike_sp[-args].u.array;    sizein=in->size;       if(!sizein)    {    push_empty_array();
pike.git/src/builtin_functions.c:8174:    *! @[filter()], @[enumerate()], @[foreach()]    */   PMOD_EXPORT void f_map(INT32 args)   {    struct svalue *mysp;    struct array *a,*d;    int splice,i,n;    TYPE_FIELD types;       if (args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("map", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("map", 1);    else if (args<2)    { push_int(0); args++; }       switch (TYPEOF(Pike_sp[-args]))    {    case T_ARRAY:    break;       case T_MAPPING:    case T_PROGRAM:
pike.git/src/builtin_functions.c:8518:    *! @seealso    *! @[map()], @[foreach()]    */   PMOD_EXPORT void f_filter(INT32 args)   {    int n,i,m,k;    struct array *a,*y,*f;    struct svalue *mysp;       if (args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("filter", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("filter", 1);       switch (TYPEOF(Pike_sp[-args]))    {    case T_ARRAY:    if (args >= 2 && TYPEOF(Pike_sp[1-args]) == T_ARRAY) {    if (Pike_sp[1-args].u.array->size != Pike_sp[-args].u.array->size)    SIMPLE_ARG_TYPE_ERROR("filter", 2, "array of same size as the first");    pop_n_elems(args-2);    }    else {
pike.git/src/builtin_functions.c:8763:    *! @seealso    *! @[map()], @[foreach()]    */   void f_enumerate(INT32 args)   {    struct array *d;    int i;    INT_TYPE n;       if (args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("enumerate", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("enumerate", 1);    if (args<2)    {    push_int(1);    args++;    }    if (args<3)    {    push_int(0);    args++;    }