2000-12-01
2000-12-01 08:10:41 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
b2d3e49eec1c09ca1c80be79bfd6c65e50362ccb
(73 lines)
(+37/-36)
[
Show
| Annotate
]
Branch: 7.9
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
5:
\*/
/**/
#include "global.h"
- RCSID("$Id: builtin_functions.c,v 1.317 2000/10/31 10:05:21 mirar Exp $");
+ RCSID("$Id: builtin_functions.c,v 1.318 2000/12/01 08:09:44 hubbe Exp $");
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
#include "object.h"
#include "program.h"
#include "array.h"
- #include "error.h"
+ #include "pike_error.h"
#include "constants.h"
#include "mapping.h"
#include "stralloc.h"
556:
CASE_SHIFT(2,0);
CASE_SHIFT(2,1);
default:
- error("has_prefix(): Unexpected string shift combination: a:%d, b:%d!\n",
+ Pike_error("has_prefix(): Unexpected string shift combination: a:%d, b:%d!\n",
a->size_shift, b->size_shift);
break;
}
603:
case T_OBJECT:
/* FIXME: If the object behaves like an array, it will throw an
- error for non-valid indices. Therefore it's not a good idea
+ Pike_error for non-valid indices. Therefore it's not a good idea
to use the index operator.
Maybe we should use object->_has_index(index) provided that
1127:
/* 0xfffe: Byte-order detection illegal character.
* 0xffff: Illegal character.
*/
- error("string_to_unicode(): Illegal character 0x%04x (index %ld) "
+ Pike_error("string_to_unicode(): Illegal character 0x%04x (index %ld) "
"is not a Unicode character.",
str2[i], PTRDIFF_T_TO_LONG(i));
}
if (str2[i] > 0x10ffff) {
- error("string_to_unicode(): Character 0x%08x (index %ld) "
+ Pike_error("string_to_unicode(): Character 0x%08x (index %ld) "
"is out of range (0x00000000 - 0x0010ffff).",
str2[i], PTRDIFF_T_TO_LONG(i));
}
1164: Inside #if defined(PIKE_DEBUG)
}
#ifdef PIKE_DEBUG
if (j) {
- fatal("string_to_unicode(): Indexing error: len:%ld, j:%ld.\n",
+ fatal("string_to_unicode(): Indexing Pike_error: len:%ld, j:%ld.\n",
PTRDIFF_T_TO_LONG(len), PTRDIFF_T_TO_LONG(j));
}
#endif /* PIKE_DEBUG */
1172:
}
break;
default:
- error("string_to_unicode(): Bad string shift: %d!\n", in->size_shift);
+ Pike_error("string_to_unicode(): Bad string shift: %d!\n", in->size_shift);
break;
}
pop_n_elems(args);
1260:
if (c & ~0x7fffffff) {
/* 32bit or more. */
if (!extended) {
- error("string_to_utf8(): "
+ Pike_error("string_to_utf8(): "
"Value 0x%08x (index %ld) is larger than 31 bits.\n",
c, PTRDIFF_T_TO_LONG(i));
}
1363:
if (c & 0x80) {
int cont = 0;
if ((c & 0xc0) == 0x80) {
- error("utf8_to_string(): "
+ Pike_error("utf8_to_string(): "
"Unexpected continuation block 0x%02x at index %d.\n",
c, i);
}
1395:
} else if (c == 0xfe) {
/* 36bit */
if (!extended) {
- error("utf8_to_string(): "
+ Pike_error("utf8_to_string(): "
"Character 0xfe at index %d when not in extended mode.\n",
i);
}
cont = 6;
} else {
- error("utf8_to_string(): "
+ Pike_error("utf8_to_string(): "
"Unexpected character 0xff at index %d.\n",
i);
}
1409:
while(cont--) {
i++;
if (i >= in->len) {
- error("utf8_to_string(): Truncated UTF8 sequence.\n");
+ Pike_error("utf8_to_string(): Truncated UTF8 sequence.\n");
}
c = ((unsigned char *)(in->str))[i];
if ((c & 0xc0) != 0x80) {
- error("utf8_to_string(): "
+ Pike_error("utf8_to_string(): "
"Expected continuation character at index %d (got 0x%02x).\n",
i, c);
}
1485:
struct pike_string *res;
if( Pike_sp[-1].type != T_STRING ||
Pike_sp[-1].u.string->size_shift )
- error( "__parse_type requires a 8bit string as its first argument\n" );
+ Pike_error( "__parse_type requires a 8bit string as its first argument\n" );
res = parse_type( (char *)STR0(Pike_sp[-1].u.string) );
pop_stack();
push_string( res );
1590:
if(Pike_sp[-args].type != T_INT)
SIMPLE_BAD_ARG_ERROR("exit", 1, "int");
- if(in_exit) error("exit already called!\n");
+ if(in_exit) Pike_error("exit already called!\n");
in_exit=1;
assign_svalue(&throw_value, Pike_sp-args);
1705: Inside #if defined(PIKE_SECURITY)
PIKE_ERROR("destruct", "Object can't be destructed explicitly.\n", Pike_sp, args);
#ifdef PIKE_SECURITY
if(!CHECK_DATA_SECURITY(o, SECURITY_BIT_DESTRUCT))
- error("Destruct permission denied.\n");
+ Pike_error("Destruct permission denied.\n");
#endif
destruct(o);
pop_n_elems(args);
2284:
int set_end[256];
if(from->size != to->size)
- error("Replace must have equal-sized from and to arrays.\n");
+ Pike_error("Replace must have equal-sized from and to arrays.\n");
if(!from->size)
{
2299:
if(ITEM(from)[e].type != T_STRING)
{
free((char *)v);
- error("Replace: from array is not array(string)\n");
+ Pike_error("Replace: from array is not array(string)\n");
}
if(ITEM(to)[e].type != T_STRING)
{
free((char *)v);
- error("Replace: to array is not array(string)\n");
+ Pike_error("Replace: to array is not array(string)\n");
}
if(ITEM(from)[e].u.string->size_shift > str->size_shift)
3076:
i = j + 1 + low_parse_format(s + j + 1, slen - (j+1));
f_aggregate(1);
if ((i + 2 >= slen) || (s[i] != '%') || (s[i+1] != '}')) {
- error("parse_format(): Expected %%}.\n");
+ Pike_error("parse_format(): Expected %%}.\n");
}
i += 2;
break;
3094:
break;
}
if (j == slen) {
- error("parse_format(): Unterminated %%-expression.\n");
+ Pike_error("parse_format(): Unterminated %%-expression.\n");
}
offset = i = j;
}
3122:
len = low_parse_format(STR0(s), s->len);
if (len != s->len) {
- error("parse_format(): Unexpected %%} in format string at offset %ld\n",
+ Pike_error("parse_format(): Unexpected %%} in format string at offset %ld\n",
PTRDIFF_T_TO_LONG(len));
}
#ifdef PIKE_DEBUG
3274: Inside #if defined(PIKE_DEBUG)
INT_TYPE low = 0x7fffffff;
#ifdef PIKE_DEBUG
if (ITEM(arr)[i].type != T_MAPPING) {
- error("interleave_array(): Element %d is not a mapping!\n", i);
+ Pike_error("interleave_array(): Element %d is not a mapping!\n", i);
}
#endif /* PIKE_DEBUG */
m = ITEM(arr)[i].u.mapping;
MAPPING_LOOP(m) {
if (k->ind.type != T_INT) {
- error("interleave_array(): Index not an integer in mapping %d!\n", i);
+ Pike_error("interleave_array(): Index not an integer in mapping %d!\n", i);
}
if (low > k->ind.u.integer) {
low = k->ind.u.integer;
if (low < 0) {
- error("interleave_array(): Index %d in mapping %d is negative!\n",
+ Pike_error("interleave_array(): Index %d in mapping %d is negative!\n",
low, i);
}
}
3369:
char *newtab = realloc(tab, size*2 + max);
if (!newtab) {
free(tab);
- error("interleave_array(): Couldn't extend table!\n");
+ Pike_error("interleave_array(): Couldn't extend table!\n");
}
tab = newtab;
MEMSET(tab + size + max, 0, size);
3461:
stack[pos] = i;
}
- /* FIXME(?) memory unfreed upon error here */
+ /* FIXME(?) memory unfreed upon Pike_error here */
res = low_allocate_array(top, 0);
while (ltop != -1)
{
3901:
free(marks);
- /* FIXME(?) memory unfreed upon error here. */
+ /* FIXME(?) memory unfreed upon Pike_error here. */
a=low_allocate_array(top,0);
if (top)
{
4075: Inside #if defined(PIKE_DEBUG)
while(dml) {
#ifdef PIKE_DEBUG
if (i >= sz) {
- fatal("Consistency error in diff_dyn_longest_sequence()\n");
+ fatal("Consistency Pike_error in diff_dyn_longest_sequence()\n");
}
#endif /* PIKE_DEBUG */
#ifdef DIFF_DEBUG
4089: Inside #if defined(PIKE_DEBUG)
}
#ifdef PIKE_DEBUG
if (i != sz) {
- fatal("Consistency error in diff_dyn_longest_sequence()\n");
+ fatal("Consistency Pike_error in diff_dyn_longest_sequence()\n");
}
#endif /* PIKE_DEBUG */
4104:
struct array *ad,*bd;
ptrdiff_t bi, ai, lbi, lai, i, eqstart;
- /* FIXME(?) memory unfreed upon error here (and later) */
+ /* FIXME(?) memory unfreed upon Pike_error here (and later) */
ad=low_allocate_array(0,32);
bd=low_allocate_array(0,32);
4771:
{
array_fix_type_field(in);
if(!in->type_field || in->type_field & ~BIT_ARRAY)
- error("The array given as argument 1 to transpose must contain arrays only.\n");
+ Pike_error("The array given as argument 1 to transpose must contain arrays only.\n");
}
sizeininner=in->item->u.array->size;
for(i=1 ; i<sizein; i++)
if (sizeininner!=(in->item+i)->u.array->size)
- error("The array given as argument 1 to transpose must contain arrays of the same size.\n");
+ Pike_error("The array given as argument 1 to transpose must contain arrays of the same size.\n");
out=allocate_array(sizeininner);
4930:
if arr->_sizeof && arr->`[]
array ret; ret[i]=arr[i];
ret=map(ret,fun,@extra);
- error
+ Pike_error
- * * error (ie arr or fun = float or bad int )
+ * * Pike_error (ie arr or fun = float or bad int )
*/