Branch: Tag:

2000-12-01

2000-12-01 08:10:41 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

renamed error (and error.h) to Pike_error

Rev: src/array.c:1.97
Rev: src/backend.c:1.61
Rev: src/bignum.c:1.19
Rev: src/block_alloc.h:1.26
Rev: src/builtin_functions.c:1.318
Rev: src/callback.c:1.21
Rev: src/constants.c:1.24
Rev: src/cpp.c:1.78
Rev: src/cyclic.h:1.5
Rev: src/docode.c:1.86
Rev: src/dynamic_buffer.c:1.13
Rev: src/dynamic_load.c:1.47
Rev: src/encode.c:1.78
Rev: src/error.c:1.65
Rev: src/fd_control.c:1.34
Rev: src/fdlib.c:1.47
Rev: src/fsort.c:1.15
Rev: src/gc.c:1.143
Rev: src/hashtable.c:1.8
Rev: src/interpret.c:1.176
Rev: src/interpret.h:1.69
Rev: src/interpret_functions.h:1.34
Rev: src/interpreter.h:1.52
Rev: src/las.c:1.226
Rev: src/lex.c:1.85
Rev: src/lexer.h:1.24
Rev: src/main.c:1.108
Rev: src/mapping.c:1.112
Rev: src/module.c:1.12
Rev: src/module_support.c:1.38
Rev: src/modules/CommonLog/clf.c:1.5
Rev: src/modules/Gdbm/gdbmmod.c:1.12
Rev: src/modules/Gettext/gettext.c:1.6
Rev: src/modules/Gmp/mpz_glue.c:1.83
Rev: src/modules/Gz/gz_test.c:1.4
Rev: src/modules/Gz/zlibmod.c:1.32
Rev: src/modules/HTTPLoop/accept_and_parse.c:1.21
Rev: src/modules/HTTPLoop/log.c:1.9
Rev: src/modules/HTTPLoop/requestobject.c:1.16
Rev: src/modules/Image/blit.c:1.49
Rev: src/modules/Image/colors.c:1.41
Rev: src/modules/Image/colortable.c:1.101
Rev: src/modules/Image/colortable.h:1.23
Rev: src/modules/Image/colortable_lookup.h:1.15
Rev: src/modules/Image/dct.c:1.17
Rev: src/modules/Image/encodings/_xpm.c:1.15
Rev: src/modules/Image/encodings/any.c:1.20
Rev: src/modules/Image/encodings/avs.c:1.12
Rev: src/modules/Image/encodings/bmp.c:1.30
Rev: src/modules/Image/encodings/dsi.c:1.3
Rev: src/modules/Image/encodings/gd.c:1.5
Rev: src/modules/Image/encodings/hrz.c:1.6
Rev: src/modules/Image/encodings/iff.c:1.9
Rev: src/modules/Image/encodings/ilbm.c:1.21
Rev: src/modules/Image/encodings/pcx.c:1.14
Rev: src/modules/Image/encodings/png.c:1.40
Rev: src/modules/Image/encodings/pnm.c:1.24
Rev: src/modules/Image/encodings/psd.c:1.26
Rev: src/modules/Image/encodings/pvr.c:1.12
Rev: src/modules/Image/encodings/ras.c:1.13
Rev: src/modules/Image/encodings/tga.c:1.25
Rev: src/modules/Image/encodings/tim.c:1.11
Rev: src/modules/Image/encodings/wbf.c:1.7
Rev: src/modules/Image/encodings/x.c:1.35
Rev: src/modules/Image/encodings/xbm.c:1.12
Rev: src/modules/Image/encodings/xcf.c:1.34
Rev: src/modules/Image/encodings/xwd.c:1.19
Rev: src/modules/Image/font.c:1.66
Rev: src/modules/Image/image.c:1.182
Rev: src/modules/Image/image.h:1.45
Rev: src/modules/Image/image_module.c:1.9
Rev: src/modules/Image/layers.c:1.58
Rev: src/modules/Image/match.h:1.11
Rev: src/modules/Image/matrix.c:1.30
Rev: src/modules/Image/operator.c:1.34
Rev: src/modules/Image/orient.c:1.18
Rev: src/modules/Image/pattern.c:1.23
Rev: src/modules/Image/phase.h:1.3
Rev: src/modules/Image/poly.c:1.11
Rev: src/modules/Image/polyfill.c:1.36
Rev: src/modules/Image/search.c:1.19
Rev: src/modules/Java/jvm.c:1.30
Rev: src/modules/MIME/mime.c:1.27
Rev: src/modules/Math/math_matrix.c:1.19
Rev: src/modules/Mird/mird_glue.c:1.10
Rev: src/modules/Msql/msqlmod.c:1.15
Rev: src/modules/Mysql/mysql.c:1.38
Rev: src/modules/Mysql/precompiled_mysql.h:1.10
Rev: src/modules/Mysql/result.c:1.17
Rev: src/modules/Odbc/odbc.c:1.23
Rev: src/modules/Odbc/odbc_result.c:1.24
Rev: src/modules/Oracle/oracle.c:1.51
Rev: src/modules/Parser/html.c:1.120
Rev: src/modules/Parser/parser.c:1.11
Rev: src/modules/Perl/perlmod.c:1.22
Rev: src/modules/Pipe/pipe.c:1.44
Rev: src/modules/Postgres/pgresult.c:1.15
Rev: src/modules/Postgres/postgres.c:1.20
Rev: src/modules/Regexp/glue.c:1.19
Rev: src/modules/Regexp/pike_regexp.c:1.20
Rev: src/modules/SANE/sane.c:1.8
Rev: src/modules/Ssleay/ssleay.c:1.13
Rev: src/modules/Yp/yp.c:1.20
Rev: src/modules/_Charset/charsetmod.c:1.25
Rev: src/modules/_Charset/iso2022.c:1.20
Rev: src/modules/_Crypto/arcfour.c:1.13
Rev: src/modules/_Crypto/cast.c:1.9
Rev: src/modules/_Crypto/cbc.c:1.18
Rev: src/modules/_Crypto/crypto.c:1.40
Rev: src/modules/_Crypto/des.c:1.18
Rev: src/modules/_Crypto/idea.c:1.16
Rev: src/modules/_Crypto/invert.c:1.11
Rev: src/modules/_Crypto/md2.c:1.10
Rev: src/modules/_Crypto/md5.c:1.15
Rev: src/modules/_Crypto/nt.c:1.7
Rev: src/modules/_Crypto/pipe.c:1.19
Rev: src/modules/_Crypto/rijndael.c:1.4
Rev: src/modules/_Crypto/rsa.c:1.24
Rev: src/modules/_Crypto/sha.c:1.18
Rev: src/modules/_Image_GIF/image_gif.c:1.2
Rev: src/modules/_Image_JPEG/image_jpeg.c:1.36
Rev: src/modules/_Image_TIFF/image_tiff.c:1.22
Rev: src/modules/_Image_TTF/image_ttf.c:1.37
Rev: src/modules/_Image_XFace/image_xface.c:1.14
Rev: src/modules/_Roxen/roxen.c:1.7
Rev: src/modules/_math/math.c:1.34
Rev: src/modules/call_out/call_out.c:1.40
Rev: src/modules/files/efuns.c:1.88
Rev: src/modules/files/file.c:1.204
Rev: src/modules/files/sendfile.c:1.50
Rev: src/modules/files/socket.c:1.52
Rev: src/modules/files/stat.c:1.15
Rev: src/modules/files/termios.c:1.10
Rev: src/modules/files/udp.c:1.18
Rev: src/modules/spider/discdate.c:1.8
Rev: src/modules/spider/spider.c:1.101
Rev: src/modules/spider/stardate.c:1.11
Rev: src/modules/spider/xml.c:1.29
Rev: src/modules/sprintf/sprintf.c:1.74
Rev: src/modules/sybase/sybase.c:1.5
Rev: src/modules/sybase/sybase.h:1.2
Rev: src/modules/system/nt.c:1.28
Rev: src/modules/system/syslog.c:1.10
Rev: src/modules/system/system.c:1.94
Rev: src/multiset.c:1.30
Rev: src/object.c:1.154
Rev: src/opcodes.c:1.95
Rev: src/operators.c:1.113
Rev: src/peep.c:1.42
Rev: src/pike_memory.c:1.93
Rev: src/pike_search.c:1.4
Rev: src/pike_types.c:1.143
Rev: src/port.c:1.34
Rev: src/post_modules/GL/auto.c.in:1.16
Rev: src/post_modules/GL/top.c:1.13
Rev: src/post_modules/GLUT/auto.c.in:1.3
Rev: src/post_modules/GLUT/top.c:1.4
Rev: src/post_modules/GTK/source/encode_truecolor.c:1.4
Rev: src/post_modules/GTK/source/support.c:1.19
Rev: src/preprocessor.h:1.35
Rev: src/program.c:1.283
Rev: src/queue.c:1.7
Rev: src/security.c:1.28
Rev: src/security.h:1.12
Rev: src/signal_handler.c:1.185
Rev: src/smartlink.c:1.11
Rev: src/stralloc.c:1.109
Rev: src/svalue.c:1.89
Rev: src/svalue.h:1.71
Rev: src/threads.c:1.147
Rev: src/threads.h:1.107

15:   #include "multiset.h"   #include "opcodes.h"   #include "object.h" - #include "error.h" + #include "pike_error.h"   #include "pike_types.h"   #include "pike_memory.h"   #include "fd_control.h"
26:   #include "bignum.h"   #include "operators.h"    - RCSID("$Id: opcodes.c,v 1.94 2000/11/29 13:14:18 mirar Exp $"); + RCSID("$Id: opcodes.c,v 1.95 2000/12/01 08:09:51 hubbe Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {
35: Inside #if defined(PIKE_SECURITY)
  #ifdef PIKE_SECURITY    if(what->type <= MAX_COMPLEX)    if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX)) -  error("Index permission denied.\n"); +  Pike_error("Index permission denied.\n");   #endif       switch(what->type)
49: Inside #if defined(AUTO_BIGNUM)
   index_no_free(to, what, ind);    if(IS_UNDEFINED(to)) {    if (val) { -  error("Indexing the integer %d with an unknown method.\n", val); +  Pike_error("Indexing the integer %d with an unknown method.\n", val);    } else {    if(ind->type == T_STRING) -  error("Indexing the NULL value with \"%s\".\n", ind->u.string->str); +  Pike_error("Indexing the NULL value with \"%s\".\n", ind->u.string->str);    else -  error("Indexing the NULL value.\n"); +  Pike_error("Indexing the NULL value.\n");    }    }    }
89:    if(i<0 || i>=what->u.string->len)    {    if(what->u.string->len == 0) -  error("Attempt to index the empty string with %d.\n", i); +  Pike_error("Attempt to index the empty string with %d.\n", i);    else -  error("Index %d is out of string range 0 - %ld.\n", +  Pike_error("Index %d is out of string range 0 - %ld.\n",    i, PTRDIFF_T_TO_LONG(what->u.string->len - 1));    } else    i=index_shared_string(what->u.string,i);
100:    to->u.integer=i;    break;    }else{ -  error("Index is not an integer.\n"); +  Pike_error("Index is not an integer.\n");    }       case T_PROGRAM:
118:    /* FALL THROUGH */       default: -  error("Indexing a basic type.\n"); +  Pike_error("Indexing a basic type.\n");    }   }   
147:    s=describe_type(type);    push_string(s);    if(!sp[-2].u.object->prog) -  error("Cast called on destructed object.\n"); +  Pike_error("Cast called on destructed object.\n");    if(FIND_LFUN(sp[-2].u.object->prog,LFUN_CAST) == -1) -  error("No cast method in object.\n"); +  Pike_error("No cast method in object.\n");    apply_lfun(sp[-2].u.object, LFUN_CAST, 1);    free_svalue(sp-2);    sp[-2]=sp[-1];
160:    switch(run_time_type)    {    default: -  error("Cannot perform cast to that type.\n"); +  Pike_error("Cannot perform cast to that type.\n");       case T_MIXED:    return;
176:    }       default: -  error("Cannot cast %s to multiset.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to multiset.\n",get_name_of_type(sp[-1].type));    }    break;   
194:    for (i=0; i<a->size; i++)    {    if (ITEM(a)[i].type!=T_ARRAY) -  error("Cast array to mapping: " +  Pike_error("Cast array to mapping: "    "element %d is not an array\n", i);    b=ITEM(a)[i].u.array;    if (b->size!=2) -  error("Cast array to mapping: " +  Pike_error("Cast array to mapping: "    "element %d is not an array of size 2\n", i);    mapping_insert(m,ITEM(b)+0,ITEM(b)+1);    }
208:    }       default: -  error("Cannot cast %s to mapping.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to mapping.\n",get_name_of_type(sp[-1].type));    }    break;   
232:    break;       default: -  error("Cannot cast %s to array.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to array.\n",get_name_of_type(sp[-1].type));       }    break;
282:    break;       default: -  error("Cannot cast %s to int.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to int.\n",get_name_of_type(sp[-1].type));    }       break;
304:    break;       default: -  error("Cannot cast %s to float.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to float.\n",get_name_of_type(sp[-1].type));    }       sp[-1].type=T_FLOAT;
335:    for(i = a->size; i--; ) {    unsigned INT32 val;    if (a->item[i].type != T_INT) { -  error("cast: Item %d is not an integer.\n", i); +  Pike_error("cast: Item %d is not an integer.\n", i);    }    val = (unsigned INT32)a->item[i].u.integer;    if (val > 0xff) {
344:    shift = 2;    while(i--)    if (a->item[i].type != T_INT) -  error("cast: Item %d is not an integer.\n", i); +  Pike_error("cast: Item %d is not an integer.\n", i);    break;    }    while(i--) {    if (a->item[i].type != T_INT) { -  error("cast: Item %d is not an integer.\n", i); +  Pike_error("cast: Item %d is not an integer.\n", i);    }    val = (unsigned INT32)a->item[i].u.integer;    if (val > 0xffff) {    shift = 2;    while(i--)    if (a->item[i].type != T_INT) -  error("cast: Item %d is not an integer.\n", i); +  Pike_error("cast: Item %d is not an integer.\n", i);    break;    }    }
399:    break;       default: -  error("Cannot cast %s to string.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to string.\n",get_name_of_type(sp[-1].type));    }       sp[-1].type=T_STRING;
426:    break;       default: -  error("Cannot cast %s to object.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to object.\n",get_name_of_type(sp[-1].type));    }    break;   
460:    return;       default: -  error("Cannot cast %s to a program.\n",get_name_of_type(sp[-1].type)); +  Pike_error("Cannot cast %s to a program.\n",get_name_of_type(sp[-1].type));    }    }    }
479:    if(f) goto emulated_type_ok;    }    } -  error("Cast failed, wanted %s, got %s\n", +  Pike_error("Cast failed, wanted %s, got %s\n",    get_name_of_type(run_time_type),    get_name_of_type(sp[-1].type));    }
650: Inside #if defined(PIKE_DEBUG)
   compile_type_to_runtime_type(sp[-2].u.string));   #ifdef PIKE_DEBUG    if(save_sp != sp) -  fatal("Internal error: o_cast() left droppings on stack.\n"); +  fatal("Internal Pike_error: o_cast() left droppings on stack.\n");   #endif    free_svalue(sp-2);    sp[-2]=sp[-1];
699:    CHAROPT( int set_size=0; ) \    \    if(cnt>=match_len) \ -  error("Error in sscanf format string.\n"); \ +  Pike_error("Error in sscanf format string.\n"); \    \    MEMSET(set->c, 0, sizeof(set->c)); \    set->a=0; \
709:    set->neg=1; \    cnt++; \    if(cnt>=match_len) \ -  error("Error in sscanf format string.\n"); \ +  Pike_error("Error in sscanf format string.\n"); \    }else{ \    set->neg=0; \    } \
719:    set->c[last=match[cnt]]=1; \    cnt++; \    if(cnt>=match_len) \ -  error("Error in sscanf format string.\n"); \ +  Pike_error("Error in sscanf format string.\n"); \    } \    \    for(;match[cnt]!=']';cnt++) \
728:    { \    cnt++; \    if(cnt>=match_len) \ -  error("Error in sscanf format string.\n"); \ +  Pike_error("Error in sscanf format string.\n"); \    \    if(match[cnt]==']') \    { \
737:    } \    \    if(last >= match[cnt]) \ -  error("Error in sscanf format string.\n"); \ +  Pike_error("Error in sscanf format string.\n"); \    \   CHAROPT( \    if(last < (size_t)sizeof(set->c)) \
796:    free_array(set->a); \    set->a=0; \    free((char *)order); \ -  error("Overlapping ranges in sscanf not supported.\n"); \ +  Pike_error("Overlapping ranges in sscanf not supported.\n"); \    } \    } \    \
1068:    \    cnt++; \    if(cnt>=match_len) \ -  error("Error in sscanf format string.\n"); \ +  Pike_error("Error in sscanf format string.\n"); \    \    while(1) \    { \
1078:    no_assign=1; \    cnt++; \    if(cnt>=match_len) \ -  error("Error in sscanf format string.\n"); \ +  Pike_error("Error in sscanf format string.\n"); \    continue; \    \    case '0': case '1': case '2': case '3': case '4': \
1104:    { \    if(e>=match_len) \    { \ -  error("Missing %%} in format string.\n"); \ +  Pike_error("Missing %%} in format string.\n"); \    break; /* UNREACHED */ \    } \    if(match[e]=='%') \
1307:    case 'F': \    if(field_length == -1) field_length = 4; \    if(field_length != 4 && field_length != 8) \ -  error("Invalid IEEE width %ld in sscanf format string.\n", \ +  Pike_error("Invalid IEEE width %ld in sscanf format string.\n", \    PTRDIFF_T_TO_LONG(field_length)); \    if(eye+field_length > input_len) \    { \
1380:    goto test_again; \    \    case 's': \ -  error("Illegal to have two adjecent %%s.\n"); \ +  Pike_error("Illegal to have two adjecent %%s.\n"); \    return 0; /* make gcc happy */ \    \    /* sscanf("foo-bar","%s%d",a,b) might not work as expected */ \
1534:    break; \    \    default: \ -  error("Unknown sscanf token %%%c(0x%02x)\n", \ +  Pike_error("Unknown sscanf token %%%c(0x%02x)\n", \    match[cnt], match[cnt]); \    } \    break; \
1604:    struct svalue *save_sp=sp;       if(sp[-args].type != T_STRING) -  error("Bad argument 1 to sscanf().\n"); +  Pike_error("Bad argument 1 to sscanf().\n");       if(sp[1-args].type != T_STRING) -  error("Bad argument 1 to sscanf().\n"); +  Pike_error("Bad argument 1 to sscanf().\n");       switch(sp[-args].u.string->size_shift*3 + sp[1-args].u.string->size_shift) {    /* input_shift : match_shift */
1693:    &x);    break;    default: -  error("Unsupported shift-combination to sscanf(): %d:%d\n", +  Pike_error("Unsupported shift-combination to sscanf(): %d:%d\n",    sp[-args].u.string->size_shift, sp[1-args].u.string->size_shift);    break;    }       if(sp-save_sp > args/2-1) -  error("Too few arguments for sscanf format.\n"); +  Pike_error("Too few arguments for sscanf format.\n");       for(x=0;x<sp-save_sp;x++)    assign_lvalue(save_sp-args+2+x*2,save_sp+x);
1817:    &x);    break;    default: -  error("Unsupported shift-combination to sscanf(): %d:%d\n", +  Pike_error("Unsupported shift-combination to sscanf(): %d:%d\n",    sp[-args].u.string->size_shift, sp[1-args].u.string->size_shift);    break;    }