Branch: Tag:

2001-12-16

2001-12-16 02:49:50 by Martin Stjernholm <mast@lysator.liu.se>

Replaced IS_ZERO with SAFE_IS_ZERO, except where it's obvious that
UNSAFE_IS_ZERO works.

Rev: src/array.c:1.121
Rev: src/builtin.cmod:1.72
Rev: src/builtin_functions.c:1.418
Rev: src/cpp.c:1.96
Rev: src/encode.c:1.135
Rev: src/interpret.c:1.254
Rev: src/interpret_functions.h:1.98
Rev: src/iterators.cmod:1.17
Rev: src/language.yacc:1.267
Rev: src/las.c:1.277
Rev: src/module_support.c:1.42
Rev: src/modules/Image/encodings/_xpm.c:1.18
Rev: src/modules/Image/encodings/ilbm.c:1.23
Rev: src/modules/Image/encodings/png.c:1.43
Rev: src/modules/Image/encodings/pvr.c:1.16
Rev: src/modules/Image/encodings/ras.c:1.15
Rev: src/modules/Image/encodings/xbm.c:1.15
Rev: src/modules/Parser/html.c:1.148
Rev: src/modules/_Image_GIF/image_gif.c:1.8
Rev: src/modules/files/efuns.c:1.107
Rev: src/modules/files/file.c:1.230
Rev: src/modules/files/socket.c:1.57
Rev: src/modules/files/stat.c:1.19
Rev: src/modules/files/udp.c:1.28
Rev: src/modules/spider/xml.c:1.47
Rev: src/modules/sprintf/sprintf.c:1.86
Rev: src/multiset.c:1.45
Rev: src/opcodes.c:1.118
Rev: src/operators.c:1.144
Rev: src/post_modules/GTK/source/gtkclist.pre:1.13
Rev: src/preprocessor.h:1.48
Rev: src/program.c:1.392
Rev: src/signal_handler.c:1.212
Rev: src/threads.c:1.177

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.391 2001/12/14 10:03:53 grubba Exp $"); + RCSID("$Id: program.c,v 1.392 2001/12/16 02:49:43 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
751:    struct svalue *tmp=low_mapping_string_lookup(*module_index_cache,ident);    if(tmp)    { -  if(!(IS_ZERO(tmp) && tmp->subtype==1)) +  if(!(SAFE_IS_ZERO(tmp) && tmp->subtype==1))    return mksvaluenode(tmp);    return 0;    }
775:       push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1); -  if (IS_ZERO(sp-1)) yy_describe_exception(&thrown); +  if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);    } else {
867:    struct svalue *tmp=low_mapping_string_lookup(resolve_cache,ident);    if(tmp)    { -  if(!(IS_ZERO(tmp) && tmp->subtype==1)) +  if(!(SAFE_IS_ZERO(tmp) && tmp->subtype==1))    return mkconstantsvaluenode(tmp);       return 0;
899:    resolve_cache=dmalloc_touch(struct mapping *, allocate_mapping(10));    mapping_string_insert(resolve_cache,ident,Pike_sp-1);    -  if(!(IS_ZERO(Pike_sp-1) && Pike_sp[-1].subtype==1)) +  if(!(SAFE_IS_ZERO(Pike_sp-1) && Pike_sp[-1].subtype==1))    {    ret=mkconstantsvaluenode(Pike_sp-1);    }
923:       push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1); -  if (IS_ZERO(sp-1)) yy_describe_exception(&thrown); +  if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);    }
2874:    my_yyerror("Error finding program");    push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1); -  if (IS_ZERO(sp-1)) yy_describe_exception(&thrown); +  if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);    }
3914:       push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1); -  if (IS_ZERO(sp-1)) yy_describe_exception(&thrown); +  if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);   
4654:    int ret=0;    struct Supporter *c,*cc;    verify_supporters(); -  if (force_resolve) return 0; +  if (force_resolve) +  return 0;    for(cc=current_supporter;cc;cc=cc->previous)    {    if(cc->prog &&
5024:    throw_value.type = T_INT;    push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1); -  if (IS_ZERO(sp-1)) yy_describe_exception(&thrown); +  if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);    zap_placeholder(c);
5097:    if(c->handler)    {    safe_apply(c->handler,"get_default_module",0); -  if(IS_ZERO(Pike_sp-1)) +  if(SAFE_IS_ZERO(Pike_sp-1))    {    pop_stack();    ref_push_mapping(get_builtin_constants());