diff --git a/.how_to_build_from_scratch b/.how_to_build_from_scratch index f6ec60894dd432446ffe31c1244aa385fa748205..be428e68a05eeb533f9f42162c7b0358fee3f8af 100644 --- a/.how_to_build_from_scratch +++ b/.how_to_build_from_scratch @@ -8,6 +8,12 @@ You will need autoconf, automake, gnu m4, bison, a C compiler and the GMP library. You probably also want to use GNU make and libz. + + + + + + If that doesn't work, or you like making things difficult for yourself, try the Old instructions: diff --git a/src/backend.c b/src/backend.c index 9895d504a4e9914799bb3ce10ad5ce30988fabf1..60a3477005937217ad71691cc103bef436bd7c89 100644 --- a/src/backend.c +++ b/src/backend.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: backend.c,v 1.61 2000/12/01 08:09:43 hubbe Exp $"); +RCSID("$Id: backend.c,v 1.62 2000/12/05 21:08:15 per Exp $"); #include "fdlib.h" #include "backend.h" #include <errno.h> @@ -869,7 +869,7 @@ void backend(void) if((active_poll_fds[i].revents & POLLHUP) || (active_poll_fds[i].revents & POLLERR)) { - /* Closed or Pike_error */ + /* Closed or error */ #ifdef PIKE_DEBUG if (active_poll_fds[i].revents & POLLERR) { fprintf(stderr, "Got POLLERR on fd %d\n", i); @@ -1051,7 +1051,7 @@ void backend(void) #ifdef WSAENOTSOCK case WSAENOTSOCK: #endif - fatal("Filedescriptor %d (%s) caused fatal Pike_error %d in backend.\n",i,fd_info(i),errno); + fatal("Filedescriptor %d (%s) caused fatal error %d in backend.\n",i,fd_info(i),errno); case EINTR: break; diff --git a/src/block_alloc.h b/src/block_alloc.h index 1ed339d9215e1ddfe7ad154c3d64937448fb0097..48bf76c719b288b4fece97cb79e7c103f0760a3f 100644 --- a/src/block_alloc.h +++ b/src/block_alloc.h @@ -1,4 +1,4 @@ -/* $Id: block_alloc.h,v 1.26 2000/12/01 08:09:44 hubbe Exp $ */ +/* $Id: block_alloc.h,v 1.27 2000/12/05 21:08:15 per Exp $ */ #undef PRE_INIT_BLOCK #undef INIT_BLOCK #undef EXIT_BLOCK @@ -186,7 +186,7 @@ struct DATA *PIKE_CONCAT(make_,DATA)(void *ptr, ptrdiff_t hval) \ struct DATA *p; \ \ DO_IF_DEBUG( if(!PIKE_CONCAT(DATA,_hash_table)) \ - fatal("Hash table Pike_error!\n"); ) \ + fatal("Hash table error!\n"); ) \ PIKE_CONCAT(num_,DATA)++; \ \ if(( PIKE_CONCAT(num_,DATA)>>2 ) >= \ diff --git a/src/builtin_functions.c b/src/builtin_functions.c index 1887a4b0ce2b9443a94a6da4447d1525c97b971d..04ee3f08bf2f801bb4986dbc27653e5f428d0c80 100644 --- a/src/builtin_functions.c +++ b/src/builtin_functions.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: builtin_functions.c,v 1.318 2000/12/01 08:09:44 hubbe Exp $"); +RCSID("$Id: builtin_functions.c,v 1.319 2000/12/05 21:08:16 per Exp $"); #include "interpret.h" #include "svalue.h" #include "pike_macros.h" @@ -603,7 +603,7 @@ PMOD_EXPORT void f_has_index(INT32 args) case T_OBJECT: /* FIXME: If the object behaves like an array, it will throw an - Pike_error for non-valid indices. Therefore it's not a good idea + 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 @@ -1164,7 +1164,7 @@ PMOD_EXPORT void f_string_to_unicode(INT32 args) } #ifdef PIKE_DEBUG if (j) { - fatal("string_to_unicode(): Indexing Pike_error: len:%ld, j:%ld.\n", + fatal("string_to_unicode(): Indexing error: len:%ld, j:%ld.\n", PTRDIFF_T_TO_LONG(len), PTRDIFF_T_TO_LONG(j)); } #endif /* PIKE_DEBUG */ @@ -3461,7 +3461,7 @@ static struct array *longest_ordered_sequence(struct array *a) stack[pos] = i; } - /* FIXME(?) memory unfreed upon Pike_error here */ + /* FIXME(?) memory unfreed upon error here */ res = low_allocate_array(top, 0); while (ltop != -1) { @@ -3901,7 +3901,7 @@ static struct array *diff_longest_sequence(struct array *cmptbl, int blen) free(marks); - /* FIXME(?) memory unfreed upon Pike_error here. */ + /* FIXME(?) memory unfreed upon error here. */ a=low_allocate_array(top,0); if (top) { @@ -4075,7 +4075,7 @@ static struct array *diff_dyn_longest_sequence(struct array *cmptbl, int blen) while(dml) { #ifdef PIKE_DEBUG if (i >= sz) { - fatal("Consistency Pike_error in diff_dyn_longest_sequence()\n"); + fatal("Consistency error in diff_dyn_longest_sequence()\n"); } #endif /* PIKE_DEBUG */ #ifdef DIFF_DEBUG @@ -4089,7 +4089,7 @@ static struct array *diff_dyn_longest_sequence(struct array *cmptbl, int blen) } #ifdef PIKE_DEBUG if (i != sz) { - fatal("Consistency Pike_error in diff_dyn_longest_sequence()\n"); + fatal("Consistency error in diff_dyn_longest_sequence()\n"); } #endif /* PIKE_DEBUG */ @@ -4104,7 +4104,7 @@ static struct array* diff_build(struct array *a, struct array *ad,*bd; ptrdiff_t bi, ai, lbi, lai, i, eqstart; - /* FIXME(?) memory unfreed upon Pike_error here (and later) */ + /* FIXME(?) memory unfreed upon error here (and later) */ ad=low_allocate_array(0,32); bd=low_allocate_array(0,32); @@ -4930,9 +4930,9 @@ PMOD_EXPORT void f_map(INT32 args) if arr->_sizeof && arr->`[] array ret; ret[i]=arr[i]; ret=map(ret,fun,@extra); - Pike_error + error - * * Pike_error (ie arr or fun = float or bad int ) + * * error (ie arr or fun = float or bad int ) */ diff --git a/src/cpp.c b/src/cpp.c index 93f9d342a1b3432547da69f1b68ae8a749a60e17..fb837d6f6a7b70423e361da52478f0fcb09be85c 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -5,7 +5,7 @@ \*/ /* - * $Id: cpp.c,v 1.78 2000/12/01 08:09:45 hubbe Exp $ + * $Id: cpp.c,v 1.79 2000/12/05 21:08:16 per Exp $ */ #include "global.h" #include "stralloc.h" @@ -640,7 +640,7 @@ static struct pike_string *recode_string(struct pike_string *data) * according to EBCDIC-US, and then the rest of the string * according to the encoding specified by the first line. * - * * It's an Pike_error for a program written in EBCDIC not to + * * It's an error for a program written in EBCDIC not to * start with a #charset directive. * * Obfuscation note: diff --git a/src/docode.c b/src/docode.c index a9f1f4e88c6f517fa0f5878f241df030d76a46e4..47d017b9d9e04ed514734a0d371a68692f04b94c 100644 --- a/src/docode.c +++ b/src/docode.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: docode.c,v 1.88 2000/12/04 21:31:14 nilsson Exp $"); +RCSID("$Id: docode.c,v 1.89 2000/12/05 21:08:17 per Exp $"); #include "las.h" #include "program.h" #include "pike_types.h" @@ -149,7 +149,7 @@ static void code_expression(node *n, INT16 flags, char *err) case 0: my_yyerror("Void expression for %s",err); case 1: return; case 2: - fatal("Internal compiler Pike_error (%s), line %ld, file %s\n", + fatal("Internal compiler error (%s), line %ld, file %s\n", err, (long)lex.current_line, lex.current_file?lex.current_file->str:"Unknown"); @@ -623,12 +623,12 @@ static int do_docode2(node *n, INT16 flags) case F_NOT: case F_COMPL: case F_NEGATE: - fatal("Optimizer Pike_error.\n"); + fatal("Optimizer error.\n"); case F_RANGE: tmp1=do_docode(CAR(n),DO_NOT_COPY); if(do_docode(CDR(n),DO_NOT_COPY)!=2) - fatal("Compiler internal Pike_error (at %ld).\n",(long)lex.current_line); + fatal("Compiler internal error (at %ld).\n",(long)lex.current_line); emit0(n->token); return DO_NOT_WARN((INT32)tmp1); @@ -972,7 +972,7 @@ static int do_docode2(node *n, INT16 flags) #endif if(do_docode(CAR(n),0)!=1) - fatal("Internal compiler Pike_error, time to panic\n"); + fatal("Internal compiler error, time to panic\n"); if (!(CAR(n) && (current_switch_type = CAR(n)->type))) { current_switch_type = mixed_type_string; @@ -1065,7 +1065,7 @@ static int do_docode2(node *n, INT16 flags) current_break=break_save; #ifdef PIKE_DEBUG if(Pike_interpreter.recoveries && Pike_sp-Pike_interpreter.evaluator_stack < Pike_interpreter.recoveries->stack_pointer) - fatal("Stack Pike_error after F_SWITCH (underflow)\n"); + fatal("Stack error after F_SWITCH (underflow)\n"); #endif return 0; } @@ -1225,7 +1225,7 @@ static int do_docode2(node *n, INT16 flags) tmp1=do_docode(CAR(n),DO_LVALUE); #ifdef PIKE_DEBUG if(tmp1 & 1) - fatal("Very internal compiler Pike_error.\n"); + fatal("Very internal compiler error.\n"); #endif emit1(F_ARRAY_LVALUE, DO_NOT_WARN((INT32)(tmp1>>1))); return 2; @@ -1267,7 +1267,7 @@ static int do_docode2(node *n, INT16 flags) } if(do_docode(CDR(n),0) != 1) - fatal("Internal compiler Pike_error, please report this (1)."); + fatal("Internal compiler error, please report this (1)."); if(CDR(n)->token != F_CONSTANT && match_types(CDR(n)->type, string_type_string)) emit0(F_CLEAR_STRING_SUBTYPE); @@ -1333,7 +1333,7 @@ static int do_docode2(node *n, INT16 flags) #ifdef PIKE_DEBUG case T_OBJECT: if(n->u.sval.u.object->next == n->u.sval.u.object) - fatal("Internal Pike_error: Pointer to parent cannot be a compile time constant!\n"); + fatal("Internal error: Pointer to parent cannot be a compile time constant!\n"); #endif default: @@ -1413,7 +1413,7 @@ static int do_docode2(node *n, INT16 flags) do_docode(CDR(n), (INT16)(flags | DO_LVALUE)); default: - fatal("Infernal compiler Pike_error (unknown parse-tree-token).\n"); + fatal("Infernal compiler error (unknown parse-tree-token).\n"); return 0; /* make gcc happy */ } } diff --git a/src/dynamic_load.c b/src/dynamic_load.c index 9d84873981dbd51321513b089c8e285ad7d907a9..f827aaf95aa09c6d1fd3b2ecb1b6d4279d6c3b34 100644 --- a/src/dynamic_load.c +++ b/src/dynamic_load.c @@ -8,7 +8,7 @@ # include "pike_macros.h" # include "main.h" -RCSID("$Id: dynamic_load.c,v 1.47 2000/12/01 08:09:46 hubbe Exp $"); +RCSID("$Id: dynamic_load.c,v 1.48 2000/12/05 21:08:17 per Exp $"); #endif /* !TESTING */ @@ -82,7 +82,7 @@ static void *dlopen(const char *foo, int how) static char * dlerror(void) { static char buffer[200]; - sprintf(buffer,"LoadLibrary failed with Pike_error: %d",GetLastError()); + sprintf(buffer,"LoadLibrary failed with error: %d",GetLastError()); return buffer; } diff --git a/src/encode.c b/src/encode.c index 38a079d3206e859d2f25310fd7c65c981acf537f..a8fce0c880a6e73626f77e3ad18fa13edf6613d3 100644 --- a/src/encode.c +++ b/src/encode.c @@ -25,7 +25,7 @@ #include "version.h" #include "bignum.h" -RCSID("$Id: encode.c,v 1.78 2000/12/01 08:09:46 hubbe Exp $"); +RCSID("$Id: encode.c,v 1.79 2000/12/05 21:08:17 per Exp $"); /* #define ENCODE_DEBUG */ @@ -271,7 +271,7 @@ one_more_type: switch(EXTRACT_UCHAR(t++)) { default: - fatal("Pike_error in type string.\n"); + fatal("error in type string.\n"); /*NOTREACHED*/ break; @@ -797,7 +797,7 @@ static void decode_value2(struct decode_data *data); static int my_extract_char(struct decode_data *data) { if(data->ptr >= data->len) - Pike_error("Format Pike_error, not enough data in string.\n"); + Pike_error("Format error, not enough data in string.\n"); return data->data [ data->ptr++ ]; } @@ -847,7 +847,7 @@ static int my_extract_char(struct decode_data *data) #define getdata2(S,L) do { \ if(data->ptr + (ptrdiff_t)(sizeof(S[0])*(L)) > data->len) \ - Pike_error("Failed to decode string. (string range Pike_error)\n"); \ + Pike_error("Failed to decode string. (string range error)\n"); \ MEMCPY((S),(data->data + data->ptr), sizeof(S[0])*(L)); \ data->ptr+=sizeof(S[0])*(L); \ }while(0) @@ -870,7 +870,7 @@ static int my_extract_char(struct decode_data *data) DECODE("get_string_data"); \ what &= TAG_MASK; \ if(data->ptr + num > data->len || num <0) \ - Pike_error("Failed to decode string. (string range Pike_error)\n"); \ + Pike_error("Failed to decode string. (string range error)\n"); \ if(what<0 || what>2) \ Pike_error("Failed to decode string. (Illegal size shift)\n"); \ STR=begin_wide_shared_string(num, what); \ @@ -880,7 +880,7 @@ static int my_extract_char(struct decode_data *data) STR=end_shared_string(STR); \ }else{ \ if(data->ptr + (LEN) > data->len || (LEN) <0) \ - Pike_error("Failed to decode string. (string range Pike_error)\n"); \ + Pike_error("Failed to decode string. (string range error)\n"); \ STR=make_shared_binary_string((char *)(data->data + data->ptr), (LEN)); \ data->ptr+=(LEN); \ } \ @@ -963,7 +963,7 @@ one_more_type: switch(tmp) { default: - fatal("Pike_error in type string.\n"); + fatal("error in type string.\n"); /*NOTREACHED*/ break; @@ -1358,7 +1358,7 @@ static void decode_value2(struct decode_data *data) data->counter.u.integer++; decode_value2(data); - /* Keep the value so that we can make a good Pike_error-message. */ + /* Keep the value so that we can make a good error-message. */ prog_code = Pike_sp-1; stack_dup(); @@ -1410,7 +1410,7 @@ static void decode_value2(struct decode_data *data) decode_value2(data); f_version(0); if(!is_eq(Pike_sp-1,Pike_sp-2)) - Pike_error("Cannot decode programs encoded with other driver version.\n"); + Pike_error("Cannot decode programs encoded with other pike version.\n"); pop_n_elems(2); decode_number(p->flags,data); @@ -1668,7 +1668,7 @@ static INT32 my_decode(struct pike_string *tmp, static unsigned char extract_char(char **v, ptrdiff_t *l) { - if(!*l) Pike_error("Format Pike_error, not enough place for char.\n"); + if(!*l) Pike_error("Format error, not enough place for char.\n"); else (*l)--; (*v)++; return ((unsigned char *)(*v))[-1]; @@ -1683,7 +1683,7 @@ static ptrdiff_t extract_int(char **v, ptrdiff_t *l) if(j & 0x80) return (j & 0x7f); if((j & ~8) > 4) - Pike_error("Format Error: Error in format string, invalid integer.\n"); + Pike_error("Format error: Error in format string, invalid integer.\n"); i=0; while(j & 7) { i=(i<<8) | extract_char(v,l); j--; } if(j & 8) return -i; @@ -1710,33 +1710,33 @@ static void rec_restore_value(char **v, ptrdiff_t *l) return; case TAG_TYPE: - Pike_error("Format Pike_error:decoding of the type type not supported yet.\n"); + Pike_error("Format error: decoding of the type type not supported yet.\n"); return; case TAG_STRING: - if(t<0) Pike_error("Format Pike_error, length of string is negative.\n"); - if(*l < t) Pike_error("Format Pike_error, string to short\n"); + if(t<0) Pike_error("Format error: length of string is negative.\n"); + if(*l < t) Pike_error("Format error: string to short\n"); push_string(make_shared_binary_string(*v, t)); (*l)-= t; (*v)+= t; return; case TAG_ARRAY: - if(t<0) Pike_error("Format Pike_error, length of array is negative.\n"); + if(t<0) Pike_error("Format error: length of array is negative.\n"); check_stack(t); for(i=0;i<t;i++) rec_restore_value(v,l); f_aggregate(DO_NOT_WARN(t)); return; case TAG_MULTISET: - if(t<0) Pike_error("Format Pike_error, length of multiset is negative.\n"); + if(t<0) Pike_error("Format error: length of multiset is negative.\n"); check_stack(t); for(i=0;i<t;i++) rec_restore_value(v,l); f_aggregate_multiset(DO_NOT_WARN(t)); return; case TAG_MAPPING: - if(t<0) Pike_error("Format Pike_error, length of mapping is negative.\n"); + if(t<0) Pike_error("Format error: length of mapping is negative.\n"); check_stack(t*2); for(i=0;i<t;i++) { @@ -1747,31 +1747,31 @@ static void rec_restore_value(char **v, ptrdiff_t *l) return; case TAG_OBJECT: - if(t<0) Pike_error("Format Pike_error, length of object is negative.\n"); - if(*l < t) Pike_error("Format Pike_error, string to short\n"); + if(t<0) Pike_error("Format error: length of object is negative.\n"); + if(*l < t) Pike_error("Format error: string to short\n"); push_string(make_shared_binary_string(*v, t)); (*l) -= t; (*v) += t; APPLY_MASTER("objectof", 1); return; case TAG_FUNCTION: - if(t<0) Pike_error("Format Pike_error, length of function is negative.\n"); - if(*l < t) Pike_error("Format Pike_error, string to short\n"); + if(t<0) Pike_error("Format error: length of function is negative.\n"); + if(*l < t) Pike_error("Format error: string to short\n"); push_string(make_shared_binary_string(*v, t)); (*l) -= t; (*v) += t; APPLY_MASTER("functionof", 1); return; case TAG_PROGRAM: - if(t<0) Pike_error("Format Pike_error, length of program is negative.\n"); - if(*l < t) Pike_error("Format Pike_error, string to short\n"); + if(t<0) Pike_error("Format error: length of program is negative.\n"); + if(*l < t) Pike_error("Format error: string to short\n"); push_string(make_shared_binary_string(*v, t)); (*l) -= t; (*v) += t; APPLY_MASTER("programof", 1); return; default: - Pike_error("Format Pike_error. Unknown type tag %ld:%ld\n", + Pike_error("Format error: Unknown type tag %ld:%ld\n", PTRDIFF_T_TO_LONG(i), PTRDIFF_T_TO_LONG(t)); } } diff --git a/src/error.c b/src/error.c index a5d86a35098bbf6773df08efa0d34e094e97e253..25b0818b15f68674597846ba7b6efa22f32faaf6 100644 --- a/src/error.c +++ b/src/error.c @@ -21,7 +21,7 @@ #include "threads.h" #include "gc.h" -RCSID("$Id: error.c,v 1.66 2000/12/04 19:38:26 mast Exp $"); +RCSID("$Id: error.c,v 1.67 2000/12/05 21:08:17 per Exp $"); #undef ATTRIBUTE #define ATTRIBUTE(X) @@ -277,11 +277,11 @@ PMOD_EXPORT DECLSPEC(noreturn) void pike_throw(void) ATTRIBUTE((noreturn)) } if(!Pike_interpreter.recoveries) - fatal("No Pike_error recovery context.\n"); + fatal("No error recovery context.\n"); #ifdef PIKE_DEBUG if(Pike_sp - Pike_interpreter.evaluator_stack < Pike_interpreter.recoveries->stack_pointer) - fatal("Stack Pike_error in Pike_error.\n"); + fatal("Stack error in error.\n"); #endif while(Pike_fp != Pike_interpreter.recoveries->frame_pointer) @@ -337,7 +337,7 @@ void DECLSPEC(noreturn) va_error(const char *fmt, va_list args) ATTRIBUTE((noret { const char *tmp=in_error; in_error=0; - fatal("Recursive Pike_error() calls, original Pike_error: %s",tmp); + fatal("Recursive error() calls, original error: %s",tmp); } in_error=buf; @@ -354,12 +354,12 @@ void DECLSPEC(noreturn) va_error(const char *fmt, va_list args) ATTRIBUTE((noret dump_backlog(); #endif - fprintf(stderr,"No Pike_error recovery context!\n%s",buf); + fprintf(stderr,"No error recovery context!\n%s",buf); exit(99); } if((size_t)strlen(buf) >= (size_t)sizeof(buf)) - fatal("Buffer overflow in Pike_error()\n"); + fatal("Buffer overflow in error()\n"); low_error(buf); } @@ -375,7 +375,7 @@ PMOD_EXPORT DECLSPEC(noreturn) void new_error(const char *name, const char *text { const char *tmp=in_error; in_error=0; - fatal("Recursive Pike_error() calls, original Pike_error: %s",tmp); + fatal("Recursive error() calls, original error: %s",tmp); } in_error=text; @@ -386,7 +386,7 @@ PMOD_EXPORT DECLSPEC(noreturn) void new_error(const char *name, const char *text dump_backlog(); #endif - fprintf(stderr,"No Pike_error recovery context!\n%s():%s",name,text); + fprintf(stderr,"No error recovery context!\n%s():%s",name,text); if(file) fprintf(stderr,"at %s:%d\n",file,line); exit(99); @@ -438,7 +438,7 @@ PMOD_EXPORT void exit_on_error(void *msg) #ifdef PIKE_DEBUG { char *s; - fprintf(stderr,"Attempting to dump raw Pike_error: (may fail)\n"); + fprintf(stderr,"Attempting to dump raw error: (may fail)\n"); init_buf(); describe_svalue(&throw_value,0,0); s=simple_free_buf(); @@ -532,7 +532,7 @@ PMOD_EXPORT DECLSPEC(noreturn) void debug_fatal(const char *fmt, ...) ATTRIBUTE( void f_error_cast(INT32 args) { char *s; - get_all_args("Pike_error->cast",args,"%s",&s); + get_all_args("error->cast",args,"%s",&s); if(!strncmp(s,"array",5)) { pop_n_elems(args); @@ -540,14 +540,14 @@ void f_error_cast(INT32 args) ref_push_array(GENERIC_ERROR_THIS->backtrace); f_aggregate(2); }else{ - SIMPLE_BAD_ARG_ERROR("Pike_error->cast", 1, "the value \"array\""); + SIMPLE_BAD_ARG_ERROR("error->cast", 1, "the value \"array\""); } } void f_error_index(INT32 args) { INT_TYPE ind; - get_all_args("Pike_error->`[]",args,"%i",&ind); + get_all_args("error->`[]",args,"%i",&ind); switch(ind) { @@ -560,7 +560,7 @@ void f_error_index(INT32 args) ref_push_array(GENERIC_ERROR_THIS->backtrace); break; default: - index_error("Pike_error->`[]", Pike_sp-args, args, NULL, Pike_sp-args, + index_error("error->`[]", Pike_sp-args, args, NULL, Pike_sp-args, "Index %d is out of range 0 - 1.\n", ind); break; } @@ -592,7 +592,7 @@ void f_error_backtrace(INT32 args) va_start(foo,desc); \ ASSERT_THREAD_SWAPPED_IN(); \ o=low_clone(PIKE_CONCAT(FEL,_error_program)); \ - DWERROR((stderr, "%s(): Throwing a " #FEL " Pike_error\n", func)) + DWERROR((stderr, "%s(): Throwing a " #FEL " error\n", func)) #define ERROR_DONE(FOO) \ PIKE_CONCAT(FOO,_error_va(o,func, \ @@ -642,7 +642,7 @@ DECLSPEC(noreturn) void generic_error_va(struct object *o, VSPRINTF(buf, fmt, foo); if(buf[sizeof(buf)-1]) - fatal("Buffer overflow in Pike_error()\n"); + fatal("Buffer overflow in error()\n"); #endif /* HAVE_VSNPRINTF */ in_error=buf; diff --git a/src/fd_control.c b/src/fd_control.c index 5927d2525930b6fcd93b1307ac638612a3446d30..6cc4ab13f35a7c0d797aff3372a176513c72f9c9 100644 --- a/src/fd_control.c +++ b/src/fd_control.c @@ -10,7 +10,7 @@ #include "pike_error.h" #include "fdlib.h" -RCSID("$Id: fd_control.c,v 1.34 2000/12/01 08:09:46 hubbe Exp $"); +RCSID("$Id: fd_control.c,v 1.35 2000/12/05 21:08:17 per Exp $"); #else /* TESTING */ @@ -98,7 +98,7 @@ PMOD_EXPORT int set_nonblocking(int fd,int which) ret=fcntl(fd, F_SETFL, which?FNDELAY:0); #else -#Pike_error Do not know how to set your filedescriptors nonblocking. +#error Do not know how to set your filedescriptors nonblocking. #endif #endif diff --git a/src/interpret.c b/src/interpret.c index 6f0c0d21b17a6c2da623af23dca15960aa0cca21..b1a0a2e95f6c8336e678cdfa62cae45eb7306bf8 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: interpret.c,v 1.177 2000/12/04 19:39:45 mast Exp $"); +RCSID("$Id: interpret.c,v 1.178 2000/12/05 21:08:18 per Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -1306,7 +1306,7 @@ PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void } #ifdef PIKE_DEBUG if(Pike_sp<Pike_interpreter.evaluator_stack) - fatal("Stack Pike_error (also simple).\n"); + fatal("Stack error (also simple).\n"); #endif break; } @@ -1501,7 +1501,7 @@ PMOD_EXPORT int apply_low_safe_and_stupid(struct object *o, INT32 offset) #ifdef PIKE_DEBUG if(Pike_sp<Pike_interpreter.evaluator_stack) - fatal("Stack Pike_error (simple).\n"); + fatal("Stack error (simple).\n"); #endif ret=0; } diff --git a/src/interpret_functions.h b/src/interpret_functions.h index 58271ca284937961892098c6c4bf05c7328361ea..38f1ef83dda6a0f0f7f3b865097ac3a797b42cfe 100644 --- a/src/interpret_functions.h +++ b/src/interpret_functions.h @@ -1,5 +1,5 @@ /* - * $Id: interpret_functions.h,v 1.34 2000/12/01 08:09:48 hubbe Exp $ + * $Id: interpret_functions.h,v 1.35 2000/12/05 21:08:18 per Exp $ * * Opcode definitions for the interpreter. */ @@ -222,7 +222,7 @@ OPCODE2(F_LEXICAL_LOCAL,"lexical local") while(arg2--) { f=f->scope; - if(!f) Pike_error("Lexical scope Pike_error.\n"); + if(!f) Pike_error("Lexical scope error.\n"); } push_svalue(f->locals + arg1); print_return_value(); @@ -235,7 +235,7 @@ OPCODE2(F_LEXICAL_LOCAL_LVALUE,"&lexical local") while(arg2--) { f=f->scope; - if(!f) Pike_error("Lexical scope Pike_error.\n"); + if(!f) Pike_error("Lexical scope error.\n"); } Pike_sp[0].type=T_LVALUE; Pike_sp[0].u.lval=f->locals+arg1; diff --git a/src/interpreter.h b/src/interpreter.h index 2ad17261369a035de7600b23e6f6d4e62594a999..cc48afe492a332e0d1649a4caa0f1ad21d1bdc7e 100644 --- a/src/interpreter.h +++ b/src/interpreter.h @@ -50,7 +50,7 @@ static int eval_instruction(unsigned char *pc) Pike_sp[3].type=99; if(Pike_sp<Pike_interpreter.evaluator_stack || Pike_mark_sp < Pike_interpreter.mark_stack || Pike_fp->locals>Pike_sp) - fatal("Stack Pike_error (generic) Pike_sp=%p/%p Pike_mark_sp=%p/%p locals=%p.\n", + fatal("Stack error (generic) sp=%p/%p mark_sp=%p/%p locals=%p.\n", Pike_sp, Pike_interpreter.evaluator_stack, Pike_mark_sp, @@ -58,24 +58,24 @@ static int eval_instruction(unsigned char *pc) Pike_fp->locals); if(Pike_mark_sp > Pike_interpreter.mark_stack+Pike_stack_size) - fatal("Mark Stack Pike_error (overflow).\n"); + fatal("Mark Stack error (overflow).\n"); if(Pike_mark_sp < Pike_interpreter.mark_stack) - fatal("Mark Stack Pike_error (underflow).\n"); + fatal("Mark Stack error (underflow).\n"); if(Pike_sp > Pike_interpreter.evaluator_stack+Pike_stack_size) - fatal("stack Pike_error (overflow).\n"); + fatal("stack error (overflow).\n"); if(/* Pike_fp->fun>=0 && */ Pike_fp->current_object->prog && Pike_fp->locals+Pike_fp->num_locals > Pike_sp) - fatal("Stack Pike_error (stupid!).\n"); + fatal("Stack error (stupid!).\n"); if(Pike_interpreter.recoveries && Pike_sp-Pike_interpreter.evaluator_stack < Pike_interpreter.recoveries->stack_pointer) - fatal("Stack Pike_error (underflow).\n"); + fatal("Stack error (underflow).\n"); if(Pike_mark_sp > Pike_interpreter.mark_stack && Pike_mark_sp[-1] > Pike_sp) - fatal("Stack Pike_error (underflow?)\n"); + fatal("Stack error (underflow?)\n"); if(d_flag > 9) do_debug(); diff --git a/src/las.c b/src/las.c index f75c41a792e01012be51ae4de20ac207eae21d9c..8c8bd4002d85bc86e35aa5be24e84127d09af59c 100644 --- a/src/las.c +++ b/src/las.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: las.c,v 1.228 2000/12/01 20:43:10 grubba Exp $"); +RCSID("$Id: las.c,v 1.229 2000/12/05 21:08:19 per Exp $"); #include "language.h" #include "interpret.h" @@ -1455,7 +1455,7 @@ void resolv_constant(node *n) { yyerror("Expected constant, got void expression"); }else{ - yyerror("Possible internal Pike_error!!!"); + yyerror("Possible internal error!!!"); pop_n_elems(DO_NOT_WARN(args-1)); return; } @@ -1627,9 +1627,9 @@ node *index_node(node *n, char *node_name, struct pike_string *id) struct svalue *save_sp = Pike_sp-2; JMP_BUF recovery; if (SETJMP(recovery)) { - /* f_index() threw an Pike_error! + /* f_index() threw an error! * - * FIXME: Report the Pike_error thrown. + * FIXME: Report the error thrown. */ if (Pike_sp > save_sp) { pop_n_elems(Pike_sp - save_sp); @@ -3535,7 +3535,7 @@ static void find_usage(node *n, unsigned char *usage, { int i; - /* catch_usage is restored if sscanf throws an Pike_error. */ + /* catch_usage is restored if sscanf throws an error. */ for (i=0; i < MAX_LOCAL; i++) { usage[i] |= catch_u[i]; } @@ -3564,7 +3564,7 @@ static void find_usage(node *n, unsigned char *usage, { int i; - /* catch_usage is restored if the function throws an Pike_error. */ + /* catch_usage is restored if the function throws an error. */ for (i=0; i < MAX_LOCAL; i++) { usage[i] |= catch_u[i]; } @@ -3819,7 +3819,7 @@ static node *low_localopt(node *n, { int i; - /* catch_usage is restored if sscanf throws an Pike_error. */ + /* catch_usage is restored if sscanf throws an error. */ for (i=0; i < MAX_LOCAL; i++) { usage[i] |= catch_u[i]; } @@ -3856,7 +3856,7 @@ static node *low_localopt(node *n, { int i; - /* catch_usage is restored if the function throws an Pike_error. */ + /* catch_usage is restored if the function throws an error. */ for (i=0; i < MAX_LOCAL; i++) { usage[i] |= catch_u[i]; } @@ -4500,7 +4500,7 @@ ptrdiff_t eval_low(node *n) if(apply_low_safe_and_stupid(Pike_compiler->fake_object, jump)) { - /* Generate Pike_error message */ + /* Generate error message */ if(!Pike_compiler->catch_level) { if(throw_value.type == T_ARRAY && throw_value.u.array->size) @@ -4511,7 +4511,7 @@ ptrdiff_t eval_low(node *n) { yyerror(a->string->str); }else{ - yyerror("Nonstandard Pike_error format."); + yyerror("Nonstandard error format."); } } else if(throw_value.type == T_OBJECT) @@ -4520,14 +4520,14 @@ ptrdiff_t eval_low(node *n) push_int(0); f_index(2); if(Pike_sp[-1].type != T_STRING) - yyerror("Nonstandard Pike_error format."); + yyerror("Nonstandard error format."); else yyerror(Pike_sp[-1].u.string->str); pop_stack(); } else { - yyerror("Nonstandard Pike_error format."); + yyerror("Nonstandard error format."); } } }else{ diff --git a/src/lexer.h b/src/lexer.h index 5fae09f971d1385f3801d72ebb6f2f7a0f721725..1c5c0e77cbc53d7923c41ed96b6e5bc9fdf07c0b 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -1,5 +1,5 @@ /* - * $Id: lexer.h,v 1.25 2000/12/01 21:41:42 grubba Exp $ + * $Id: lexer.h,v 1.26 2000/12/05 21:08:19 per Exp $ * * Lexical analyzer template. * Based on lex.c 1.62 @@ -8,7 +8,7 @@ */ #ifndef SHIFT -#Pike_error Internal Pike_error: SHIFT not defined +#error Internal error: SHIFT not defined #endif /* @@ -514,13 +514,13 @@ static int low_yylex(YYSTYPE *yylval) break; case 'e': - if(ISWORD("Pike_error")) + if(ISWORD("error")) { SKIPSPACE(); READBUF(C!='\n'); /* FIXME: Does the following actually work? * Where does the NUL-termination come from? - * Suspicion: #Pike_error is usually handled by cpp(). + * Suspicion: #error is usually handled by cpp(). * What about wide-strings? * /grubba 2000-11-19 (in Versailles) */ @@ -592,7 +592,7 @@ static int low_yylex(YYSTYPE *yylval) struct pike_string *dir = make_shared_binary_string2((p_wchar2 *)buf, len); #else /* SHIFT != 2 */ -#Pike_error Unsupported SHIFT. +#error Unsupported SHIFT. #endif /* SHIFT == 2 */ #endif /* SHIFT == 1 */ if (!dir->size_shift) { diff --git a/src/modules/Gz/gz_test.c b/src/modules/Gz/gz_test.c index b057bee83b1631bbca77b9266241f661d69fcb43..7414498dc2b7d78d05ebf1ba32c878ed775e8cbf 100644 --- a/src/modules/Gz/gz_test.c +++ b/src/modules/Gz/gz_test.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: gz_test.c,v 1.4 2000/12/01 08:09:57 hubbe Exp $ */ +/* @(#) $Id: gz_test.c,v 1.5 2000/12/05 21:08:23 per Exp $ */ #include <stdio.h> #include <zlib.h> @@ -17,7 +17,7 @@ #define CHECK_ERR(err, msg) { \ if (err != Z_OK) { \ - fprintf(stderr, "%s Pike_error: %d\n", msg, err); \ + fprintf(stderr, "%s error: %d\n", msg, err); \ exit(1); \ } \ } @@ -273,7 +273,7 @@ void test_flush(compr, comprLen) err = deflate(&c_stream, Z_FULL_FLUSH); CHECK_ERR(err, "deflate"); - compr[3]++; /* force an Pike_error in first compressed block */ + compr[3]++; /* force an error in first compressed block */ c_stream.avail_in = len - 3; err = deflate(&c_stream, Z_FINISH); diff --git a/src/modules/HTTPLoop/accept_and_parse.c b/src/modules/HTTPLoop/accept_and_parse.c index bb25a3b4e173872fb0b7f51a100aaca3714164f3..669c6800c2fd9d6afc7d9e31ccacd90507e1944e 100644 --- a/src/modules/HTTPLoop/accept_and_parse.c +++ b/src/modules/HTTPLoop/accept_and_parse.c @@ -130,7 +130,7 @@ struct args *new_args( ) /* This should probably be improved to include the reason for the * failure. Currently, all failed requests get the same (hardcoded) - * Pike_error message. + * error message. * * It is virtually impossible to call a pike function from here, so that * is not an option. @@ -339,7 +339,7 @@ void aap_handle_connection(struct args *arg) if(data_read <= 0) { #ifdef AAP_DEBUG - fprintf(stderr, "AAP: Read Pike_error/eof.\n"); + fprintf(stderr, "AAP: Read error/eof.\n"); #endif /* AAP_DEBUG */ arg->res.data = buffer; free_args( arg ); diff --git a/src/modules/Image/colors.c b/src/modules/Image/colors.c index d42eaacc3319dbb93d36b4ef10b0c00cb5859e97..0a61ed85ea4283d0fb041242d1f588ee858d1b93 100644 --- a/src/modules/Image/colors.c +++ b/src/modules/Image/colors.c @@ -1,7 +1,7 @@ /* **! module Image **! note -**! $Id: colors.c,v 1.41 2000/12/01 08:09:58 hubbe Exp $ +**! $Id: colors.c,v 1.42 2000/12/05 21:08:24 per Exp $ **! submodule Color **! **! This module keeps names and easy handling @@ -152,9 +152,9 @@ **! pike 0.7 **! **! note: -**! <tt>Image.Color["something"]</tt> will never(!) generate an Pike_error, +**! <tt>Image.Color["something"]</tt> will never(!) generate an error, **! but a zero_type 0, if the color is unknown. This is enough -**! to give the Pike_error "not present in module", if used +**! to give the error "not present in module", if used **! as <tt>Image.Color.something</tt>, though. **! **! If you are using colors from for instance a webpage, you might @@ -179,7 +179,7 @@ #include "global.h" -RCSID("$Id: colors.c,v 1.41 2000/12/01 08:09:58 hubbe Exp $"); +RCSID("$Id: colors.c,v 1.42 2000/12/05 21:08:24 per Exp $"); #include "image_machine.h" @@ -482,7 +482,7 @@ static void image_color_hsvf(INT32 args) if(max != 0.0) s = (max - min)/max; else - Pike_error("internal Pike_error, max==0.0\n"); + Pike_error("internal error, max==0.0\n"); delta = max-min; @@ -1571,7 +1571,7 @@ static void image_make_hsv_color(INT32 args) case 3: r = p; g = q; b = v; break; case 4: r = t; g = p; b = v; break; case 5: r = v; g = p; b = q; break; - default: Pike_error("internal Pike_error (hue=%d <= hsv[%f,%f,%f])\n", + default: Pike_error("internal error (hue=%d <= hsv[%f,%f,%f])\n", DOUBLE_TO_INT(i), h, s, v); } } diff --git a/src/modules/Image/colortable.c b/src/modules/Image/colortable.c index 9a5f75f146f19b6d606a4a3a3c986d2f9c8e7f29..e0a3fe8ed69a249abaef46f624b4f2a512c43471 100644 --- a/src/modules/Image/colortable.c +++ b/src/modules/Image/colortable.c @@ -1,11 +1,11 @@ #include "global.h" -/* $Id: colortable.c,v 1.101 2000/12/01 08:09:59 hubbe Exp $ */ +/* $Id: colortable.c,v 1.102 2000/12/05 21:08:24 per Exp $ */ /* **! module Image **! note -**! $Id: colortable.c,v 1.101 2000/12/01 08:09:59 hubbe Exp $ +**! $Id: colortable.c,v 1.102 2000/12/05 21:08:24 per Exp $ **! class Colortable **! **! This object keeps colortable information, @@ -20,7 +20,7 @@ #undef COLORTABLE_DEBUG #undef COLORTABLE_REDUCE_DEBUG -RCSID("$Id: colortable.c,v 1.101 2000/12/01 08:09:59 hubbe Exp $"); +RCSID("$Id: colortable.c,v 1.102 2000/12/05 21:08:24 per Exp $"); #include <math.h> /* fabs() */ @@ -3749,7 +3749,7 @@ void image_colortable_spacefactors(INT32 args) **! arg int|float downforward **! arg int|float down **! arg int|float downback -**! Set Pike_error correction directions. Default is +**! Set error correction directions. Default is **! forward=7, downforward=1, down=5, downback=3. **! arg int|float factor **! Error keeping factor. @@ -3861,9 +3861,9 @@ void image_colortable_nodither(INT32 args) **! method object randomgrey(int err) **! Set random cube dithering. **! Color choosen is the closest one to color in picture -**! plus (flat) random Pike_error; <tt>color�random(Pike_error)</tt>. +**! plus (flat) random error; <tt>color�random(error)</tt>. **! -**! The randomgrey method uses the same random Pike_error on red, green +**! The randomgrey method uses the same random error on red, green **! and blue and the randomcube method has three random errors. **! **! <table><tr valign=center> @@ -3904,7 +3904,7 @@ void image_colortable_nodither(INT32 args) **! arg int g **! arg int b **! arg int err -**! The maximum Pike_error. Default is 32, or colorcube step. +**! The maximum error. Default is 32, or colorcube step. **! **! returns the called object **! @@ -4103,7 +4103,7 @@ static int *ordered_make_diff(int *errors,int sz,int err) **! method object ordered(int r,int g,int b,int xsize,int ysize) **! method object ordered(int r,int g,int b,int xsize,int ysize,int x,int y) **! method object ordered(int r,int g,int b,int xsize,int ysize,int rx,int ry,int gx,int gy,int bx,int by) -**! Set ordered dithering, which gives a position-dependent Pike_error added +**! Set ordered dithering, which gives a position-dependent error added **! to the pixel values. **! **! <table><tr valign=center> @@ -4152,11 +4152,11 @@ static int *ordered_make_diff(int *errors,int sz,int err) **! arg int r **! arg int g **! arg int b -**! The maximum Pike_error. Default is 32, or colorcube steps (256/size). +**! The maximum error. Default is 32, or colorcube steps (256/size). **! **! arg int xsize **! arg int ysize -**! Size of Pike_error matrix. Default is 8�8. +**! Size of error matrix. Default is 8�8. **! Only values which factors to multiples of 2 and 3 are **! possible to choose (2,3,4,6,8,12,...). **! @@ -4168,7 +4168,7 @@ static int *ordered_make_diff(int *errors,int sz,int err) **! arg int gy **! arg int bx **! arg int by -**! Offset for the Pike_error matrix. <tt>x</tt> and <tt>y</tt> is for +**! Offset for the error matrix. <tt>x</tt> and <tt>y</tt> is for **! both red, green and blue values, the other is individual. **! **! returns the called object diff --git a/src/modules/Image/colortable.h b/src/modules/Image/colortable.h index 3457e476ad053d0b6c4f6a58c1835fe1b67b0844..6e590086124490ad4c172b26d7b6c278bddd6079 100644 --- a/src/modules/Image/colortable.h +++ b/src/modules/Image/colortable.h @@ -1,17 +1,17 @@ /* **! module Image **! note -**! $Id: colortable.h,v 1.23 2000/12/01 08:09:59 hubbe Exp $ +**! $Id: colortable.h,v 1.24 2000/12/05 21:08:25 per Exp $ */ #ifdef PIKE_IMAGE_COLORTABLE_H -#Pike_error colortable.h included twice +#error colortable.h included twice #endif #define PIKE_IMAGE_COLORTABLE_H #ifndef PIKE_IMAGE_IMAGE_H -#Pike_error colortable.h needs image.h +#error colortable.h needs image.h #endif /* !PIKE_IMAGE_IMAGE_H */ diff --git a/src/modules/Image/encodings/_xpm.c b/src/modules/Image/encodings/_xpm.c index 4743e5a235eb866421eb7a9d31db3f4f2212b638..7020bbc05e0742f975bc7b8a02d9250cd0a6845b 100644 --- a/src/modules/Image/encodings/_xpm.c +++ b/src/modules/Image/encodings/_xpm.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: _xpm.c,v 1.15 2000/12/01 08:10:03 hubbe Exp $"); +RCSID("$Id: _xpm.c,v 1.16 2000/12/05 21:08:26 per Exp $"); #include "image_machine.h" @@ -103,10 +103,10 @@ static rgba_group decode_color( struct buffer *s ) push_text("Image"); push_int(0); SAFE_APPLY_MASTER( "resolv", 2 ); - if(IS_ZERO(sp-1)) Pike_error("Internal Pike_error: No Image module!\n"); + if(IS_ZERO(sp-1)) Pike_error("Internal error: No Image module!\n"); push_text("Color"); f_index(2); - if(IS_ZERO(sp-1)) Pike_error("Internal Pike_error: No Image[] function!\n"); + if(IS_ZERO(sp-1)) Pike_error("Internal error: No Image[] function!\n"); _parse_color = sp[-1]; parse_color = &_parse_color; sp--; diff --git a/src/modules/Image/encodings/pcx.c b/src/modules/Image/encodings/pcx.c index 41e80c918ad6a9555f32872d56ba9ba7a7f48b81..fd5018b88c647b6d8d8b720383b92da065490ed1 100644 --- a/src/modules/Image/encodings/pcx.c +++ b/src/modules/Image/encodings/pcx.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: pcx.c,v 1.14 2000/12/01 08:10:04 hubbe Exp $"); +RCSID("$Id: pcx.c,v 1.15 2000/12/05 21:08:27 per Exp $"); #include "image_machine.h" @@ -328,7 +328,7 @@ static struct object *low_pcx_decode( struct pike_string *data ) **! Decodes a PCX image. **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ void image_pcx_decode( INT32 args ) { @@ -346,7 +346,7 @@ void image_pcx_decode( INT32 args ) **! Decodes a PCX image to a mapping. **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ void image_pcx__decode( INT32 args ) { diff --git a/src/modules/Image/encodings/png.c b/src/modules/Image/encodings/png.c index 0e808242fd8c26fa889ff6518d68a937dd53fd7a..dab62e323bc83c756a7046e859e3b7afb30b3a2a 100644 --- a/src/modules/Image/encodings/png.c +++ b/src/modules/Image/encodings/png.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: png.c,v 1.40 2000/12/01 08:10:05 hubbe Exp $"); +RCSID("$Id: png.c,v 1.41 2000/12/05 21:08:27 per Exp $"); #include "image_machine.h" @@ -86,7 +86,7 @@ static INLINE INT32 call_gz_crc32(INT32 args) INT32 z; apply_svalue(&gz_crc32,args); if (sp[-1].type!=T_INT) - Pike_error("Image.PNG: internal Pike_error (not integer from Gz.crc32)\n"); + Pike_error("Image.PNG: internal error (not integer from Gz.crc32)\n"); z=sp[-1].u.integer; pop_stack(); return z; @@ -130,7 +130,7 @@ static void png_decompress(int style) struct object *o; if (style) - Pike_error("internal Pike_error: illegal decompression style %d\n",style); + Pike_error("Internal error: illegal decompression style %d\n",style); o=clone_object(gz_inflate,0); apply(o,"inflate",1); @@ -142,7 +142,7 @@ static void png_compress(int style) struct object *o; if (style) - Pike_error("internal Pike_error: illegal decompression style %d\n",style); + Pike_error("Internal error: illegal decompression style %d\n",style); push_int(8); o=clone_object(gz_deflate,1); @@ -374,7 +374,7 @@ static void image_png___decode(INT32 args) **! This function ignores any checksum errors in the file. **! A PNG of higher color resolution than the Image module **! supports (8 bit) will lose that information in the conversion. -**! It throws an Pike_error if the image data is erroneous. +**! It throws an error if the image data is erroneous. */ static struct pike_string *_png_unfilter(unsigned char *data, @@ -521,7 +521,7 @@ static int _png_write_rgb(rgb_group *w1, struct pike_string *trns) { /* returns 1 if alpha channel, 0 if not */ - /* w1, wa1 will be freed upon Pike_error */ + /* w1, wa1 will be freed upon error */ static rgb_group white={255,255,255}; static rgb_group grey4[4]={{0,0,0},{85,85,85},{170,170,170},{255,255,255}}; @@ -684,7 +684,7 @@ static int _png_write_rgb(rgb_group *w1, { free(w1); free(wa1); - Pike_error("Image.PNG->decode: Internal Pike_error (created palette isn't flat)\n"); + Pike_error("Image.PNG->decode: Internal error (created palette isn't flat)\n"); } mz=ct->u.flat.numentries; if (mz==0) @@ -1008,7 +1008,7 @@ static void img_png_decode(INT32 args,int header_only) ct=(struct neo_colortable*)get_storage(sp[-1].u.object, image_colortable_program); if (!ct) - Pike_error("Image.PNG._decode: internal Pike_error: cloned colortable isn't colortable\n"); + Pike_error("Image.PNG._decode: internal error: cloned colortable isn't colortable\n"); ref_push_string(param_palette); mapping_insert(m,sp-1,sp-2); pop_n_elems(2); @@ -1634,7 +1634,7 @@ static void image_png_decode_header(INT32 args) **! </pre> **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ static void image_png_decode(INT32 args) diff --git a/src/modules/Image/encodings/psd.c b/src/modules/Image/encodings/psd.c index 1e6c3ce23264df8e541e1b4ceeb730579dc60ee5..38bdeb71cdb248061ab00a11fee8597e35b7c475 100644 --- a/src/modules/Image/encodings/psd.c +++ b/src/modules/Image/encodings/psd.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: psd.c,v 1.26 2000/12/01 08:10:05 hubbe Exp $"); +RCSID("$Id: psd.c,v 1.27 2000/12/05 21:08:27 per Exp $"); #include "image_machine.h" @@ -355,7 +355,7 @@ static void f_decode_packbits_encoded(INT32 args) int compression = 0; struct buffer b, ob, d; if(sp[-args].type != T_STRING) - Pike_error("internal argument Pike_error"); + Pike_error("Internal argument error"); if(args == 5) diff --git a/src/modules/Image/encodings/tga.c b/src/modules/Image/encodings/tga.c index 96ca3d9e1bbf2a73dc27ed12a30aa9d760b16fab..79b670ef076b198fb5179d16d6f307b74eea0a2a 100644 --- a/src/modules/Image/encodings/tga.c +++ b/src/modules/Image/encodings/tga.c @@ -1,6 +1,6 @@ /* - * $Id: tga.c,v 1.25 2000/12/01 08:10:06 hubbe Exp $ + * $Id: tga.c,v 1.26 2000/12/05 21:08:27 per Exp $ * * Targa codec for pike. Based on the tga plugin for gimp. * @@ -81,7 +81,7 @@ #include "module_magic.h" -RCSID("$Id: tga.c,v 1.25 2000/12/01 08:10:06 hubbe Exp $"); +RCSID("$Id: tga.c,v 1.26 2000/12/05 21:08:27 per Exp $"); #ifndef MIN # define MIN(X,Y) ((X)<(Y)?(X):(Y)) @@ -596,7 +596,7 @@ static struct image_alpha ReadImage(struct buffer *fp, struct tga_header *hdr) if (std_fread (cmap + (index * pelbytes), pelbytes, length, fp) != length) { free(cmap); - Pike_error ("TGA: Pike_error reading colormap\n"); + Pike_error ("TGA: error reading colormap\n"); } /* Now pretend as if we only have 8 bpp. */ @@ -808,12 +808,12 @@ static struct buffer save_tga(struct image *img, struct image *alpha, if (std_fwrite((void *)&hdr, sizeof (hdr), 1, fp) != 1) { free(obuf.str); - Pike_error("Internal Pike_error: Out of space in buffer.\n"); + Pike_error("Internal error: Out of space in buffer.\n"); } if (std_fwrite ((void *)SAVE_ID_STRING, hdr.idLength, 1, fp) != 1) { free(obuf.str); - Pike_error("Internal Pike_error: Out of space in buffer.\n"); + Pike_error("Internal error: Out of space in buffer.\n"); } /* Allocate a new set of pixels. */ @@ -866,7 +866,7 @@ static struct buffer save_tga(struct image *img, struct image *alpha, { free(data); free(obuf.str); - Pike_error("Internal Pike_error: Out of space in buffer.\n"); + Pike_error("Internal error: Out of space in buffer.\n"); } free(data); } @@ -887,7 +887,7 @@ static struct buffer save_tga(struct image *img, struct image *alpha, **! ([ "image":img_object, "alpha":alpha_channel ]) **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ void image_tga__decode( INT32 args ) { @@ -919,7 +919,7 @@ void image_tga__decode( INT32 args ) **! Decodes a Targa image. **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ void image_tga_decode( INT32 args ) { diff --git a/src/modules/Image/encodings/xbm.c b/src/modules/Image/encodings/xbm.c index 0b5afc69c5d3f926391865cd928c782922ea7c6c..53fcb8c0c96d8fbc71478504eb5c70d46d139720 100644 --- a/src/modules/Image/encodings/xbm.c +++ b/src/modules/Image/encodings/xbm.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: xbm.c,v 1.12 2000/12/01 08:10:07 hubbe Exp $"); +RCSID("$Id: xbm.c,v 1.13 2000/12/05 21:08:27 per Exp $"); #define NO_PIKE_SHORTHAND @@ -218,7 +218,7 @@ static struct pike_string *save_xbm( struct image *i, struct pike_string *name ) **! Decodes a XBM image. **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ static void image_xbm_decode( INT32 args ) { @@ -246,7 +246,7 @@ static void image_xbm_decode( INT32 args ) **! </pre> **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ diff --git a/src/modules/Image/encodings/xcf.c b/src/modules/Image/encodings/xcf.c index 1419d9a8e290188de36b37c668e6147dea9241fb..547cd9b7f96fbad297777f3aeba115cfbe4d28d4 100644 --- a/src/modules/Image/encodings/xcf.c +++ b/src/modules/Image/encodings/xcf.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: xcf.c,v 1.34 2000/12/01 08:10:08 hubbe Exp $"); +RCSID("$Id: xcf.c,v 1.35 2000/12/05 21:08:28 per Exp $"); #include "image_machine.h" @@ -946,7 +946,7 @@ static unsigned char read_char( struct buffer *from ) **! Decodes a XCF image to a single image object. **! **! note -**! Throws upon Pike_error in data, you will loose quite a lot of +**! Throws upon error in data, you will loose quite a lot of **! information by doing this. See Image.XCF._decode and Image.XCF.__decode */ @@ -983,7 +983,7 @@ static unsigned char read_char( struct buffer *from ) **! ])</pre> **! **! note -**! Throws upon Pike_error in data. For more information, see Image.XCF.__decode +**! Throws upon error in data. For more information, see Image.XCF.__decode */ /* diff --git a/src/modules/Image/image.c b/src/modules/Image/image.c index cb86cf7f864f9aee75f507a1593b4108874faf03..43244e6017104922b47538cb63b274f3004ba863 100644 --- a/src/modules/Image/image.c +++ b/src/modules/Image/image.c @@ -1,9 +1,9 @@ -/* $Id: image.c,v 1.183 2000/12/03 17:20:19 mirar Exp $ */ +/* $Id: image.c,v 1.184 2000/12/05 21:08:25 per Exp $ */ /* **! module Image **! note -**! $Id: image.c,v 1.183 2000/12/03 17:20:19 mirar Exp $ +**! $Id: image.c,v 1.184 2000/12/05 21:08:25 per Exp $ **! class Image **! **! The main object of the <ref>Image</ref> module, this object @@ -98,7 +98,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: image.c,v 1.183 2000/12/03 17:20:19 mirar Exp $"); +RCSID("$Id: image.c,v 1.184 2000/12/05 21:08:25 per Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -3693,9 +3693,9 @@ static void image_apply_curve_2( struct object *o, THREADS_ALLOW(); switch( channel ) { - case 0: for( ; i>0; i-- ) d->r = curve[(d++)->r]; break; - case 1: for( ; i>0; i-- ) d->g = curve[(d++)->g]; break; - case 2: for( ; i>0; i-- ) d->b = curve[(d++)->b]; break; + case 0: for( ; i>0; i--,d++ ) d->r = curve[d->r]; break; + case 1: for( ; i>0; i--,d++ ) d->g = curve[d->g]; break; + case 2: for( ; i>0; i--,d++ ) d->b = curve[d->b]; break; } THREADS_DISALLOW(); diff --git a/src/modules/Image/image.h b/src/modules/Image/image.h index 5df978ca3498ce990f3ebceb07684a45f0d565b8..cb49e714babc82454658fd5d21e5764234b1a74f 100644 --- a/src/modules/Image/image.h +++ b/src/modules/Image/image.h @@ -1,11 +1,11 @@ /* **! module Image **! note -**! $Id: image.h,v 1.45 2000/12/01 08:10:00 hubbe Exp $ +**! $Id: image.h,v 1.46 2000/12/05 21:08:25 per Exp $ */ #ifdef PIKE_IMAGE_IMAGE_H -#Pike_error IMAGE.h included twice +#error image.h included twice #endif #define PIKE_IMAGE_IMAGE_H diff --git a/src/modules/Image/layers.c b/src/modules/Image/layers.c index e9c6aed934aa7eb8ff738a52826fcf58cf72ba44..f4b2bda90805a6df898896f437adadc7244daaa3 100644 --- a/src/modules/Image/layers.c +++ b/src/modules/Image/layers.c @@ -1,7 +1,7 @@ /* **! module Image **! note -**! $Id: layers.c,v 1.58 2000/12/01 08:10:01 hubbe Exp $ +**! $Id: layers.c,v 1.59 2000/12/05 21:08:25 per Exp $ **! class Layer **! see also: layers **! @@ -215,7 +215,7 @@ #include <math.h> /* floor */ -RCSID("$Id: layers.c,v 1.58 2000/12/01 08:10:01 hubbe Exp $"); +RCSID("$Id: layers.c,v 1.59 2000/12/05 21:08:25 per Exp $"); #include "image_machine.h" @@ -531,7 +531,7 @@ struct layer_mode_desc COMBINE_ALPHA_SUM(aS,(aL)*(V)) #else /* unknown COMBINE_METHOD */ -#Pike_error unknown COMBINE_METHOD +#error unknown COMBINE_METHOD #endif /* COMBINE_METHOD_FLOAT */ #endif diff --git a/src/modules/Image/match.h b/src/modules/Image/match.h index 8ff70fc020e11f92ba5527af6e82e28a4268ade0..e3318687412c12d7ed293a1a5537babd33c76c78 100644 --- a/src/modules/Image/match.h +++ b/src/modules/Image/match.h @@ -60,7 +60,7 @@ void INAME(INT32 args) if ((needle->xsize>haystack->xsize)|| (needle->ysize>haystack->ysize)) - Pike_error("Haystack must be bigger than needle Pike_error in image->"NAME"()\n"); + Pike_error("Haystack must be bigger than needle, error in image->"NAME"()\n"); needlei=needle->img; haystacki=haystack->img; @@ -75,7 +75,7 @@ void INAME(INT32 args) else if ((haystack->xsize!=haystack_cert->xsize)|| (haystack->ysize!=haystack_cert->ysize)) - Pike_error("Argument 3 must be the same size as haystack Pike_error in image->"NAME"()\n"); + Pike_error("Argument 3 must be the same size as haystack error in image->"NAME"()\n"); if ((sp[3-args].type==T_INT)) { @@ -92,7 +92,7 @@ void INAME(INT32 args) { if ((needle_cert->xsize!=needle->xsize)|| (needle_cert->ysize!=needle->ysize)) - Pike_error("Needle_cert must be the same size as needle Pike_error in image->"NAME"()\n"); + Pike_error("Needle_cert must be the same size as needle error in image->"NAME"()\n"); type=2; } if (args>=6) @@ -111,7 +111,7 @@ void INAME(INT32 args) else if ((haystack->xsize!=haystack_avoid->xsize)|| (haystack->ysize!=haystack_avoid->ysize)) - Pike_error("Haystack_avoid must be the same size as haystack Pike_error in image->"NAME"()\n"); + Pike_error("Haystack_avoid must be the same size as haystack error in image->"NAME"()\n"); } } push_int(this->xsize); diff --git a/src/modules/Image/operator.c b/src/modules/Image/operator.c index 76022e1bf082dec472bbd4234521925576cfa3e7..b9b8ade053e5f3b27ff0b91f85c58fe751a5705c 100644 --- a/src/modules/Image/operator.c +++ b/src/modules/Image/operator.c @@ -1,9 +1,9 @@ -/* $Id: operator.c,v 1.34 2000/12/01 08:10:01 hubbe Exp $ */ +/* $Id: operator.c,v 1.35 2000/12/05 21:08:26 per Exp $ */ /* **! module Image **! note -**! $Id: operator.c,v 1.34 2000/12/01 08:10:01 hubbe Exp $ +**! $Id: operator.c,v 1.35 2000/12/05 21:08:26 per Exp $ **! class Image */ @@ -504,7 +504,7 @@ STANDARD_OPERATOR_HEADER("`& 'minimum'") **! **! note: **! `< or `> on empty ("no image") image objects or images -**! with different size will result in an Pike_error. +**! with different size will result in an error. **! `== is always true on two empty image objects and **! always false if one and only one of the image objects **! is empty or the images differs in size. diff --git a/src/modules/Image/poly.c b/src/modules/Image/poly.c index 4caf5ae94b5f33c2c4a3a77ed2c8e9e87b388002..c9dec36948a4413dac594cc0501b8e014d2ff942 100644 --- a/src/modules/Image/poly.c +++ b/src/modules/Image/poly.c @@ -1,7 +1,7 @@ /* **! module Image **! note -**! $Id: poly.c,v 1.11 2000/12/01 08:10:02 hubbe Exp $ +**! $Id: poly.c,v 1.12 2000/12/05 21:08:26 per Exp $ **! class Poly **! */ @@ -18,7 +18,7 @@ another? #include "global.h" -RCSID("$Id: poly.c,v 1.11 2000/12/01 08:10:02 hubbe Exp $"); +RCSID("$Id: poly.c,v 1.12 2000/12/05 21:08:26 per Exp $"); #include "image_machine.h" @@ -457,7 +457,7 @@ static void mend_crossed_lines(struct poly *p) v=vertex_find_or_insert(p,x,y); if (v-p->vertex<from) - Pike_error("internal Pike_error: unexpected v-p->vertex<from\n"); + Pike_error("internal error: unexpected v-p->vertex<from\n"); v1=active[i]->down; v2=active[new]->down; @@ -566,7 +566,7 @@ static void image_poly_create(INT32 args) if (THIS->nvertex || THIS->nline) Pike_error("Poly: create called on initialised object\n"); - /* this is to get the correct Pike_error message */ + /* this is to get the correct error message */ for (i=0; i<args; i++) if (sp[i-args].type!=T_ARRAY) SIMPLE_BAD_ARG_ERROR("Poly",i+1,"array"); @@ -777,7 +777,7 @@ static void image_poly_cast(INT32 args) free(mark); if (ni!=THIS->nline) - Pike_error("Poly: internal Pike_error; ni!=nline\n"); + Pike_error("Poly: internal error; ni!=nline\n"); f_aggregate(na); diff --git a/src/modules/Java/jvm.c b/src/modules/Java/jvm.c index 69c6e666be4b06393a2cbe4d57b489df249f345e..3851d85b5da0d813e02ce7b7099dd30ac698ca2d 100644 --- a/src/modules/Java/jvm.c +++ b/src/modules/Java/jvm.c @@ -1,5 +1,5 @@ /* - * $Id: jvm.c,v 1.30 2000/12/01 08:10:09 hubbe Exp $ + * $Id: jvm.c,v 1.31 2000/12/05 21:08:28 per Exp $ * * Pike interface to Java Virtual Machine * @@ -17,7 +17,7 @@ #endif /* HAVE_CONFIG_H */ #include "global.h" -RCSID("$Id: jvm.c,v 1.30 2000/12/01 08:10:09 hubbe Exp $"); +RCSID("$Id: jvm.c,v 1.31 2000/12/05 21:08:28 per Exp $"); #include "program.h" #include "interpret.h" #include "stralloc.h" @@ -1578,7 +1578,7 @@ static void *low_make_stub(struct cpu_context *ctx, void *data, int statc, } #else -#Pike_error How did you get here? It should never happen. +#error How did you get here? It should never happen. #endif /* HAVE_PPC_CPU */ #endif /* HAVE_X86_CPU */ #endif /* HAVE_SPARC_CPU */ diff --git a/src/modules/Math/math_matrix.c b/src/modules/Math/math_matrix.c index 430f5130dd1994d4a591252676c8ee7ed66531d3..00cbb5cd281fa8bcd360be99ae048f9b5f83b1f1 100644 --- a/src/modules/Math/math_matrix.c +++ b/src/modules/Math/math_matrix.c @@ -1,4 +1,4 @@ -/* $Id: math_matrix.c,v 1.19 2000/12/01 08:10:10 hubbe Exp $ */ +/* $Id: math_matrix.c,v 1.20 2000/12/05 21:08:28 per Exp $ */ #include "global.h" #include "config.h" @@ -478,7 +478,7 @@ static void matrix_transpose(INT32 args) **! **! m->normv() is equal to m*(1.0/m->norm()), **! with the exception that the zero vector will still be -**! the zero vector (no Pike_error). +**! the zero vector (no error). */ static void matrix_norm(INT32 args) diff --git a/src/modules/Msql/msqlmod.c b/src/modules/Msql/msqlmod.c index 6948dfa88fa53eb2473fdde2c8553d801e390804..0d380ac63f8c642c8a856132eb0435a534bee9ad 100644 --- a/src/modules/Msql/msqlmod.c +++ b/src/modules/Msql/msqlmod.c @@ -2,7 +2,7 @@ * This code is (C) Francesco Chemolli, 1997. * You may use, modify and redistribute it freely under the terms * of the GNU General Public License, version 2. - * $Id: msqlmod.c,v 1.15 2000/12/01 08:10:12 hubbe Exp $ + * $Id: msqlmod.c,v 1.16 2000/12/05 21:08:29 per Exp $ * * This version is intended for Pike/0.5 and later. * It won't compile under older versions of the Pike interpreter. @@ -35,7 +35,7 @@ #include "operators.h" #include "multiset.h" -RCSID("$Id: msqlmod.c,v 1.15 2000/12/01 08:10:12 hubbe Exp $"); +RCSID("$Id: msqlmod.c,v 1.16 2000/12/05 21:08:29 per Exp $"); #include "version.h" #ifdef _REENTRANT @@ -514,7 +514,7 @@ static void do_host_info (INT32 args) /* string Pike_error() */ static void do_error (INT32 args) { - check_all_args("Msql->Pike_error",args,0); + check_all_args("Msql->error",args,0); pop_n_elems(args); if (THIS->error_msg) ref_push_string(THIS->error_msg); @@ -751,9 +751,9 @@ void pike_module_init(void) database */ /* function(void:void|string) */ - ADD_FUNCTION("Pike_error",do_error,tFunc(tVoid,tOr(tVoid,tStr)), + ADD_FUNCTION("error",do_error,tFunc(tVoid,tOr(tVoid,tStr)), OPT_RETURN|OPT_EXTERNAL_DEPEND); - /* return the last Pike_error reported by the server. */ + /* return the last error reported by the server. */ /* function(void:string) */ ADD_FUNCTION("server_info", do_info,tFunc(tVoid,tStr), diff --git a/src/modules/Mysql/mysql.c b/src/modules/Mysql/mysql.c index 56503bddbfacb296e188ceb65904995d2c4c0275..d23901c01cdfdcc2261cb074c13792db7a74953c 100644 --- a/src/modules/Mysql/mysql.c +++ b/src/modules/Mysql/mysql.c @@ -1,5 +1,5 @@ /* - * $Id: mysql.c,v 1.38 2000/12/01 08:10:12 hubbe Exp $ + * $Id: mysql.c,v 1.39 2000/12/05 21:08:29 per Exp $ * * SQL database functionality for Pike * @@ -34,7 +34,7 @@ #ifdef HAVE_MYSQL_MYSQL_H #include <mysql/mysql.h> #else -#Pike_error Need mysql.h header-file +#error Need mysql.h header-file #endif /* HAVE_MYSQL_MYSQL_H */ #endif /* HAVE_MYSQL_H */ #ifndef _mysql_h @@ -91,7 +91,7 @@ typedef struct dynamic_buffer_s dynamic_buffer; * Globals */ -RCSID("$Id: mysql.c,v 1.38 2000/12/01 08:10:12 hubbe Exp $"); +RCSID("$Id: mysql.c,v 1.39 2000/12/05 21:08:29 per Exp $"); /* **! module Mysql @@ -103,7 +103,7 @@ RCSID("$Id: mysql.c,v 1.38 2000/12/01 08:10:12 hubbe Exp $"); **! see also: Mysql.mysql, Mysql.result, Sql.sql **! **! note -**! $Id: mysql.c,v 1.38 2000/12/01 08:10:12 hubbe Exp $ +**! $Id: mysql.c,v 1.39 2000/12/05 21:08:29 per Exp $ **! **! class mysql **! @@ -459,7 +459,7 @@ static void f_insert_id(INT32 args) /* **! method string Pike_error() **! -**! Returns a string describing the last Pike_error from the Mysql-server. +**! Returns a string describing the last error from the Mysql-server. **! */ /* int|string Pike_error() */ @@ -1413,7 +1413,7 @@ void pike_module_init(void) ADD_STORAGE(struct precompiled_mysql); /* function(void:int|string) */ - ADD_FUNCTION("Pike_error", f_error,tFunc(tVoid,tOr(tInt,tStr)), ID_PUBLIC); + ADD_FUNCTION("error", f_error,tFunc(tVoid,tOr(tInt,tStr)), ID_PUBLIC); /* function(string|void, string|void, string|void, string|void:void) */ ADD_FUNCTION("create", f_create,tFunc(tOr(tStr,tVoid) tOr(tStr,tVoid) tOr(tStr,tVoid) tOr(tStr,tVoid),tVoid), ID_PUBLIC); /* function(void:int) */ diff --git a/src/modules/Mysql/precompiled_mysql.h b/src/modules/Mysql/precompiled_mysql.h index 446868072c486b3f2a91f419e6eb0d4d1fa56299..71e6e8cd0fd77acb461fb29c6a61e6ca798cdf30 100644 --- a/src/modules/Mysql/precompiled_mysql.h +++ b/src/modules/Mysql/precompiled_mysql.h @@ -1,5 +1,5 @@ /* - * $Id: precompiled_mysql.h,v 1.10 2000/12/01 08:10:13 hubbe Exp $ + * $Id: precompiled_mysql.h,v 1.11 2000/12/05 21:08:29 per Exp $ * * SQL database connectivity for Pike * @@ -32,7 +32,7 @@ #ifdef HAVE_MYSQL_MYSQL_H #include <mysql/mysql.h> #else -#Pike_error Need mysql.h header-file +#error Need mysql.h header-file #endif /* HAVE_MYSQL_MYSQL_H */ #endif /* HAVE_MYSQL_H */ #ifndef _mysql_h diff --git a/src/modules/Mysql/result.c b/src/modules/Mysql/result.c index 748960e888835d2b2f4dbe8ce00875bb9ebcf867..d20abbc0b574823df2c257fcff34eba64846af6d 100644 --- a/src/modules/Mysql/result.c +++ b/src/modules/Mysql/result.c @@ -1,5 +1,5 @@ /* - * $Id: result.c,v 1.17 2000/12/01 08:10:13 hubbe Exp $ + * $Id: result.c,v 1.18 2000/12/05 21:08:29 per Exp $ * * mysql query result * @@ -32,7 +32,7 @@ #ifdef HAVE_MYSQL_MYSQL_H #include <mysql/mysql.h> #else -#Pike_error Need mysql.h header-file +#error Need mysql.h header-file #endif /* HAVE_MYSQL_MYSQL_H */ #endif /* HAVE_MYSQL_H */ #ifndef _mysql_h @@ -83,7 +83,7 @@ typedef struct dynamic_buffer_s dynamic_buffer; * Globals */ -RCSID("$Id: result.c,v 1.17 2000/12/01 08:10:13 hubbe Exp $"); +RCSID("$Id: result.c,v 1.18 2000/12/05 21:08:29 per Exp $"); struct program *mysql_result_program = NULL; @@ -211,7 +211,7 @@ void mysqlmod_parse_field(MYSQL_FIELD *field, int support_default) } } else { /* - * Should this be an Pike_error? + * Should this be an error? */ push_int(0); } diff --git a/src/modules/Odbc/odbc.c b/src/modules/Odbc/odbc.c index b5a84af843d2aa4b042cc41f9c3541093200c1dd..4e71e7829732f3667dea92b58b23589c9d2f5a0e 100644 --- a/src/modules/Odbc/odbc.c +++ b/src/modules/Odbc/odbc.c @@ -1,5 +1,5 @@ /* - * $Id: odbc.c,v 1.23 2000/12/01 08:10:14 hubbe Exp $ + * $Id: odbc.c,v 1.24 2000/12/05 21:08:30 per Exp $ * * Pike interface to ODBC compliant databases. * @@ -16,7 +16,7 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ -RCSID("$Id: odbc.c,v 1.23 2000/12/01 08:10:14 hubbe Exp $"); +RCSID("$Id: odbc.c,v 1.24 2000/12/05 21:08:30 per Exp $"); #include "interpret.h" #include "object.h" @@ -312,7 +312,7 @@ static void f_big_query(INT32 args) } #ifdef PIKE_DEBUG if (sp != save_sp) { - fatal("Stack Pike_error in odbc->big_query().\n"); + fatal("Stack error in odbc->big_query().\n"); } #endif /* PIKE_DEBUG */ } @@ -359,7 +359,7 @@ void pike_module_init(void) ADD_STORAGE(struct precompiled_odbc); /* function(void:int|string) */ - ADD_FUNCTION("Pike_error", f_error,tFunc(tVoid,tOr(tInt,tStr)), ID_PUBLIC); + ADD_FUNCTION("error", f_error,tFunc(tVoid,tOr(tInt,tStr)), ID_PUBLIC); /* function(string|void, string|void, string|void, string|void:void) */ ADD_FUNCTION("create", f_create,tFunc(tOr(tStr,tVoid) tOr(tStr,tVoid) tOr(tStr,tVoid) tOr(tStr,tVoid),tVoid), ID_PUBLIC); diff --git a/src/modules/Oracle/oracle.c b/src/modules/Oracle/oracle.c index aa4c2ef2704f3ccdac762249f8ba451d2aee78a1..1beba2feb263e373e6d0a8c5806f102568271d0c 100644 --- a/src/modules/Oracle/oracle.c +++ b/src/modules/Oracle/oracle.c @@ -1,5 +1,5 @@ /* - * $Id: oracle.c,v 1.51 2000/12/01 08:10:15 hubbe Exp $ + * $Id: oracle.c,v 1.52 2000/12/05 21:08:30 per Exp $ * * Pike interface to Oracle databases. * @@ -53,7 +53,7 @@ #include <math.h> -RCSID("$Id: oracle.c,v 1.51 2000/12/01 08:10:15 hubbe Exp $"); +RCSID("$Id: oracle.c,v 1.52 2000/12/05 21:08:30 per Exp $"); #define BLOB_FETCH_CHUNK 16384 @@ -591,7 +591,7 @@ OCIError *get_global_error_handle(void) 0); if(rc != OCI_SUCCESS) - Pike_error("Failed to allocate Pike_error handle.\n"); + Pike_error("Failed to allocate error handle.\n"); return global_error_handle; } diff --git a/src/modules/Perl/perlmod.c b/src/modules/Perl/perlmod.c index d3c87ee3d7ed07f2532810c6cd28a15a4181fd31..cbc13fc609559e5a83b7590cd8ac2115e595d506 100644 --- a/src/modules/Perl/perlmod.c +++ b/src/modules/Perl/perlmod.c @@ -1,4 +1,4 @@ -/* $Id: perlmod.c,v 1.22 2000/12/01 08:10:18 hubbe Exp $ */ +/* $Id: perlmod.c,v 1.23 2000/12/05 21:08:31 per Exp $ */ #define NO_PIKE_SHORTHAND @@ -24,7 +24,7 @@ #include <perl.h> #ifdef USE_THREADS -/* #Pike_error Threaded Perl not supported. */ +/* #error Threaded Perl not supported. */ #endif #define MY_XS 1 @@ -155,11 +155,11 @@ static int _perl_parse(struct perlmod_storage *ps, #endif if (!ps) - Pike_error("Internal Pike_error: no Perl storage allocated.\n"); + Pike_error("Internal error: no Perl storage allocated.\n"); if (!ps->perl) - Pike_error("Internal Pike_error: no Perl interpreter allocated.\n"); + Pike_error("Internal error: no Perl interpreter allocated.\n"); if (!ps->constructed) - Pike_error("Internal Pike_error: Perl interpreter not constructed.\n"); + Pike_error("Internal error: Perl interpreter not constructed.\n"); if (!envp && !ps->env) { /* Copy environment data, since Perl may wish to modify it. */ @@ -599,7 +599,7 @@ static void _perlmod_call(INT32 args, int perlflags) if (n < 0) { PUTBACK; FREETMPS; LEAVE; - Pike_error("Internal Pike_error: perl_call_pv returned a negative number.\n"); + Pike_error("Internal error: perl_call_pv returned a negative number.\n"); } if (!(perlflags & G_ARRAY) && n > 1) @@ -675,7 +675,7 @@ static void _perlmod_varop(INT32 args, int op, int type) (hv, key, _sv_2mortal(_pikev2sv(Pike_sp+2-args)), 0))) sv_setsv(HeVAL(he), _sv_2mortal(_pikev2sv(Pike_sp+2-args))); else - Pike_error("Internal Pike_error: hv_store_ent returned NULL.\n"); + Pike_error("Internal error: hv_store_ent returned NULL.\n"); } pop_n_elems(args); if (op == 'R') @@ -685,7 +685,7 @@ static void _perlmod_varop(INT32 args, int op, int type) _push_zerotype(); } } - else Pike_error("Internal Pike_error in _perlmod_varop.\n"); + else Pike_error("Internal error in _perlmod_varop.\n"); if (op != 'R') push_int(0); } @@ -711,7 +711,7 @@ static void perlmod_array_size(INT32 args) Pike_error("Array name must be given as an 8-bit string.\n"); av = perl_get_av(Pike_sp[-args].u.string->str, TRUE | GV_ADDMULTI); - if (!av) Pike_error("Interal Pike_error: perl_get_av() return NULL.\n"); + if (!av) Pike_error("Interal error: perl_get_av() return NULL.\n"); pop_n_elems(args); /* Return av_len()+1, since av_len() returns the value of the highest * index, which is 1 less than the size. */ @@ -726,7 +726,7 @@ static void perlmod_get_whole_array(INT32 args) Pike_error("Array name must be given as an 8-bit string.\n"); av = perl_get_av(Pike_sp[-args].u.string->str, TRUE | GV_ADDMULTI); - if (!av) Pike_error("Interal Pike_error: perl_get_av() returned NULL.\n"); + if (!av) Pike_error("Interal error: perl_get_av() returned NULL.\n"); n = av_len(av) + 1; if (n > _THIS->array_size_limit) @@ -749,7 +749,7 @@ static void perlmod_get_hash_keys(INT32 args) Pike_error("Hash name must be given as an 8-bit string.\n"); hv = perl_get_hv(Pike_sp[-args].u.string->str, TRUE | GV_ADDMULTI); - if (!hv) Pike_error("Interal Pike_error: perl_get_av() return NULL.\n"); + if (!hv) Pike_error("Interal error: perl_get_av() return NULL.\n"); /* count number of elements in hash */ for(n = 0, hv_iterinit(hv); (he = hv_iternext(hv)); ++n); @@ -873,7 +873,7 @@ void pike_module_exit(void) #else /* HAVE_PERL */ #ifdef ERROR_IF_NO_PERL -#Pike_error "No Perl!" +#error "No Perl!" #endif void pike_module_init(void) {} diff --git a/src/modules/Pipe/pipe.c b/src/modules/Pipe/pipe.c index ef0dad93f5d974a11261c630f7bcf88c927da797..d7e6e585a7aedb7cdc8d36ec8f6c7961306421cb 100644 --- a/src/modules/Pipe/pipe.c +++ b/src/modules/Pipe/pipe.c @@ -30,7 +30,7 @@ #include <fcntl.h> -RCSID("$Id: pipe.c,v 1.44 2000/12/01 08:10:19 hubbe Exp $"); +RCSID("$Id: pipe.c,v 1.45 2000/12/05 21:08:31 per Exp $"); #include "threads.h" #include "stralloc.h" @@ -669,7 +669,7 @@ static INLINE void output_try_write_some(struct object *obj) if(sp[-1].type == T_INT) ret=sp[-1].u.integer; pop_stack(); - if (ret==-1) /* Pike_error, byebye */ + if (ret==-1) /* error, byebye */ { output_finish(obj); return; diff --git a/src/modules/Postgres/postgres.c b/src/modules/Postgres/postgres.c index a09086f3adf727944735777e9d7c93ff940658ca..3698f67fa9ff5b0b80dea2c56f8a3e31ef43ba0d 100644 --- a/src/modules/Postgres/postgres.c +++ b/src/modules/Postgres/postgres.c @@ -61,7 +61,7 @@ static void pgdebug (char * a, ...) {} struct program * postgres_program; -RCSID("$Id: postgres.c,v 1.20 2000/12/01 08:10:21 hubbe Exp $"); +RCSID("$Id: postgres.c,v 1.21 2000/12/05 21:08:31 per Exp $"); #define THIS ((struct pgres_object_data *) Pike_fp->current_storage) @@ -205,7 +205,7 @@ static void f_create (INT32 args) } THIS->dblink=conn; if (!THIS->dblink) - Pike_error ("Huh? Weirdness here! Internal Pike_error!\n"); + Pike_error ("Huh? Weirdness here! Internal error!\n"); pop_n_elems(args); } @@ -217,8 +217,8 @@ static void f_select_db (INT32 args) check_all_args("Postgres->select_db",args,BIT_STRING,0); if (!THIS->dblink) - Pike_error ("Driver Pike_error. How can you possibly not be linked to a " - "database already?\n"); + Pike_error ("Driver error. How can you possibly not be linked to a " + "database already?\n"); conn=THIS->dblink; THREADS_ALLOW(); PQ_LOCK(); @@ -347,12 +347,12 @@ static void f_big_query(INT32 args) default: Pike_error ("Unimplemented server feature.\n"); } - Pike_error ("Internal Pike_error in postgresmodule.\n"); + Pike_error ("Internal error in postgresmodule.\n"); } static void f_error (INT32 args) { - check_all_args("Postgres->Pike_error",args,0); + check_all_args("Postgres->error",args,0); if (THIS->last_error) ref_push_string(THIS->last_error); @@ -462,7 +462,7 @@ void pike_module_init (void) ADD_FUNCTION("big_query",f_big_query,tFunc(tStr,tOr(tInt,tObj)), OPT_EXTERNAL_DEPEND|OPT_RETURN); /* function(void:string) */ - ADD_FUNCTION("Pike_error",f_error,tFunc(tVoid,tStr), + ADD_FUNCTION("error",f_error,tFunc(tVoid,tStr), OPT_EXTERNAL_DEPEND|OPT_RETURN); /* function(void:string) */ ADD_FUNCTION("host_info",f_host_info,tFunc(tVoid,tStr), diff --git a/src/modules/Yp/yp.c b/src/modules/Yp/yp.c index dbda156fc2edf80e6f85a09281ac9e37b32fde0f..0ae5d19ec6bebf88759d7428113b3d311315f4e8 100644 --- a/src/modules/Yp/yp.c +++ b/src/modules/Yp/yp.c @@ -31,13 +31,13 @@ /* must be included last */ #include "module_magic.h" -RCSID("$Id: yp.c,v 1.20 2000/12/01 08:10:24 hubbe Exp $"); +RCSID("$Id: yp.c,v 1.21 2000/12/05 21:08:32 per Exp $"); #ifdef HAVE_YPERR_STRING #define YPERROR(fun,err) do{ if(err) Pike_error("yp->%s(): %s\n", (fun), \ yperr_string(err)); }while(0) #else /* !HAVE_YPERR_STRING */ -#define YPERROR(fun,err) do{ if(err) Pike_error("yp->%s(): YP Pike_error %d.\n", (fun), \ +#define YPERROR(fun,err) do{ if(err) Pike_error("yp->%s(): YP error %d.\n", (fun), \ (err)); }while(0) #endif /* HAVE_YPERR_STRING */ diff --git a/src/modules/_Charset/charsetmod.c b/src/modules/_Charset/charsetmod.c index 019fca6c8383f2f2e3568a3eaa710443199de670..72d623fcdd847fbc02a123f1dda1aa29be2492e9 100644 --- a/src/modules/_Charset/charsetmod.c +++ b/src/modules/_Charset/charsetmod.c @@ -3,7 +3,7 @@ #endif /* HAVE_CONFIG_H */ #include "../../global.h" -RCSID("$Id: charsetmod.c,v 1.25 2000/12/01 08:10:25 hubbe Exp $"); +RCSID("$Id: charsetmod.c,v 1.26 2000/12/05 21:08:32 per Exp $"); #include "program.h" #include "interpret.h" #include "stralloc.h" @@ -441,7 +441,7 @@ static void f_rfc1345(INT32 args) case MODE_9494: lowtrans=lo=lo2=33; hi=hi2=126; break; case MODE_9696: lowtrans=32; lo=lo2=160; hi=hi2=255; break; default: - fatal("Internal Pike_error in rfc1345\n"); + fatal("Internal error in rfc1345\n"); } if(hi2) { @@ -484,7 +484,7 @@ static void f_rfc1345(INT32 args) case MODE_9494: p = std_9494_program; break; case MODE_9696: p = std_9696_program; break; default: - fatal("Internal Pike_error in rfc1345\n"); + fatal("Internal error in rfc1345\n"); } push_object(clone_object(p, 0)); ((struct std_rfc_stor *)(sp[-1].u.object->storage+std_rfc_stor_offs)) diff --git a/src/modules/_Crypto/crypto.c b/src/modules/_Crypto/crypto.c index d7d10376ce825dce87101d2023f11b4d87f30217..b246e5759075248dfdb9bbc5f79374060ede2a78 100644 --- a/src/modules/_Crypto/crypto.c +++ b/src/modules/_Crypto/crypto.c @@ -1,5 +1,5 @@ /* - * $Id: crypto.c,v 1.40 2000/12/01 08:10:27 hubbe Exp $ + * $Id: crypto.c,v 1.41 2000/12/05 21:08:32 per Exp $ * * A pike module for getting access to some common cryptos. * @@ -91,7 +91,7 @@ static void check_functions(struct object *o, const char **requiered) struct program *p; if (!o) { - Pike_error("/precompiled/crypto: internal Pike_error -- no object\n"); + Pike_error("Crypto: internal error -- no object\n"); } if (!requiered) { return; @@ -101,7 +101,7 @@ static void check_functions(struct object *o, const char **requiered) while (*requiered) { if (find_identifier( (char *) *requiered, p) < 0) { - Pike_error("/precompiled/crypto: Object is missing identifier \"%s\"\n", + Pike_error("Crypto: Object is missing identifier \"%s\"\n", *requiered); } requiered++; @@ -223,7 +223,7 @@ static void f_des_parity(INT32 args) } /* - * /precompiled/crypto + * Crypto */ /* void create(program|object, ...) */ diff --git a/src/modules/_Crypto/des.c b/src/modules/_Crypto/des.c index 886b9fcb6f2f164b15aaf0ffadba427e5841fd65..40640447307fd6c917f0923434d41074c6bf821d 100644 --- a/src/modules/_Crypto/des.c +++ b/src/modules/_Crypto/des.c @@ -1,5 +1,5 @@ /* - * $Id: des.c,v 1.18 2000/12/01 08:10:27 hubbe Exp $ + * $Id: des.c,v 1.19 2000/12/05 21:08:33 per Exp $ * * A pike module for getting access to some common cryptos. * @@ -104,7 +104,7 @@ static void set_key(INT32 args) switch (DesMethod(THIS->method, (unsigned INT8 *)sp[-1].u.string->str)) { case -1: - Pike_error("des->set_key: parity Pike_error\n"); + Pike_error("des->set_key: parity error\n"); break; case -2: Pike_error("des->set_key: key is weak!\n"); diff --git a/src/modules/_Image_GIF/image_gif.c b/src/modules/_Image_GIF/image_gif.c index 6f2b7226aee23093fa4250885ec8a3a20d472578..cc389b75939e4666fc3d3a0e666c2112c649d750 100644 --- a/src/modules/_Image_GIF/image_gif.c +++ b/src/modules/_Image_GIF/image_gif.c @@ -1,9 +1,9 @@ -/* $Id: image_gif.c,v 1.2 2000/12/01 08:10:31 hubbe Exp $ */ +/* $Id: image_gif.c,v 1.3 2000/12/05 21:08:33 per Exp $ */ /* **! module Image **! note -**! $Id: image_gif.c,v 1.2 2000/12/01 08:10:31 hubbe Exp $ +**! $Id: image_gif.c,v 1.3 2000/12/05 21:08:33 per Exp $ **! submodule GIF **! **! This submodule keep the GIF encode/decode capabilities @@ -35,7 +35,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: image_gif.c,v 1.2 2000/12/01 08:10:31 hubbe Exp $"); +RCSID("$Id: image_gif.c,v 1.3 2000/12/05 21:08:33 per Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -1024,7 +1024,7 @@ void _image_gif_encode(INT32 args,int fs) nct=(struct neo_colortable*) get_storage(nctobj,image_colortable_program); if (!nct) - Pike_error("Image.GIF.encode(): Internal Pike_error; colortable isn't colortable\n"); + Pike_error("Image.GIF.encode(): Internal error; colortable isn't colortable\n"); arg=2; } else arg=1; @@ -1095,7 +1095,7 @@ void _image_gif_encode(INT32 args,int fs) nct=(struct neo_colortable*) get_storage(nctobj,image_colortable_program); if (!nct) - Pike_error("Image.GIF.encode(): Internal Pike_error; colortable isn't colortable\n"); + Pike_error("Image.GIF.encode(): Internal error; colortable isn't colortable\n"); } tr.r=(unsigned char)sp[arg-args].u.integer; @@ -1117,7 +1117,7 @@ void _image_gif_encode(INT32 args,int fs) nct=(struct neo_colortable*) get_storage(nctobj,image_colortable_program); if (!nct) - Pike_error("Image.GIF.encode(): Internal Pike_error; colortable isn't colortable\n"); + Pike_error("Image.GIF.encode(): Internal error; colortable isn't colortable\n"); } if (fs) image_colortable_internal_floyd_steinberg(nct); @@ -1761,7 +1761,7 @@ fprintf(stderr,"_gif_decode_lzw(%lx,%lu,%d,%lx,%lx,%lx,%lu,%d)\n", #ifdef GIF_DEBUG fprintf(stderr,"cancel; gif codes=%ld m=%ld\n",maxcode,m); #endif - break; /* Pike_error! too much codes */ + break; /* error! too much codes */ } } } @@ -1822,7 +1822,7 @@ void image_gif__decode(INT32 args) image_gif___decode(args); if (sp[-1].type!=T_ARRAY) - Pike_error("Image.GIF._decode: internal Pike_error: " + Pike_error("Image.GIF._decode: internal error: " "illegal result from __decode\n"); a=sp[-1].u.array; @@ -2035,7 +2035,7 @@ void image_gif_decode(INT32 args) image_gif__decode(args); if (sp[-1].type!=T_ARRAY) - Pike_error("Image.GIF.decode: internal Pike_error: " + Pike_error("Image.GIF.decode: internal error: " "illegal result from _decode\n"); a=sp[-1].u.array; @@ -2128,7 +2128,7 @@ void image_gif_decode_layers(INT32 args) image_gif__decode(args); if (sp[-1].type!=T_ARRAY) - Pike_error("Image.GIF.decode: internal Pike_error: " + Pike_error("Image.GIF.decode: internal error: " "illegal result from _decode\n"); a=sp[-1].u.array; @@ -2680,7 +2680,7 @@ static void image_gif_lzw_decode(INT32 args) #ifdef GIF_DEBUG fprintf(stderr,"cancel; gif codes=%ld m=%ld\n",maxcode,m); #endif - break; /* Pike_error! too much codes */ + break; /* error! too much codes */ } } } diff --git a/src/modules/_Image_JPEG/image_jpeg.c b/src/modules/_Image_JPEG/image_jpeg.c index 25394c9f975bfcf6ef983282cf52565928ab6156..e6275d6a3c09844b6c1c89e1ff5f59f5b23e35c1 100644 --- a/src/modules/_Image_JPEG/image_jpeg.c +++ b/src/modules/_Image_JPEG/image_jpeg.c @@ -1,5 +1,5 @@ /* - * $Id: image_jpeg.c,v 1.36 2000/12/01 08:10:31 hubbe Exp $ + * $Id: image_jpeg.c,v 1.37 2000/12/05 21:08:33 per Exp $ */ #include "global.h" @@ -37,7 +37,7 @@ #ifdef HAVE_STDLIB_H #undef HAVE_STDLIB_H #endif -RCSID("$Id: image_jpeg.c,v 1.36 2000/12/01 08:10:31 hubbe Exp $"); +RCSID("$Id: image_jpeg.c,v 1.37 2000/12/05 21:08:33 per Exp $"); /* For some reason EXTERN can be defined here. * This is not good, since it confuses compilation.h. @@ -116,7 +116,7 @@ static void my_error_exit(struct jpeg_common_struct *cinfo) (*cinfo->err->format_message) (cinfo, buffer); jpeg_destroy(cinfo); - Pike_error("Image.JPEG: fatal Pike_error in libjpeg; %s\n",buffer); + Pike_error("Image.JPEG: fatal error in libjpeg; %s\n",buffer); } static void my_emit_message(struct jpeg_common_struct *cinfo,int msg_level) diff --git a/src/modules/_Image_TIFF/image_tiff.c b/src/modules/_Image_TIFF/image_tiff.c index 6622ff57dc0457ac58ceaf894e786d44065577fe..a4c07874ea01d67ea6ef931e51f5e414bc49087f 100644 --- a/src/modules/_Image_TIFF/image_tiff.c +++ b/src/modules/_Image_TIFF/image_tiff.c @@ -7,7 +7,7 @@ */ #ifdef HAVE_LIBTIFF -RCSID("$Id: image_tiff.c,v 1.22 2000/12/01 08:10:32 hubbe Exp $"); +RCSID("$Id: image_tiff.c,v 1.23 2000/12/05 21:08:34 per Exp $"); #include "global.h" #include "machine.h" @@ -82,7 +82,7 @@ static void increase_buffer_size( struct buffer * buffer ) if(!buffer->extendable) Pike_error("Extending non-extendable buffer!\n"); if(buffer->len > 1024*1024*400) - Pike_error("Too large buffer (temprary Pike_error..)\n"); + Pike_error("Too large buffer (temprary error..)\n"); if(!buffer->len) buffer->len = INITIAL_WRITE_BUFFER_SIZE; /* FIXME: According to DMALLOC this leaks. @@ -301,7 +301,7 @@ void low_image_tiff_encode( struct buffer *buf, if(TIFFWriteScanline(tif, buffer, y, 0) < 0) { free(buffer); - Pike_error("TIFFWriteScanline returned Pike_error on line %d\n", y ); + Pike_error("TIFFWriteScanline returned error on line %d\n", y ); } } free(buffer); @@ -483,7 +483,7 @@ void low_image_tiff_decode( struct buffer *buf, push_text( "halftone or dithered scan" ); break; case THRESHHOLD_ERRORDIFFUSE: - push_text( "Pike_error diffused" ); + push_text( "error diffused" ); break; default: push_text( "unknown" ); @@ -628,7 +628,7 @@ static void image_tiff_decode( INT32 args ) **! Decodes a TIFF image. **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ /* @@ -637,7 +637,7 @@ static void image_tiff_decode( INT32 args ) **! image and alpha. **! **! note -**! Throws upon Pike_error in data. +**! Throws upon error in data. */ static void image_tiff__decode( INT32 args ) { diff --git a/src/modules/_Image_TTF/image_ttf.c b/src/modules/_Image_TTF/image_ttf.c index d4822bed200a53ad46bcb594b0470b14634a7b05..7c97170fe969bb93efc43eacd6d11f2e9884c209 100644 --- a/src/modules/_Image_TTF/image_ttf.c +++ b/src/modules/_Image_TTF/image_ttf.c @@ -1,12 +1,12 @@ /* - * $Id: image_ttf.c,v 1.37 2000/12/01 08:10:33 hubbe Exp $ + * $Id: image_ttf.c,v 1.38 2000/12/05 21:08:34 per Exp $ */ #include "config.h" #include "global.h" -RCSID("$Id: image_ttf.c,v 1.37 2000/12/01 08:10:33 hubbe Exp $"); +RCSID("$Id: image_ttf.c,v 1.38 2000/12/05 21:08:34 per Exp $"); #ifdef HAVE_LIBTTF #if defined(HAVE_FREETYPE_FREETYPE_H) && defined(HAVE_FREETYPE_FTXKERN_H) @@ -194,7 +194,7 @@ void my_tt_error(char *where,char *extra,int err) errc="TT_Err_Raster_Invalid_Value"; else if (err==TT_Err_Raster_Not_Initialized) errc="TT_Err_Raster_Not_Initialized"; - Pike_error("%s: %sFreeType Pike_error 0x%03x (%s)\n", + Pike_error("%s: %sFreeType error 0x%03x (%s)\n", where,extra,err,errc); } @@ -552,7 +552,7 @@ static void image_ttf_face_names(INT32 args) image_ttf_face__names(args); if (sp[-1].type!=T_ARRAY) - Pike_error("Image.TTF.Face->names(): internal Pike_error, wierd _names()\n"); + Pike_error("Image.TTF.Face->names(): internal error, wierd _names()\n"); a=sp[-1].u.array; diff --git a/src/modules/_math/math.c b/src/modules/_math/math.c index 4f19f3d77094239c62a7fb3beb395f258b90fd33..717c43b440923600f9e5893faa4061a1a2fd9c5e 100644 --- a/src/modules/_math/math.c +++ b/src/modules/_math/math.c @@ -29,7 +29,7 @@ #include <floatingpoint.h> #endif -RCSID("$Id: math.c,v 1.34 2000/12/01 08:10:34 hubbe Exp $"); +RCSID("$Id: math.c,v 1.35 2000/12/05 21:08:35 per Exp $"); #ifndef M_PI #define M_PI 3.1415926535897932384626433832795080 @@ -45,24 +45,24 @@ int matherr(struct exception *exc) switch(exc->type) { case OVERFLOW: exc->retval = HUGE_VAL; - return 1; /* No Pike_error */ + return 1; /* No error */ case UNDERFLOW: exc->retval = 0.0; - return 1; /* No Pike_error */ + return 1; /* No error */ #ifdef TLOSS case TLOSS: - return 1; /* No Pike_error */ + return 1; /* No error */ #endif /* TLOSS */ #ifdef PLOSS case PLOSS: - return 1; /* No Pike_error */ + return 1; /* No error */ #endif /* PLOSS */ default: return 0; /* Error */ } } #endif /* HUGE_VAL */ - return 1; /* No Pike_error */ + return 1; /* No error */ } #endif /* HAVE_STRUCT_EXCEPTION */ diff --git a/src/modules/files/efuns.c b/src/modules/files/efuns.c index 4b750ea906bc064980fb580065f33851afc12ea4..b518d34b4746ba3d43fcb43f4b0ab55f71556390 100644 --- a/src/modules/files/efuns.c +++ b/src/modules/files/efuns.c @@ -25,7 +25,7 @@ #include "file_machine.h" #include "file.h" -RCSID("$Id: efuns.c,v 1.88 2000/12/01 08:10:35 hubbe Exp $"); +RCSID("$Id: efuns.c,v 1.89 2000/12/05 21:08:35 per Exp $"); #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -306,7 +306,7 @@ void f_filesystem_stat(INT32 args) struct fs_data st; #else /* !HAVE_STRUCT_FS_DATA */ /* Should not be reached */ -#Pike_error No struct to hold statfs() data. +#error No struct to hold statfs() data. #endif /* HAVE_STRUCT_FS_DATA */ #endif /* HAVE_STRUCT_STATFS */ #else /* !HAVE_STATFS */ @@ -315,7 +315,7 @@ void f_filesystem_stat(INT32 args) struct ustat st; #else /* !HAVE_USTAT */ /* Should not be reached */ -#Pike_error No stat function for filesystems. +#error No stat function for filesystems. #endif /* HAVE_USTAT */ #endif /* HAVE_STATFS */ #endif /* HAVE_STATVFS */ @@ -354,7 +354,7 @@ void f_filesystem_stat(INT32 args) } #else /* Should not be reached */ -#Pike_error No stat function for filesystems. +#error No stat function for filesystems. #endif /* HAVE_USTAT */ #endif /* HAVE_STATFS */ #endif /* HAVE_STATVFS */ @@ -417,7 +417,7 @@ void f_filesystem_stat(INT32 args) f_aggregate_mapping(4*2); #else /* !HAVE_STRUCT_FS_DATA */ /* Should not be reached */ -#Pike_error No struct to hold statfs() data. +#error No struct to hold statfs() data. #endif /* HAVE_STRUCT_FS_DATA */ #endif /* HAVE_STRUCT_STATFS */ #else /* !HAVE_STATFS */ @@ -428,7 +428,7 @@ void f_filesystem_stat(INT32 args) f_aggregate_mapping(3*2); #else /* Should not be reached */ -#Pike_error No stat function for filesystems. +#error No stat function for filesystems. #endif /* HAVE_USTAT */ #endif /* HAVE_STATFS */ #endif /* HAVE_STATVFS */ @@ -660,7 +660,7 @@ void f_get_dir(INT32 args) { #if defined(HAVE_SOLARIS_READDIR_R) /* Solaris readdir_r returns the second arg on success, - * and returns NULL on Pike_error or at end of dir. + * and returns NULL on error or at end of dir. */ errno=0; do { @@ -680,7 +680,7 @@ void f_get_dir(INT32 args) /* HPUX's readdir_r returns an int instead: * * 0 - Successfull operation. - * -1 - End of directory or encountered an Pike_error (sets errno). + * -1 - End of directory or encountered an error (sets errno). */ errno=0; if (readdir_r(dir, tmp)) { @@ -725,7 +725,7 @@ void f_get_dir(INT32 args) str->str, d->d_name); #endif /* READDIR_DEBUG */ #else -#Pike_error Unknown readdir_r variant +#error Unknown readdir_r variant #endif if(d->d_name[0]=='.') { diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 7df8459e59edec5b4e7942c666079193ab6b786a..1b18cb9ece1839a28464e6b132500e86f8614415 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -6,7 +6,7 @@ /**/ #define NO_PIKE_SHORTHAND #include "global.h" -RCSID("$Id: file.c,v 1.204 2000/12/01 08:10:35 hubbe Exp $"); +RCSID("$Id: file.c,v 1.205 2000/12/05 21:08:36 per Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -261,7 +261,7 @@ static void just_close_fd(void) Pike_error("Failed to close file: %s\n", Pike_sp[-1].u.string->str); case EBADF: - Pike_error("Internal Pike_error: Closing a non-active file descriptor %d.\n",fd); + Pike_error("Internal error: Closing a non-active file descriptor %d.\n",fd); #ifdef SOLARIS // it's actually OK. This is a bug in Solaris 8. case EAGAIN: diff --git a/src/modules/files/sendfile.c b/src/modules/files/sendfile.c index 3a83324e8e6f1d7eb366e0d7acd740aedbd02922..c5e4583ffee12d9b4a6d5d3ce518389f35f23080 100644 --- a/src/modules/files/sendfile.c +++ b/src/modules/files/sendfile.c @@ -1,5 +1,5 @@ /* - * $Id: sendfile.c,v 1.52 2000/12/02 22:59:07 grubba Exp $ + * $Id: sendfile.c,v 1.53 2000/12/05 21:08:36 per Exp $ * * Sends headers + from_fd[off..off+len-1] + trailers to to_fd asyncronously. * @@ -247,7 +247,7 @@ static void call_callback_and_free(struct callback *cb, void *this_, void *arg) remove_callback(cb); if (this->self) { - /* Make sure we get freed in case of Pike_error */ + /* Make sure we get freed in case of error */ push_object(this->self); this->self = NULL; } diff --git a/src/modules/files/termios.c b/src/modules/files/termios.c index b44d59c68965d9b0c36d4294b33e471e919efd3d..9e7b2cc840a6bee1937294bdd9462a8a05956937 100644 --- a/src/modules/files/termios.c +++ b/src/modules/files/termios.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: termios.c,v 1.10 2000/12/01 08:10:37 hubbe Exp $"); +RCSID("$Id: termios.c,v 1.11 2000/12/05 21:08:37 per Exp $"); #include "file_machine.h" #if defined(HAVE_TERMIOS_H) @@ -85,7 +85,7 @@ void file_tcgetattr(INT32 args) pop_n_elems(args); - if (tcgetattr(FD,&ti)) /* Pike_error */ + if (tcgetattr(FD,&ti)) /* error */ { ERRNO=errno; push_int(0); @@ -200,7 +200,7 @@ void file_tcsetattr(INT32 args) Pike_error("illegal argument 1 to tcsetattr\n"); /* read attr to edit */ - if (tcgetattr(FD,&ti)) /* Pike_error */ + if (tcgetattr(FD,&ti)) /* error */ { ERRNO=errno; push_int(0); diff --git a/src/modules/files/udp.c b/src/modules/files/udp.c index 0b63161089867165bac72326cfa4f1e3f47764db..72f2349807925a65ba71927e01397d65c2bed9f0 100644 --- a/src/modules/files/udp.c +++ b/src/modules/files/udp.c @@ -1,5 +1,5 @@ /* - * $Id: udp.c,v 1.18 2000/12/01 08:10:37 hubbe Exp $ + * $Id: udp.c,v 1.19 2000/12/05 21:08:37 per Exp $ */ #define NO_PIKE_SHORTHAND @@ -7,7 +7,7 @@ #include "file_machine.h" -RCSID("$Id: udp.c,v 1.18 2000/12/01 08:10:37 hubbe Exp $"); +RCSID("$Id: udp.c,v 1.19 2000/12/05 21:08:37 per Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -360,7 +360,7 @@ void udp_read(INT32 args) #endif case EIO: set_read_callback( FD, 0, 0 ); - Pike_error("I/O Pike_error\n"); + Pike_error("I/O error\n"); case ENOMEM: #ifdef ENOSR case ENOSR: diff --git a/src/modules/spider/xml.c b/src/modules/spider/xml.c index ce566556485a0620c83b8baf9591a8920874e1dd..1825102e452f06fcf1bd7346a9b369656beb3417 100644 --- a/src/modules/spider/xml.c +++ b/src/modules/spider/xml.c @@ -887,7 +887,7 @@ static int gobble(struct xmldata *data, char *s) #define PARSE_REF(PARSE_RECURSIVELY) do {\ /* Entity reference */ \ /* lookup entry in mapping and parse it recursively */ \ - /* Generate Pike_error if entity is not defined */ \ + /* Generate error if entity is not defined */ \ if(THIS->entities) \ { \ struct pike_string *name=0; \ @@ -1078,7 +1078,7 @@ static void xmlerror(char *desc, struct xmldata *data) { struct svalue * save_sp=sp; - push_constant_text("Pike_error"); + push_constant_text("error"); push_int(0); /* no name */ push_int(0); /* no attributes */ push_text(desc); @@ -1105,7 +1105,7 @@ static int read_smeg_pereference(struct xmldata *data) XMLERROR("Missing ';' after parsed entity reference."); READ(1); /* lookup entry in mapping and parse it recursively */ - /* Generate Pike_error if entity is not defined */ + /* Generate error if entity is not defined */ f_index(2); if(IS_ZERO(sp-1)) { diff --git a/src/modules/sybase/sybase.c b/src/modules/sybase/sybase.c index 1ad16c9c3e898bb238de1a99bfde784e9afb49b5..f5de384048f5fb151ee0e4d5507be2c9cf3d002f 100644 --- a/src/modules/sybase/sybase.c +++ b/src/modules/sybase/sybase.c @@ -24,7 +24,7 @@ #include "sybase_config.h" #include "global.h" -RCSID("$Id: sybase.c,v 1.5 2000/12/01 08:10:39 hubbe Exp $"); +RCSID("$Id: sybase.c,v 1.6 2000/12/05 21:08:38 per Exp $"); #ifdef HAVE_SYBASE @@ -229,8 +229,8 @@ static void flush_results_queue(pike_sybase_connection *this) { * returns 1 if there's any Pike_error * the same thread-safety rules as flush_results_queue apply * QUESTION: - * Should I explore all messages, and leave in this->Pike_error the - * last one with an Pike_error-level severity? + * Should I explore all messages, and leave in this->error the + * last one with an error-level severity? * or should we maybe only consider server messages? */ static int handle_errors (pike_sybase_connection *this) { @@ -263,7 +263,7 @@ static int handle_errors (pike_sybase_connection *this) { show_severity(severity); } - MEMCPY(this->Pike_error,message.sqlerrm.sqlerrmc, + MEMCPY(this->error,message.sqlerrm.sqlerrmc, message.sqlerrm.sqlerrml+1); this->had_error=1; @@ -394,7 +394,7 @@ static void f_error(INT32 args) { pop_n_elems(args); if (this->had_error) - push_text(this->Pike_error); + push_text(this->error); else push_int(0); } @@ -440,7 +440,7 @@ static void f_connect (INT32 args) { /* It's OK not to lock here. It's just a check that should never happen. * if it happens, we're in deep sh*t already.*/ if (!(context=this->context)) { - err="Internal Pike_error: connection attempted, but no context available\n"; + err="Internal error: connection attempted, but no context available\n"; } if (!err) { @@ -453,16 +453,16 @@ static void f_connect (INT32 args) { } errdebug(err); - if (!err) { /* initialize Pike_error-handling code */ + if (!err) { /* initialize error-handling code */ ret=ct_diag(connection,CS_INIT,CS_UNUSED,CS_UNUSED,NULL); show_status(ret); if (FAILED(ret)) { - err="Can't initialize Pike_error-handling code\n"; + err="Can't initialize error-handling code\n"; } } errdebug(err); - /* if there already was an Pike_error, we just locked uselessly. + /* if there already was an error, we just locked uselessly. * No big deal, it should never happen anyways... */ /* username */ @@ -558,11 +558,11 @@ static void f_create (INT32 args) { } } - /* if there was no Pike_error, we can try to connect. Since f_connect + /* if there was no error, we can try to connect. Since f_connect * will do its own threads meddling, we must disable threads first */ - if (err) { /* there was an Pike_error. bail out */ + if (err) { /* there was an error. bail out */ cs_ctx_drop(context); this->context=NULL; } @@ -906,12 +906,12 @@ static void f_big_query(INT32 args) { function_result=NULL; break; default: - fatal("Internal Pike_error! Wrong result in big_query\n"); + fatal("Internal error! Wrong result in big_query\n"); break; } /* extra safety check. Paranoia. */ if (function_result) { - sybdebug((stderr,"Internal Pike_error! Function_result!=NULL")); + sybdebug((stderr,"Internal error! Function_result!=NULL")); free(function_result); } } @@ -971,14 +971,14 @@ static void f_fetch_row(INT32 args) { return; case CS_ROW_FAIL: handle_errors(this); - Pike_error("Recoverable Pike_error while fetching row\n"); + Pike_error("Recoverable error while fetching row\n"); break; case CS_FAIL: handle_errors(this); ct_cancel(this->connection,cmd,CS_CANCEL_ALL); this->busy--; sybdebug((stderr,"Busy status: %d\n",this->busy)); - Pike_error("Unrecoverable Pike_error while fetching row\n"); + Pike_error("Unrecoverable error while fetching row\n"); break; case CS_CANCELED: sybdebug((stderr,"Canceled\n")); @@ -991,7 +991,7 @@ static void f_fetch_row(INT32 args) { Pike_error("Asynchronous operations are not supported\n"); break; } - Pike_error("Internal Pike_error. We shouldn't get here\n"); + Pike_error("Internal error. We shouldn't get here\n"); } /* int num_fields() */ @@ -1202,7 +1202,7 @@ void pike_module_init (void) { tOr(tVoid,tStr) tOr(tVoid,tStr) tOr(tInt,tVoid), tVoid), 0); - ADD_FUNCTION("Pike_error",f_error,tFunc(tVoid,tOr(tVoid,tStr)), + ADD_FUNCTION("error",f_error,tFunc(tVoid,tOr(tVoid,tStr)), OPT_RETURN); ADD_FUNCTION("big_query",f_big_query,tFunc(tString,tOr(tInt,tObj)), @@ -1226,7 +1226,7 @@ void pike_module_init (void) { add_function("connect",f_connect, "function(void|string,void|string,void|string,void|string,int|void:void)", 0); - add_function("Pike_error",f_error,"function(void:void|string)",OPT_RETURN); + add_function("error",f_error,"function(void:void|string)",OPT_RETURN); add_function("big_query",f_big_query,"function(string:void|object)", OPT_RETURN); add_function("fetch_row", f_fetch_row,"function(void:void|array(mixed))", diff --git a/src/modules/sybase/sybase.h b/src/modules/sybase/sybase.h index 7ba10f98488fb60498ea9d945ceca7b431ac45db..d80e1201bb2537e01bb2bb4d03c71c4890ac2f23 100644 --- a/src/modules/sybase/sybase.h +++ b/src/modules/sybase/sybase.h @@ -23,8 +23,8 @@ typedef struct { CS_COMMAND *cmd; char busy; /* only one pending command per connection */ - char had_error; /* non-zero if had Pike_error */ - char Pike_error[256]; /* The last Pike_error string. The size is determined by the */ + char had_error; /* non-zero if had error */ + char error[256]; /* The last error string. The size is determined by the */ /* sybase API */ char **results; diff --git a/src/modules/system/nt.c b/src/modules/system/nt.c index 158f6a6a3cec6619815e153950789c6de54ea57d..fef2d40f3c0bd9f69be6b99db8fc371f10104cbf 100644 --- a/src/modules/system/nt.c +++ b/src/modules/system/nt.c @@ -1,5 +1,5 @@ /* - * $Id: nt.c,v 1.28 2000/12/01 08:10:39 hubbe Exp $ + * $Id: nt.c,v 1.29 2000/12/05 21:08:39 per Exp $ * * NT system calls for Pike * @@ -32,7 +32,7 @@ static void throw_nt_error(char *funcname, int err) /* - * Give string equivalents to some of the more common NT Pike_error codes. + * Give string equivalents to some of the more common NT error codes. */ { char *msg; @@ -116,11 +116,11 @@ static void throw_nt_error(char *funcname, int err) break; case NERR_Success: - msg = "Strange Pike_error (NERR_Success)."; + msg = "Strange error (NERR_Success)."; break; default: - Pike_error("%s: Unknown Pike_error 0x%04x (%d)\n", funcname, err, err); + Pike_error("%s: Unknown error 0x%04x (%d)\n", funcname, err, err); return; } Pike_error("%s: %s\n", funcname, msg); diff --git a/src/modules/system/system.c b/src/modules/system/system.c index 2f1464d94f05c067551adfe70c1ba2ecd98b779f..f7ac342e1d65f6f62c94b043ebb6bdd899a5bc72 100644 --- a/src/modules/system/system.c +++ b/src/modules/system/system.c @@ -1,5 +1,5 @@ /* - * $Id: system.c,v 1.94 2000/12/01 08:10:40 hubbe Exp $ + * $Id: system.c,v 1.95 2000/12/05 21:08:40 per Exp $ * * System-call module for Pike * @@ -15,7 +15,7 @@ #include "system_machine.h" #include "system.h" -RCSID("$Id: system.c,v 1.94 2000/12/01 08:10:40 hubbe Exp $"); +RCSID("$Id: system.c,v 1.95 2000/12/05 21:08:40 per Exp $"); #ifdef HAVE_WINSOCK_H #include <winsock.h> #endif @@ -142,13 +142,13 @@ static void report_error(const char *function_name) error_msg = "Destination already exists"; break; case EFAULT: - error_msg = "Internal Pike Pike_error:Bad Pike string!"; + error_msg = "Internal Pike error: Bad Pike string!"; break; case EINVAL: error_msg = "Bad argument"; break; case EIO: - error_msg = "I/O Pike_error"; + error_msg = "I/O error"; break; #ifdef ELOOP case ELOOP: diff --git a/src/object.c b/src/object.c index 4e0b2edc4e2400e843cea0a504a321bfe0651f3d..e0b4a002f075f30afbb18fe71492588444202f49 100644 --- a/src/object.c +++ b/src/object.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: object.c,v 1.154 2000/12/01 08:09:51 hubbe Exp $"); +RCSID("$Id: object.c,v 1.155 2000/12/05 21:08:19 per Exp $"); #include "object.h" #include "dynamic_buffer.h" #include "interpret.h" @@ -1551,7 +1551,7 @@ static void f_magic_index(INT32 args) get_all_args("::`->",args,"%S",&s); if(!(o=MAGIC_THIS->o)) - Pike_error("Magic index Pike_error\n"); + Pike_error("Magic index error\n"); if(!o->prog) Pike_error("Magic index on destructed object!\n"); @@ -1586,7 +1586,7 @@ static void f_magic_set_index(INT32 args) get_all_args("::`->=",args,"%S%*",&s,&val); if(!(o=MAGIC_THIS->o)) - Pike_error("Magic index Pike_error\n"); + Pike_error("Magic index error\n"); if(!o->prog) Pike_error("Magic index on destructed object!\n"); diff --git a/src/opcodes.c b/src/opcodes.c index d0678056f2c5abecb4131b8b59243f36d6ead908..83986ca1857b446f45a0de120c32531b5ec5122f 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -26,7 +26,7 @@ #include "bignum.h" #include "operators.h" -RCSID("$Id: opcodes.c,v 1.95 2000/12/01 08:09:51 hubbe Exp $"); +RCSID("$Id: opcodes.c,v 1.96 2000/12/05 21:08:20 per Exp $"); void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) { @@ -650,7 +650,7 @@ PMOD_EXPORT void f_cast(void) compile_type_to_runtime_type(sp[-2].u.string)); #ifdef PIKE_DEBUG if(save_sp != sp) - fatal("Internal Pike_error: o_cast() left droppings on stack.\n"); + fatal("Internal error: o_cast() left droppings on stack.\n"); #endif free_svalue(sp-2); sp[-2]=sp[-1]; diff --git a/src/peep.c b/src/peep.c index c806b64cdc54a03bdf1db3702b8f5f8213a68bc7..0705ac892f12f45150cd76ebfeb7b1b514add88f 100644 --- a/src/peep.c +++ b/src/peep.c @@ -15,7 +15,7 @@ #include "bignum.h" #include "opcodes.h" -RCSID("$Id: peep.c,v 1.44 2000/12/02 14:24:45 grubba Exp $"); +RCSID("$Id: peep.c,v 1.45 2000/12/05 21:08:20 per Exp $"); static void asm_opt(void); @@ -411,7 +411,7 @@ void assemble(void) { #ifdef PIKE_DEBUG if(labels[e]==-1) - fatal("Hyperspace Pike_error: unknown jump point %ld at %d (pc=%x).\n", + fatal("Hyperspace error: unknown jump point %ld at %d (pc=%x).\n", PTRDIFF_T_TO_LONG(e), labels[e], jumps[e]); #endif tmp=read_int(jumps[e]); diff --git a/src/pike_error.h b/src/pike_error.h index f85a18d2aa275727e64e191e55419fae9b2b3f08..fdf3a9552adabe09c1c1abf5fd3eb4550dfa1f8d 100644 --- a/src/pike_error.h +++ b/src/pike_error.h @@ -5,7 +5,7 @@ \*/ /* - * $Id: pike_error.h,v 1.3 2000/12/04 19:38:26 mast Exp $ + * $Id: pike_error.h,v 1.4 2000/12/05 21:08:20 per Exp $ */ #ifndef ERROR_H #define ERROR_H @@ -230,9 +230,10 @@ void cleanup_error(void); /* Prototypes end here */ #define fatal \ - fprintf(stderr,"%s:%d: Fatal Pike_error:\n",__FILE__,__LINE__),debug_fatal + fprintf(stderr,"%s:%d: Fatal error:\n",__FILE__,__LINE__),debug_fatal + +/* Some useful error macros. */ -/* Some useful Pike_error macros. */ #define SIMPLE_BAD_ARG_ERROR(FUNC, ARG, EXPECT) \ bad_arg_error(FUNC, Pike_sp-args, args, ARG, EXPECT, Pike_sp+ARG-1-args,\ @@ -291,7 +292,7 @@ void cleanup_error(void); } \ while(0) -/* Generic Pike_error stuff */ +/* Generic error stuff */ #define ERR_EXT_DECLARE #include "errors.h" diff --git a/src/pike_types.c b/src/pike_types.c index 4420d830792c5f5bf0442aced1541877809cd430..d541d3a79c95d6aafb287def2bd22c0ab1ac3013 100644 --- a/src/pike_types.c +++ b/src/pike_types.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: pike_types.c,v 1.144 2000/12/01 20:24:00 grubba Exp $"); +RCSID("$Id: pike_types.c,v 1.145 2000/12/05 21:08:20 per Exp $"); #include <ctype.h> #include "svalue.h" #include "pike_types.h" @@ -150,7 +150,7 @@ one_more_type: switch(EXTRACT_UCHAR(t++)) { default: - fatal("Pike_error in type string %d.\n",EXTRACT_UCHAR(t-1)); + fatal("Error in type string %d.\n",EXTRACT_UCHAR(t-1)); /*NOTREACHED*/ break; @@ -1952,7 +1952,7 @@ static char *low_match_types2(char *a,char *b, int flags) break; default: - fatal("Pike_error in type string.\n"); + fatal("Error in type string.\n"); } return ret; } @@ -2469,7 +2469,7 @@ static int low_pike_types_le2(char *a, char *b, break; default: - fatal("Pike_error in type string.\n"); + fatal("Error in type string.\n"); } return 1; } @@ -3175,7 +3175,7 @@ struct pike_string *zzap_function_return(char *a, INT32 id) /* I wonder when this occurrs, but apparently it does... */ return zzap_function_return(tFuncV(tVoid,tOr(tMix,tVoid),tObj), id); } -/* This Pike_error is bogus /Hubbe +/* This error is bogus /Hubbe fatal("zzap_function_return() called with unexpected value: %d\n", EXTRACT_UCHAR(a)); */ diff --git a/src/port.c b/src/port.c index bb7289b552975c735855dd41fdaa6c4c26f10a96..173a60ef16c337112a0c149618c7c1dfc109f87f 100644 --- a/src/port.c +++ b/src/port.c @@ -18,7 +18,7 @@ #include <float.h> #include <string.h> -RCSID("$Id: port.c,v 1.34 2000/12/01 08:09:53 hubbe Exp $"); +RCSID("$Id: port.c,v 1.35 2000/12/05 21:08:21 per Exp $"); #ifdef sun time_t time PROT((time_t *)); @@ -133,7 +133,7 @@ long STRTOL(char *str,char **ptr,int base) if (ptr != (char **)0) *ptr = str; /* in case no number is formed */ if (base < 0 || base > MBASE) - return (0); /* base is invalid -- should be a fatal Pike_error */ + return (0); /* base is invalid -- should be a fatal error */ if (!isalnum(c = *str)) { while (ISSPACE(c)) c = *++str; @@ -509,12 +509,12 @@ PMOD_EXPORT double STRTOD(char * nptr, char **endptr) return num * sign; overflow: - /* Return an overflow Pike_error. */ + /* Return an overflow error. */ errno = ERANGE; return HUGE * sign; underflow: - /* Return an underflow Pike_error. */ + /* Return an underflow error. */ if (endptr != NULL) *endptr = (char *) nptr; errno = ERANGE; diff --git a/src/post_modules/GL/auto.c.in b/src/post_modules/GL/auto.c.in index e041d6668efb237369f01e35bb35702d5e27ca14..eae47bac4865a7b93fae4742a412e6047be4603c 100644 --- a/src/post_modules/GL/auto.c.in +++ b/src/post_modules/GL/auto.c.in @@ -1,6 +1,6 @@ /* -*- C -*- * - * $Id: auto.c.in,v 1.16 2000/12/01 08:10:40 hubbe Exp $ + * $Id: auto.c.in,v 1.17 2000/12/05 21:08:41 per Exp $ * */ @@ -8,7 +8,7 @@ #include "config.h" -RCSID("$Id: auto.c.in,v 1.16 2000/12/01 08:10:40 hubbe Exp $"); +RCSID("$Id: auto.c.in,v 1.17 2000/12/05 21:08:41 per Exp $"); #include "stralloc.h" #include "pike_macros.h" #include "object.h" @@ -97,7 +97,7 @@ static int check_234_args(char *func, INT32 args, int mn, int mx, int ty, else if(tr==BIT_FLOAT) tt=((rty&ZT_FLOAT)? ZT_FLOAT:ZT_DOUBLE); else if(tr!=BIT_INT) - Pike_error("Internal Pike_error in check_234_args for %s!\n", func); + Pike_error("Internal error in check_234_args for %s!\n", func); else if(rty&ZT_INT) tt=ZT_INT; else @@ -322,7 +322,7 @@ static int check_1n_args(char *func, INT32 args, int ty, int rty, else if(tr==BIT_FLOAT) tt=((rty&ZT_FLOAT)? ZT_FLOAT:ZT_DOUBLE); else if(tr!=BIT_INT) - Pike_error("Internal Pike_error in check_1n_args for %s!\n", func); + Pike_error("Internal error in check_1n_args for %s!\n", func); else if(rty&ZT_INT) tt=ZT_INT; else diff --git a/src/post_modules/GTK/build_pgtk.pike b/src/post_modules/GTK/build_pgtk.pike index 890da20a3e61c7ea7923819254e4c2d353c3fc46..0641702cb1134ac82be85f177d284f2aa1660553 100755 --- a/src/post_modules/GTK/build_pgtk.pike +++ b/src/post_modules/GTK/build_pgtk.pike @@ -205,12 +205,17 @@ int data_offset( string what ) return ocache[what]=strlen(data)-strlen(what); } +string GS( string what, int|void nul ) +{ + return sprintf("(char*)__pgtk_string_data+%d /* %O */", + data_offset(what+(nul?"\0":"")),what); +} + string emit_function_def( string fun, string cfun, string type, int opt ) { type = function_type( type ); - emit_nl( " quick_add_function((char*)_data+"+data_offset(fun)+","+ - strlen(fun)+","+cfun+",(char*)_data+"+data_offset( type )+ - ","+strlen(type)+","+(fun=="create"?"ID_STATIC":"0")+"," + emit_nl( " quick_add_function("+GS(fun)+","+strlen(fun)+","+cfun+","+ + GS(type)+","+strlen(type)+","+(fun=="create"?"ID_STATIC":"0")+"," "OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);\n"); } @@ -326,7 +331,7 @@ int main(int argc, array argv) void do_default_sprintf( int args, int offset, int len ) { my_pop_n_elems( args ); - push_string( make_shared_binary_string( _data+offset, len ) ); + push_string( make_shared_binary_string( __pgtk_string_data+offset, len ) ); } "; string signal_doc, current_require, current_define; @@ -747,8 +752,6 @@ void do_default_sprintf( int args, int offset, int len ) continue; } -// werror(rest+" "+fn+" ( "+types+" )\n"); - if( rest == "void" ) rest = ""; @@ -819,7 +822,7 @@ void do_default_sprintf( int args, int offset, int len ) " if(_arg"+na+"->item[_i].type != PIKE_T_STRING)\n" " {\n" " free(arg"+na+");\n" - " error(\"Wrong type array argument.\\n\");\n" + " Pike_error("+GS("Wrong type array argument.\n",1)+");\n" " }\n" " arg"+na+"[_i] = _arg"+na+"->item[_i].u.string->str;\n" " }\n"); @@ -845,7 +848,7 @@ void do_default_sprintf( int args, int offset, int len ) " if(_arg"+na+"->item[_i].type != PIKE_T_FLOAT)\n" " {\n" " free(arg"+na+");\n" - " error(\"Wrong type array argument. Expected float\\n\");\n" + " Pike_error("+GS("Wrong type array argument.\n",1)+");\n" " }\n" " arg"+na+"[_i] = _arg"+na+"->item[_i].u.float_number;\n" " }\n"); @@ -869,7 +872,7 @@ void do_default_sprintf( int args, int offset, int len ) " if(_arg"+na+"->item[_i].type != PIKE_T_FLOAT)\n" " {\n" " free(arg"+na+");\n" - " error(\"Wrong type array argument. Expected float\\n\");\n" + " error("+GS("Wrong type array argument.\n",1)+");\n" " }\n" " arg"+na+"[_i] = (gdouble)_arg"+na+"->item[_i].u.float_number;\n" " }\n"); @@ -892,7 +895,7 @@ void do_default_sprintf( int args, int offset, int len ) " if(_arg"+na+"->item[_i].type != PIKE_T_INT)\n" " {\n" " free(arg"+na+");\n" - " error(\"Wrong type array argument. Expected int\\n\");\n" + " Pike_error("+GS("Wrong type array argument.\n")+");\n" " }\n" " arg"+na+"[_i] = _arg"+na+"->item[_i].u.integer;\n" " }\n" @@ -946,13 +949,13 @@ void do_default_sprintf( int args, int offset, int len ) post += (" if (_arg"+na+"->size != "+ (t=replace(t,({"{","}"}),({"(",")"})))+ ") \n" - " error(\"argument "+na+" (array(string)) has wrong size (columns=%d, elements=%d)\\n\",\n" - " "+t+",_arg"+na+"->size);\n" + " Pike_error("+GS("argument %d (array(string)) has wrong size (columns=%d, elements=%d)\n",1) + +","+na+",\n "+t+",_arg"+na+"->size);\n" " arg"+na+"=alloca(sizeof(char *)* (_arg"+na+"->size));\n" " for(_i=0; _i<_arg"+na+"->size; _i++)\n" " {\n" " if(_arg"+na+"->item[_i].type != PIKE_T_STRING)\n" - " error(\"Wrong type array argument.\\n\");\n" + " Pike_error("+GS("Wrong type array argument.\n",1)+");\n" " arg"+na+"[_i] = _arg"+na+"->item[_i].u.string->str;\n" " }\n"); break; @@ -982,8 +985,9 @@ void do_default_sprintf( int args, int offset, int len ) post+=(" arg"+na+" = get_gdkobject( _arg"+na+", "+t+");\n"); if(!opt) { - post +=(" if(!arg"+na+") error(\"Argument "+ - na+": Wanted GDK object of type "+t+".\\n\");\n"); + post +=(" if(!arg"+na+") Pike_error("+ + GS("Argument %d: Wanted GDK object of type %s\n",1)+ + ","+na+","+GS(t,1)+");\n"); args += " struct object *_arg"+na+";\n"; args += " Gdk"+t+" *arg"+na+";\n"; } else { @@ -1007,8 +1011,9 @@ void do_default_sprintf( int args, int offset, int len ) if(opt) post += " else\n arg"+na+" = NULL;\n"; else - post += (" if(!arg"+na+") error(\"Argument "+ - na+": Wanted GTK object of type "+t+".\\n\");\n"); + post += (" if(!arg"+na+") Pike_error("+ + GS("Argument %d: Wanted GTK object of type %s\n",1) + +","+na+","+GS(t,1)+");\n"); } break; } @@ -1127,8 +1132,7 @@ void do_default_sprintf( int args, int offset, int len ) fn = line; constants_name += ({ fn }); if( current_define ) constants += ( "#ifdef "+current_define+"\n"); - constants += (" add_string_constant((char*)_data+"+ - data_offset(fn+"\0")+", "+line+", 0);\n"); + constants += (" add_string_constant("+GS(fn,1)+","+GS(line,1)+",0);\n"); if( current_define ) constants += ( "#endif\n"); } else if(sscanf(line, "constant int %s;", line)==1 || @@ -1139,8 +1143,7 @@ void do_default_sprintf( int args, int offset, int len ) fn = line; constants_name += ({ fn }); if( current_define ) constants += ( "#ifdef "+current_define+"\n"); - constants += (" add_integer_constant((char*)_data+"+ - data_offset(fn+"\0")+", "+line+", 0);\n"); + constants += (" add_integer_constant("+GS(fn,1)+", "+line+", 0);\n"); if( current_define ) constants += ( "#endif\n"); } else if(sscanf(line, "ARGS(%s);", line)==1) @@ -1190,10 +1193,8 @@ void do_default_sprintf( int args, int offset, int len ) emit_nl("static void _2()\n{\n"); _inits += ({ "_2" }); foreach(sort(indices(`+(@values(signals)))), string s) - emit_nl(" add_string_constant( (char*)_data+"+data_offset("s_"+ - replace(s,"-","_") - +"\0")+ - ", (char*)_data+"+data_offset(s+"\0")+", 0 );\n"); + emit_nl(" add_string_constant( "+GS("s_"+replace(s,"-","_"),1)+", " + +GS(s,1)+", 0 );\n"); emit_program_block( struct->global, "global" ); emit_nl("}\n"); @@ -1350,8 +1351,7 @@ void do_default_sprintf( int args, int offset, int len ) emit( " {\n" ); emit_program_block( q, w ); emit( " }\n" ); - emit_nl(" add_program_constant((char*)_data+"+ - data_offset(String.capitalize(w)+"\0")+",\n" + emit_nl(" add_program_constant("+GS(String.capitalize(w),1)+",\n" " (pgtk_"+w+"_program = end_program()), 0);" "\n"); pre += "/*ext*/ struct program *pgtk_"+w+"_program;\n"; @@ -1407,7 +1407,7 @@ void do_default_sprintf( int args, int offset, int len ) string q =replace(Stdio.read_bytes(dir+"/pgtk.c.head"), "PROTOTYPES", replace(pre, "/*ext*/ ", "")+ - "\nstatic const char _data[] =\n"+ + "\nconst char __pgtk_string_data[] =\n"+ make_c_string( data )+";"); pre = replace(pre, "/*ext*/", "extern"); if(Stdio.read_bytes("prototypes.h") != pre ) diff --git a/src/post_modules/GTK/dependencies b/src/post_modules/GTK/dependencies index e99b9bc9cd3637878417354c2735ec060ae2abb1..1a5fe0ed53bc96d3662d14308fe427b8e4a2d91d 100644 --- a/src/post_modules/GTK/dependencies +++ b/src/post_modules/GTK/dependencies @@ -1,6 +1,4 @@ dummy.o: $(SRCDIR)/dummy.c \ - $(PIKE_SRC_DIR)/global.h \ - $(BUILD_BASE)/machine.h \ - $(PIKE_SRC_DIR)/port.h \ - $(PIKE_SRC_DIR)/dmalloc.h config.h \ - $(PIKE_SRC_DIR)/module_magic.h + /home/per/src/Pike/7.1/src/global.h $(BUILD_BASE)/machine.h \ + /home/per/src/Pike/7.1/src/port.h /home/per/src/Pike/7.1/src/dmalloc.h \ + config.h /home/per/src/Pike/7.1/src/module_magic.h diff --git a/src/post_modules/GTK/pgtk.h b/src/post_modules/GTK/pgtk.h index 8b2e90dd96af5a3e3592d7c0616e4a2f95125c4c..cb8ada769dd567444e46e049ba24fc7f14037dca 100644 --- a/src/post_modules/GTK/pgtk.h +++ b/src/post_modules/GTK/pgtk.h @@ -67,6 +67,7 @@ struct my_pixel unsigned char padding; }; +extern const char __pgtk_string_data[]; extern int pigtk_is_setup; struct program *pgtk_type_to_program(GtkWidget *widget); void my_pop_n_elems( int n ); diff --git a/src/post_modules/GTK/source/gdkbitmap.pre b/src/post_modules/GTK/source/gdkbitmap.pre index 98d69e280ceee8f9633d37998a850ac169d3b90c..1e8b2e8a809ac3f67bffe5d46a27b7935f0f51c2 100644 --- a/src/post_modules/GTK/source/gdkbitmap.pre +++ b/src/post_modules/GTK/source/gdkbitmap.pre @@ -28,12 +28,12 @@ NAME_ARGS(image|xsize, void|ysize, void|xbitmapdata); get_all_args( "internal", 1, "%s", &d ); args=2; /* evil me.. */ } else { - error("Wrong number of arguments to GDK.Bitmap()\n"); + Pike_error("Wrong number of arguments to GDK.Bitmap()\n"); } THIS->obj = (void *)gdk_bitmap_create_from_data(0, d, x, y); if(!THIS->obj) - error("Failed to create bitmap\n"); + Pike_error("Failed to create bitmap\n"); my_pop_n_elems(args); } diff --git a/src/post_modules/GTK/source/gdkcolor.pre b/src/post_modules/GTK/source/gdkcolor.pre index 61d66c9394e8e927ed9dcfaf93224e8d3340fb6c..2606c285abeca35aca96e48bd1770b9bf5d0af10 100644 --- a/src/post_modules/GTK/source/gdkcolor.pre +++ b/src/post_modules/GTK/source/gdkcolor.pre @@ -20,7 +20,7 @@ NAME_ARGS(r|color,g,b); struct object *o; get_all_args("GdkColor", args, "%o", &o); if( !get_color_from_pikecolor( o, &r, &g, &b ) ) - error("Bad argument 1 to GDK.Color(). Exptected color object\n"); + Pike_error("Bad argument 1 to GDK.Color(). Exptected color object\n"); } else { @@ -40,7 +40,7 @@ NAME_ARGS(r|color,g,b); { free(c); THIS->obj = 0; - error("Failed to allocate color.\n"); + Pike_error("Failed to allocate color.\n"); } } diff --git a/src/post_modules/GTK/source/gdkdragcontext.pre b/src/post_modules/GTK/source/gdkdragcontext.pre index 3bdf97f7cfd77722b07c522bd30a157916974189..9fa4a20e0e31940f23f0ce674325c39c1d95a835 100644 --- a/src/post_modules/GTK/source/gdkdragcontext.pre +++ b/src/post_modules/GTK/source/gdkdragcontext.pre @@ -103,7 +103,7 @@ NAME_ARGS(image,mask,hot_x,hot_y); struct object *p=NULL, *m=NULL; int x, y; if(args != 4) - error("Too few arguments to drag_set_icon_pixmap\n"); + Pike_error("Too few arguments to drag_set_icon_pixmap\n"); if(Pike_sp[-args].type == PIKE_T_OBJECT) p = Pike_sp[-args].u.object; if(Pike_sp[-args+1].type == PIKE_T_OBJECT) diff --git a/src/post_modules/GTK/source/gdkevent.pre b/src/post_modules/GTK/source/gdkevent.pre index 3d379fe90b5c932ef2beb5a21ad1d940fd780266..ce54c7cfae3b78f0e81c933e2d0cdafecb94bbca 100644 --- a/src/post_modules/GTK/source/gdkevent.pre +++ b/src/post_modules/GTK/source/gdkevent.pre @@ -31,7 +31,7 @@ FUNCTION(_index, "function(string:mixed)"); { struct pike_string *index; GdkEvent *e = (GdkEvent *)THIS->obj; - if(!e) error("No event\n"); + if(!e) Pike_error("No event\n"); get_all_args( "`[]", args, "%S", &index ); if( !s_type ) define_gdkeventstrings(); switch( e->type ) @@ -232,11 +232,11 @@ FUNCTION(cast, "function(string:mixed)"); char *a; GdkEvent *e = (GdkEvent *)THIS->obj; - if(!e) error("No event\n"); + if(!e) Pike_error("No event\n"); if( !s_type ) define_gdkeventstrings(); if( !args || Pike_sp[-args].u.string != s_mapping ) - error("Can only cast to mapping\n"); + Pike_error("Can only cast to mapping\n"); pop_n_elems( args ); switch(e->type) diff --git a/src/post_modules/GTK/source/gdkfont.pre b/src/post_modules/GTK/source/gdkfont.pre index 85078a0ef07574b9d0b8635bb4ac9d8714af3ad3..f6749314f7dcc2669cbf64eefa8ea3bb5aa195b5 100644 --- a/src/post_modules/GTK/source/gdkfont.pre +++ b/src/post_modules/GTK/source/gdkfont.pre @@ -67,7 +67,7 @@ NAME_ARGS(font_name); get_all_args("Gdk.Font", args, "%s", &n); THIS->obj = (void*)gdk_font_load( n ); if(!THIS->obj) - error("Failed to load font.\n"); + Pike_error("Failed to load font.\n"); } else { } } diff --git a/src/post_modules/GTK/source/gdkimage.pre b/src/post_modules/GTK/source/gdkimage.pre index 67b80d22a20f8d160266bcc3de7220c2ff5af5ae..f46224e2efb6d47409b465ada5cfc358e5c624ac 100644 --- a/src/post_modules/GTK/source/gdkimage.pre +++ b/src/post_modules/GTK/source/gdkimage.pre @@ -98,7 +98,7 @@ NAME_ARGS(widget,xoffset,yoffset,width,height); win = GTK_WIDGET(get_pgtkobject( o, pgtk_widget_program))->window; if(!win) - error("This is not a window, and this widget have a window\n"); + Pike_error("This is not a window, and this widget have a window\n"); if(THIS->obj) gdk_image_destroy( (void *)THIS->obj ); @@ -132,7 +132,7 @@ NAME_ARGS(image|xsize,void|ysize); gdk_visual_get_system(), x, y); if(!THIS->obj) - error("Failed to create gdkImage from size.\n"); + Pike_error("Failed to create gdkImage from size.\n"); } RETURN_THIS(); } @@ -145,7 +145,7 @@ NAME_ARGS(x,y); { INT_TYPE x, y; get_all_args("get_pixel", args, "%d%d", &x, &y); - if(!THIS->obj) error("No image.\n"); + if(!THIS->obj) Pike_error("No image.\n"); my_pop_n_elems(args); push_int( gdk_image_get_pixel( (void *)THIS->obj, x, y ) ); } @@ -158,7 +158,7 @@ NAME_ARGS(x,y,pixel); { INT_TYPE x, y, to; get_all_args("set_pixel", args, "%d%d%d", &x, &y, &to); - if(!THIS->obj) error("No image.\n"); + if(!THIS->obj) Pike_error("No image.\n"); gdk_image_put_pixel( (void *)THIS->obj, x, y, to ); RETURN_THIS(); } diff --git a/src/post_modules/GTK/source/gdkpixmap.pre b/src/post_modules/GTK/source/gdkpixmap.pre index 432f759f02e68a109af49e49dbdd0e84d4b2f357..6adec143b9b86c97b1409bc30412b9cd2ce32700 100644 --- a/src/post_modules/GTK/source/gdkpixmap.pre +++ b/src/post_modules/GTK/source/gdkpixmap.pre @@ -51,7 +51,7 @@ NAME_ARGS(image|xid); pgtk_verify_setup(); pgtk_verify_not_inited(); if(THIS->obj) - error("Pixmap already initialized\n"); + Pike_error("Pixmap already initialized\n"); if( Pike_sp[-args].type == PIKE_T_OBJECT ) { @@ -62,7 +62,7 @@ NAME_ARGS(image|xid); if(!THIS->obj) { if(f) gdk_image_destroy( i ); - error("Failed to create pixmap.\n"); + Pike_error("Failed to create pixmap.\n"); } pgtk__pixmap_draw( i ); if(f) gdk_image_destroy( i ); @@ -71,7 +71,7 @@ NAME_ARGS(image|xid); { THIS->obj = (void *)gdk_pixmap_foreign_new( Pike_sp[-1].u.integer ); if( !THIS->obj ) - error("Failed to find remote pixmap\n"); + Pike_error("Failed to find remote pixmap\n"); } } diff --git a/src/post_modules/GTK/source/gdkrectangle.pre b/src/post_modules/GTK/source/gdkrectangle.pre index 7cf77d022b3d7c5241d096980edbe3e4b71b30f9..b0d7566bdf2ffa42318abaccaaa12a8ea352a59a 100644 --- a/src/post_modules/GTK/source/gdkrectangle.pre +++ b/src/post_modules/GTK/source/gdkrectangle.pre @@ -61,7 +61,7 @@ NAME_ARGS(type); push_int( r->height ); f_aggregate( 4 ); } else { - error("Cannot cast to %s.\n", type ); + Pike_error("Cannot cast to %s.\n", type ); } } diff --git a/src/post_modules/GTK/source/gdkregion.pre b/src/post_modules/GTK/source/gdkregion.pre index 473e77aa23d648f0782ec20b3b01a6a9529cda07..0301702e573ac225ad92ecc686e64606cfaab76c 100644 --- a/src/post_modules/GTK/source/gdkregion.pre +++ b/src/post_modules/GTK/source/gdkregion.pre @@ -67,7 +67,7 @@ NAME_ARGS(rectangle); get_all_args( "rect_in", args, "%o", &o ); if(!(r = get_gdkobject( o, Rectangle ))) { - error("Bad argument 1 to GDK.rect_in( GDK.Rectangle r )\n"); + Pike_error("Bad argument 1 to GDK.rect_in( GDK.Rectangle r )\n"); } else { int b = gdk_region_rect_in((GdkRegion *)THIS->obj, r); my_pop_n_elems(args); @@ -119,7 +119,7 @@ NAME_ARGS(with); else if( (v=get_gdkobject(o, Region )) ) r = gdk_regions_union( (GdkRegion *)THIS->obj, v); else - error("Bad argument to union: Not Region or Rectangle\n"); + Pike_error("Bad argument to union: Not Region or Rectangle\n"); return_gdkregion( args, r ); return; } @@ -138,7 +138,7 @@ NAME_ARGS(with); if( (v=get_gdkobject(o, Region )) ) { r = gdk_regions_union( (GdkRegion *)THIS->obj, v); } else { - error("Bad argument to intersect: Not a GDK.Region object\n"); + Pike_error("Bad argument to intersect: Not a GDK.Region object\n"); } return_gdkregion( args, r ); return; @@ -158,7 +158,7 @@ NAME_ARGS(with); if( (v=get_gdkobject(o, Region )) ) { r = gdk_regions_subtract( (GdkRegion *)THIS->obj, v); } else { - error("Bad argument to subtract: Not a GDK.Region object\n"); + Pike_error("Bad argument to subtract: Not a GDK.Region object\n"); } return_gdkregion( args, r ); return; @@ -178,7 +178,7 @@ NAME_ARGS(with); if( (v=get_gdkobject(o, Region )) ) { r = gdk_regions_xor( (GdkRegion *)THIS->obj, v); } else { - error("Bad argument to xor: Not a GDK.Region object\n"); + Pike_error("Bad argument to xor: Not a GDK.Region object\n"); } return_gdkregion( args, r ); return; diff --git a/src/post_modules/GTK/source/gdkwindow.pre b/src/post_modules/GTK/source/gdkwindow.pre index 3390687d3d94717e1dc0ead99dad782a3f8ce3c4..a0f6a6ba35a8ea7e4681150fe7b3ca86a154a7b9 100644 --- a/src/post_modules/GTK/source/gdkwindow.pre +++ b/src/post_modules/GTK/source/gdkwindow.pre @@ -21,7 +21,7 @@ NAME_ARGS(XWindowID|parent,void|atrributes); get_all_args( "GdkWindow", args, "%d", &id ); THIS->obj = (void *)gdk_window_foreign_new( id ); if( !THIS->obj ) - error("The window with id 0x%x does not exist\n", id); + Pike_error("The window with id 0x%x does not exist\n", id); } else if(Pike_sp[-args].type == PIKE_T_OBJECT) { struct object *parent; struct mapping *m; @@ -148,7 +148,7 @@ NAME_ARGS(cursor_type); get_all_args("set_cursor", args, "%d", &i); if(i>255) - error("No such cursor\n"); + Pike_error("No such cursor\n"); if(font_cursors[ i ]) c = font_cursors[ i ]; @@ -519,7 +519,7 @@ NAME_ARGS(background); else if(get_gdkobject(o,Color)) gdk_window_set_background((GdkWindow *)THIS->obj, get_gdkobject(o,Color)); else - error("Set the background to what?\n"); + Pike_error("Set the background to what?\n"); /* if(gdk_error_trap_pop()) */ /* error("Failed to set the background\n"); */ diff --git a/src/post_modules/GTK/source/gladexml.pre b/src/post_modules/GTK/source/gladexml.pre index 8cf05cc629a91f11ab2c2d9b3ba3eb616d7a6088..cbc10fa8a6b58ddce68a79d5354efd07f8b7a457 100644 --- a/src/post_modules/GTK/source/gladexml.pre +++ b/src/post_modules/GTK/source/gladexml.pre @@ -15,7 +15,7 @@ class GladeXML; #include <glade/glade.h> int glade_is_setup = 0; -RCSID("$Id: gladexml.pre,v 1.9 2000/10/17 17:41:07 per Exp $"); +RCSID("$Id: gladexml.pre,v 1.10 2000/12/05 21:08:47 per Exp $"); %{ /* This function is used by signal_autoconnect to handle signal @@ -95,7 +95,7 @@ RETURNS(GTK.GladeXML); char *root = NULL, *domain = NULL; if(THIS->obj) - error("GladeXML->new_from_memory(): Already initialized!\n"); + Pike_error("GladeXML->new_from_memory(): Already initialized!\n"); switch(args) { @@ -105,25 +105,25 @@ RETURNS(GTK.GladeXML); pop_n_elems(1); args--; } else - error("GladeXML->new_from_memory(): Invalid argument 3, expected string.\n"); + Pike_error("GladeXML->new_from_memory(): Invalid argument 3, expected string.\n"); case 2: if(Pike_sp[-1].type == PIKE_T_STRING) { root = Pike_sp[-1].u.string->str; pop_n_elems(1); args--; } else - error("GladeXML->new_from_memory(): Invalid argument 2, expected string.\n"); + Pike_error("GladeXML->new_from_memory(): Invalid argument 2, expected string.\n"); case 1: if(Pike_sp[-1].type == PIKE_T_STRING) { data = Pike_sp[-1].u.string; pop_n_elems(1); args--; } else - error("GladeXML->new_from_memory(): Invalid argument 1, expected string.\n"); + Pike_error("GladeXML->new_from_memory(): Invalid argument 1, expected string.\n"); break; default: - error("Invalid number or arguments to GladeXML->new_from_memory()\n"); + Pike_error("Invalid number or arguments to GladeXML->new_from_memory()\n"); } xml = glade_xml_new_from_memory(data->str, data->len, @@ -149,7 +149,7 @@ NAME_ARGS(filename, root, domain); char *data = NULL, *root = NULL, *domain = NULL; if(THIS->obj) - error("GladeXML->new: Already initialized!\n"); + Pike_error("GladeXML->new: Already initialized!\n"); switch(args) { @@ -159,7 +159,7 @@ NAME_ARGS(filename, root, domain); pop_n_elems(1); args--; } else - error("GladeXML->new(): Invalid argument 3, expected string.\n"); + Pike_error("GladeXML->new(): Invalid argument 3, expected string.\n"); case 2: if(Pike_sp[-1].type == PIKE_T_STRING) { @@ -167,7 +167,7 @@ NAME_ARGS(filename, root, domain); pop_n_elems(1); args--; } else - error("GladeXML->new(): Invalid argument 2, expected string.\n"); + Pike_error("GladeXML->new(): Invalid argument 2, expected string.\n"); case 1: if(Pike_sp[-1].type == PIKE_T_STRING) { @@ -175,10 +175,10 @@ NAME_ARGS(filename, root, domain); pop_n_elems(1); args--; } else - error("GladeXML->new(): Invalid argument 3, expected string.\n"); + Pike_error("GladeXML->new(): Invalid argument 3, expected string.\n"); break; default: - error("Invalid number or arguments to GladeXML->new().\n"); + Pike_error("Invalid number or arguments to GladeXML->new().\n"); } if(domain != NULL) xml = glade_xml_new_with_domain(data, root, domain); @@ -219,14 +219,14 @@ NAME_ARGS(name); GtkWidget *widget = NULL; GladeXML *xml; if(!THIS->obj) - error("GladeXML->get_widget(): No widgets are loaded.\n"); + Pike_error("GladeXML->get_widget(): No widgets are loaded.\n"); xml = (GladeXML *)THIS->obj; if(args == 1 && Pike_sp[-1].type == PIKE_T_STRING) { widget = glade_xml_get_widget(xml, Pike_sp[-1].u.string->str); pop_n_elems(args); push_gtkobjectclass( widget, pgtk_type_to_program(widget)); } else - error("GladeXML->get_widget(): Invalid argument, expected string.\n"); + Pike_error("GladeXML->get_widget(): Invalid argument, expected string.\n"); } @@ -242,14 +242,14 @@ NAME_ARGS(long_name); GtkWidget *widget = NULL; GladeXML *xml; if(!THIS->obj) - error("GladeXML->get_widget_by_long_name(): No widgets are loaded.\n"); + Pike_error("GladeXML->get_widget_by_long_name(): No widgets are loaded.\n"); xml = (GladeXML *)THIS->obj; if(args == 1 && Pike_sp[-1].type == PIKE_T_STRING) { widget = glade_xml_get_widget_by_long_name(xml, Pike_sp[-1].u.string->str); pop_n_elems(args); push_gtkobjectclass( widget, pgtk_type_to_program(widget)); } else - error("GladeXML->get_widget_by_long_name(): Invalid argument, expected string.\n"); + Pike_error("GladeXML->get_widget_by_long_name(): Invalid argument, expected string.\n"); } FUNCTION(get_widget_long_name, "function(object:string)"); @@ -265,7 +265,7 @@ ARGS(GTK.Widget); get_all_args("GladeXML->get_widget_long_name", args, "%o", &obj); widget = GTK_WIDGET(get_gtkobject(obj)); if(!widget) - error("GladeXML->get_widget_long_name: Invalid argument 1, wanted GTK object of type WIDGET.\n"); + Pike_error("GladeXML->get_widget_long_name: Invalid argument 1, wanted GTK object of type WIDGET.\n"); name = glade_get_widget_long_name(widget); pop_n_elems(args); @@ -292,7 +292,7 @@ ARGS(GTK.Widget); get_all_args("GladeXML->get_widget_name", args, "%o", &obj); widget = GTK_WIDGET(get_gtkobject(obj)); if(!widget) - error("GladeXML->get_widget_name: Invalid argument 1, wanted GTK object of type WIDGET.\n"); + Pike_error("GladeXML->get_widget_name: Invalid argument 1, wanted GTK object of type WIDGET.\n"); name = glade_get_widget_name(widget); pop_n_elems(args); @@ -318,12 +318,12 @@ RETURNS(void); { GladeXML *xml; if(args != 2 || Pike_sp[-args].type != PIKE_T_MAPPING) - error("GTK.GladeXML->signal_autoconnect: Invalid arguments, expected (mapping,mixed)\n"); + Pike_error("GTK.GladeXML->signal_autoconnect: Invalid arguments, expected (mapping,mixed)\n"); if(!THIS->obj) - error("GladeXML->get_widget_by_long_name(): No widgets are loaded.\n"); + Pike_error("GladeXML->get_widget_by_long_name(): No widgets are loaded.\n"); xml = (GladeXML *)THIS->obj; glade_xml_signal_autoconnect_full(xml, pgtk__signal_connect, &args); pop_n_elems(args); } -// <p align="right"><font size="2"><i>$Id: gladexml.pre,v 1.9 2000/10/17 17:41:07 per Exp $</i></font></p> +// <p align="right"><font size="2"><i>$Id: gladexml.pre,v 1.10 2000/12/05 21:08:47 per Exp $</i></font></p> diff --git a/src/post_modules/GTK/source/global.pre b/src/post_modules/GTK/source/global.pre index eae6b15d23d851206a8ad2393e5ff1af67aeef1c..8ea896947d50777aa0f6c48409040a963d99ad15 100644 --- a/src/post_modules/GTK/source/global.pre +++ b/src/post_modules/GTK/source/global.pre @@ -114,7 +114,7 @@ NAME_ARGS(app_id, app_version, argv, corba_init_flags); INT_TYPE argc, flags=0; struct array *a; if( pigtk_is_setup ) - error( "You should only call GTK.setup_gtk() or Gnome.init() once\n"); + Pike_error( "You should only call GTK.setup_gtk() or Gnome.init() once\n"); gnome_is_setup = 1; pigtk_is_setup = 1; if( args == 4 ) @@ -127,8 +127,8 @@ NAME_ARGS(app_id, app_version, argv, corba_init_flags); if(a->item[argc].type != PIKE_T_STRING) { free(data); - error("Index %d in the array given as argument to setup_gtk " - "is not a string.\n", argc); + Pike_error("Index %d in the array given as argument to setup_gtk " + "is not a string.\n", argc); } data[argc] = a->item[argc].u.string->str; } @@ -227,7 +227,7 @@ NAME_ARGS(argv, do_not_parse_rc); #endif /* ! HAVE_SIGACTION */ if( pigtk_is_setup ) - error( "You should only call GTK.setup_gtk() or Gnome.init() once\n"); + Pike_error( "You should only call GTK.setup_gtk() or Gnome.init() once\n"); pigtk_is_setup = 1; if(args) @@ -241,8 +241,8 @@ NAME_ARGS(argv, do_not_parse_rc); if(a->item[argc].type != PIKE_T_STRING) { free(data); - error("Index %d in the array given as argument to setup_gtk " - "is not a string.\n", argc); + Pike_error("Index %d in the array given as argument to setup_gtk " + "is not a string.\n", argc); } data[argc] = a->item[argc].u.string->str; } @@ -297,7 +297,7 @@ NAME_ARGS(argv, do_not_parse_rc); Display *d = GDK_DISPLAY(); int fd; if(!d) { - error("Failed to get GDK display.\n"); + Pike_error("Failed to get GDK display.\n"); free(data); } fd = ConnectionNumber( d ); diff --git a/src/post_modules/GTK/source/gnomeapp.pre b/src/post_modules/GTK/source/gnomeapp.pre index 524ec59e7eead85a118c270d0bb334868e76491c..1689d0d0bdeeb277fd3d7c3e9f46710f9cb85279 100644 --- a/src/post_modules/GTK/source/gnomeapp.pre +++ b/src/post_modules/GTK/source/gnomeapp.pre @@ -259,7 +259,7 @@ NAME_ARGS(percent); RETURNS(Gnome.AppProgressKey); { if(args!=1 || Pike_sp[-1].type != PIKE_T_FLOAT ) - error("Bad argument 1 to set\n"); + Pike_error("Bad argument 1 to set\n"); gnome_app_set_progress( (GnomeAppProgressKey)THIS->obj, (gdouble)Pike_sp[-1].u.float_number ); RETURN_THIS(); diff --git a/src/post_modules/GTK/source/gnomedialog.pre b/src/post_modules/GTK/source/gnomedialog.pre index b19808540dac8519e1ca738fa20934e7a0387e5c..dd8cebe4c0534fcd1314f0755c2aa9016a1ed5ae 100644 --- a/src/post_modules/GTK/source/gnomedialog.pre +++ b/src/post_modules/GTK/source/gnomedialog.pre @@ -37,7 +37,7 @@ NAME_ARGS(title, buttons); if( Pike_sp[-args+i].type != PIKE_T_STRING ) { free( buttons ); - error( "Bad argument %d, should be string\n", i ); + Pike_error( "Bad argument %d, should be string\n", i ); } else buttons[i-1] = Pike_sp[-args+i].u.string->str; diff --git a/src/post_modules/GTK/source/gnomemessagebox.pre b/src/post_modules/GTK/source/gnomemessagebox.pre index b54d8c7efc0b5390504f5411853c742bedc85567..dd85e3ce7735c60f1bd53e434c7743ef7b658a92 100644 --- a/src/post_modules/GTK/source/gnomemessagebox.pre +++ b/src/post_modules/GTK/source/gnomemessagebox.pre @@ -39,7 +39,7 @@ NAME_ARGS(message, messagebox_type, buttons); if( Pike_sp[-args+i].type != PIKE_T_STRING ) { free( buttons ); - error( "Bad argument %d, should be string\n", i ); + Pike_error( "Bad argument %d, should be string\n", i ); } else buttons[i-2] = Pike_sp[-args+i].u.string->str; diff --git a/src/post_modules/GTK/source/gtkadjustment.pre b/src/post_modules/GTK/source/gtkadjustment.pre index 1bc6b53a967ca58cfb6112bd237743b115ef7389..e7f0e454ce3da14014682c1edf885d3e62514ea2 100644 --- a/src/post_modules/GTK/source/gtkadjustment.pre +++ b/src/post_modules/GTK/source/gtkadjustment.pre @@ -37,10 +37,10 @@ NAME_ARGS(value,lower,upper,step_increment,page_increment,page_size); else if(args == 3 ) get_all_args("Adjustment", args,"%f%f%f", &l,&u,&v); else if(args == 2 ) get_all_args("Adjustment", args,"%f%f", &l,&u); - if(THIS->obj) error("GTK.Adjustment->create() can only be called once.\n"); + if(THIS->obj) Pike_error("GTK.Adjustment->create() can only be called once.\n"); THIS->obj = GTK_OBJECT( gtk_adjustment_new( l, u, v, si, pi, ps ) ); if(!THIS->obj) - error("Failed to initiate adjustment\n"); + Pike_error("Failed to initiate adjustment\n"); pgtk__init_this_object(); my_pop_n_elems(args); push_int( 0 ); diff --git a/src/post_modules/GTK/source/gtkcalendar.pre b/src/post_modules/GTK/source/gtkcalendar.pre index 1cf4cf9870d70c5b7f3b7dcd0b056a2486f9b3fa..9896608733e894901fd81dca4170d0cd4e445d1b 100644 --- a/src/post_modules/GTK/source/gtkcalendar.pre +++ b/src/post_modules/GTK/source/gtkcalendar.pre @@ -115,10 +115,10 @@ NAME_ARGS(index,color); struct object *o; get_all_args( "set_marked_date_color", args, "%d%o", &n, &o ); if(!get_gdkobject(o, Color)) - error("Argument 2 is not a GDK.Color object\n"); + Pike_error("Argument 2 is not a GDK.Color object\n"); n--; if(n > 30 || n<0) - error("Argument 1 is not between 1 and 31, inclusive\n"); + Pike_error("Argument 1 is not between 1 and 31, inclusive\n"); GTK_CALENDAR( THIS->obj )->marked_date_color[n] = *get_gdkobject(o, Color); RETURN_THIS(); } diff --git a/src/post_modules/GTK/source/gtkclist.pre b/src/post_modules/GTK/source/gtkclist.pre index c05cf1d868a5bd7a4bbe20486324c170c1d8a099..b87cc2485b6c4840418e8d9e46948e8653ade4b3 100644 --- a/src/post_modules/GTK/source/gtkclist.pre +++ b/src/post_modules/GTK/source/gtkclist.pre @@ -459,7 +459,7 @@ NAME_ARGS(row); get_all_args("get_foreground", args, "%d", &row ); my_pop_n_elems(args); if (row < 0 || row >= clist->rows) - error("Invalid row.\n"); + Pike_error("Invalid row.\n"); clist_row = (g_list_nth (clist->row_list, row))->data; if( clist_row->fg_set ) { @@ -489,7 +489,7 @@ NAME_ARGS(row); get_all_args("get_background", args, "%d", &row ); my_pop_n_elems(args); if (row < 0 || row >= clist->rows) - error("Invalid row.\n"); + Pike_error("Invalid row.\n"); clist_row = (g_list_nth (clist->row_list, row))->data; if( clist_row->bg_set ) { diff --git a/src/post_modules/GTK/source/gtkcombo.pre b/src/post_modules/GTK/source/gtkcombo.pre index e58fab059cbacda967f3e9a4f1d8570d09363b9e..d70908e3e9e4598d5fbe6b2eca8ca5962674a450 100644 --- a/src/post_modules/GTK/source/gtkcombo.pre +++ b/src/post_modules/GTK/source/gtkcombo.pre @@ -64,7 +64,7 @@ NAME_ARGS(popdows_strings); if(a->item[i].type == PIKE_T_STRING) s = g_list_append( s, a->item[i].u.string->str ); if(!s) - error("No items in list!\n"); + Pike_error("No items in list!\n"); gtk_combo_set_popdown_strings( GTK_COMBO( THIS->obj ), s ); g_list_free( s ); diff --git a/src/post_modules/GTK/source/gtkctree.pre b/src/post_modules/GTK/source/gtkctree.pre index 04451c8079f9c3ecf5e15d417d04c8164fc4e60d..70589873b675f46590e9f8d819e7a4f1693e2989 100644 --- a/src/post_modules/GTK/source/gtkctree.pre +++ b/src/post_modules/GTK/source/gtkctree.pre @@ -73,7 +73,7 @@ RETURNS(GTK.CTreeNode); int is_leaf, expanded; if(args < 5) - error("Too few arguments to insert_node\n"); + Pike_error("Too few arguments to insert_node\n"); if(Pike_sp[-args].type == PIKE_T_OBJECT) parent = get_pgdkobject( Pike_sp[-args].u.object, pgtk_CTreeNode_program ); @@ -89,7 +89,7 @@ RETURNS(GTK.CTreeNode); int i; if (GTK_CLIST(THIS->obj)->columns != text->size) - error("Argument 3 to insert_node (text) has wrong size (columns=%d, elements=%d)\n",GTK_CLIST(THIS->obj)->columns,text->size); + Pike_error("Argument 3 to insert_node (text) has wrong size (columns=%d, elements=%d)\n",GTK_CLIST(THIS->obj)->columns,text->size); text_arr = alloca(GTK_CLIST(THIS->obj)->columns * sizeof(gchar *)); for(i=0; i<GTK_CLIST(THIS->obj)->columns; i++) diff --git a/src/post_modules/GTK/source/gtkdatabox.pre b/src/post_modules/GTK/source/gtkdatabox.pre index 6f5bfc757af11d6b2f95defaf6769a055c2733d9..8579e1d4a9a8b9eab5d357abf55e20d481b37345 100644 --- a/src/post_modules/GTK/source/gtkdatabox.pre +++ b/src/post_modules/GTK/source/gtkdatabox.pre @@ -44,13 +44,13 @@ static GtkDataboxCoord get_coord(int offset,int args) { GtkDataboxCoord c; if( args < offset+2) - error("too few arguments\n"); + Pike_error("too few arguments\n"); if( sp[-args+offset].type != T_INT ) - error("Bad argument %d\n", offset ); + Pike_error("Bad argument %d\n", offset ); else c.x = sp[-args+offset].u.integer; if( sp[-args+offset+1].type != T_INT ) - error("Bad argument %d\n", offset ); + Pike_error("Bad argument %d\n", offset ); else c.y = sp[-args+offset+1].u.integer; return c; @@ -60,13 +60,13 @@ static GtkDataboxValue get_value(int offset,int args) { GtkDataboxValue c; if( args < offset+2) - error("too few arguments\n"); + Pike_error("too few arguments\n"); if( sp[-args+offset].type != T_FLOAT ) - error("Bad argument %d\n", offset ); + Pike_error("Bad argument %d\n", offset ); else c.x = sp[-args+offset].u.float_number; if( sp[-args+offset+1].type != T_FLOAT ) - error("Bad argument %d\n", offset ); + Pike_error("Bad argument %d\n", offset ); else c.y = sp[-args+offset+1].u.float_number; return c; diff --git a/src/post_modules/GTK/source/gtkobject.pre b/src/post_modules/GTK/source/gtkobject.pre index 2431c8840b01362a8a813191180b661735005568..6441d8acf4c7ee99c224b483ed9699278a72e64d 100644 --- a/src/post_modules/GTK/source/gtkobject.pre +++ b/src/post_modules/GTK/source/gtkobject.pre @@ -96,8 +96,8 @@ NAME_ARGS(signal_name,callback_function,callback_arg); if(!signal_id) { free(b); - error("Signal \"%s\" not defined in the `%s' class ancestry\n", - a, gtk_type_name (GTK_OBJECT_TYPE(THIS->obj))); + Pike_error("Signal \"%s\" not defined in the `%s' class ancestry\n", + a, gtk_type_name (GTK_OBJECT_TYPE(THIS->obj))); } id = gtk_signal_connect_full(THIS->obj, a, 0, (void *)pgtk_signal_func_wrapper, b, diff --git a/src/post_modules/GTK/source/gtkpixmap.pre b/src/post_modules/GTK/source/gtkpixmap.pre index bb6279f12415e0b535b9da225ae10e008ab30112..031932c67b177aa8ff44defdeb90edf3fc2b615d 100644 --- a/src/post_modules/GTK/source/gtkpixmap.pre +++ b/src/post_modules/GTK/source/gtkpixmap.pre @@ -77,7 +77,7 @@ RETURNS(GTK.Pixmap); struct object *o; get_all_args( "set_pixmap_insensitive", args, "%o", &o ); if(!get_gdkobject( o, Pixmap )) - error("This is not a GDK.Pixmap\n"); + Pike_error("This is not a GDK.Pixmap\n"); if( GTK_PIXMAP( THIS->obj )->pixmap_insensitive != get_gdkobject( o, Pixmap ) ) { diff --git a/src/post_modules/GTK/source/gtksocket.pre b/src/post_modules/GTK/source/gtksocket.pre index 59562468f90b75b25253f2c3e7c3690f33a2da04..c83c87c7dc5848caf9c0c70054662f1adfa233ea 100644 --- a/src/post_modules/GTK/source/gtksocket.pre +++ b/src/post_modules/GTK/source/gtksocket.pre @@ -34,7 +34,7 @@ FUNCTION(id, "function(void:int)"); // <br />You must realize this widget before calling this function. { if( !GTK_WIDGET( THIS->obj )->window ) - error("You must realize this widget before calling this function.\n"); + Pike_error("You must realize this widget before calling this function.\n"); my_pop_n_elems( args ); push_int((INT_TYPE)GDK_WINDOW_XWINDOW( GTK_WIDGET( THIS->obj )->window )); } diff --git a/src/post_modules/GTK/source/gtkwidget.pre b/src/post_modules/GTK/source/gtkwidget.pre index e44c9fdc5c96cb261a758ddc6370e50901670c96..d8092bce2ce47172caeb05f7f242bcbd832f467e 100644 --- a/src/post_modules/GTK/source/gtkwidget.pre +++ b/src/post_modules/GTK/source/gtkwidget.pre @@ -135,7 +135,7 @@ NAME_ARGS(text); #define TWIN (GTK_WIDGET(THIS->obj)->window) -#define GC(X) ((GdkGC*)get_gdkobject(X,GC)) +#define _GC(X) ((GdkGC*)get_gdkobject(X,GC)) FUNCTION(set_background, "function(object:object)"); NAME_ARGS(background); @@ -174,7 +174,7 @@ NAME_ARGS(gc,xdest,ydest,source,xsource,ysource,width,height); else win = GTK_WIDGET( get_gtkobject( source ) )->window; - gdk_window_copy_area( TWIN, GC(gc), xd, yd, win, xs, ys, w, h); + gdk_window_copy_area( TWIN, _GC(gc), xd, yd, win, xs, ys, w, h); RETURN_THIS(); } @@ -409,7 +409,7 @@ NAME_ARGS(cursor_type, fg, bg); get_all_args("set_cursor", args, "%d", &i); if(i>255) - error("No such cursor\n"); + Pike_error("No such cursor\n"); if( i >= 0 ) c = gdk_cursor_new( i ); else @@ -695,7 +695,6 @@ RETURNS(GTK.Widget); GtkTargetEntry *entries = NULL; get_all_args( "drag_dest_set", args, "%d%a%d", &i, &a, &f ); if(a->size) -// error("You must accept at least one target type\n"); entries = malloc(sizeof(GtkTargetEntry)*a->size); for(j=0; j<a->size; j++) @@ -708,7 +707,7 @@ RETURNS(GTK.Widget); a->item[j].u.array->item[2].type != PIKE_T_INT) { free(entries); - error("The array is malformed.\n"); + Pike_error("The array is malformed.\n"); } entries[j].target = a->item[j].u.array->item[0].u.string->str; entries[j].flags = a->item[j].u.array->item[1].u.integer; @@ -738,7 +737,6 @@ RETURNS(GTK.Widget); get_all_args( "drag_source_set", args, "%d%a%d", &i, &a, &f ); if(a->size) -// error("You must provide at least one target type\n"); entries = malloc(sizeof(GtkTargetEntry)*a->size); for(j=0; j<a->size; j++) @@ -751,7 +749,7 @@ RETURNS(GTK.Widget); a->item[j].u.array->item[2].type != PIKE_T_INT) { free(entries); - error("The array is malformed.\n"); + Pike_error("The array is malformed.\n"); } entries[j].target = a->item[j].u.array->item[0].u.string->str; entries[j].flags = a->item[j].u.array->item[1].u.integer; diff --git a/src/post_modules/GTK/source/support.c b/src/post_modules/GTK/source/support.c index 44bf4e5b4165e1e7463df6251045ecab33391ee9..8ab22b8f35dfd73794b806ef90f8cf6890921380 100644 --- a/src/post_modules/GTK/source/support.c +++ b/src/post_modules/GTK/source/support.c @@ -59,7 +59,7 @@ void pgtk_index_stack( char *what ) f_index(2); #ifdef DEBUG if (Pike_sp[-1].type==PIKE_T_INT) - Pike_error("Internal indexing Pike_error.\n"); + Pike_error("Internal indexing error.\n"); #endif } diff --git a/src/preprocessor.h b/src/preprocessor.h index 801539f6fd95e095a9a1c3b8aad14889fc603464..2091f4ef39fd20aaa184274a828e86c9da8297a1 100644 --- a/src/preprocessor.h +++ b/src/preprocessor.h @@ -1,5 +1,5 @@ /* - * $Id: preprocessor.h,v 1.35 2000/12/01 08:09:53 hubbe Exp $ + * $Id: preprocessor.h,v 1.36 2000/12/05 21:08:21 per Exp $ * * Preprocessor template. * Based on cpp.c 1.45 @@ -8,7 +8,7 @@ */ #ifndef SHIFT -#Pike_error Internal Pike_error: SHIFT not defined +#error Internal error: SHIFT not defined #endif /* @@ -120,7 +120,7 @@ static struct pike_string *WC_BINARY_FINDSTRING(WCHAR *str, ptrdiff_t len) #if (SHIFT == 2) s = make_shared_binary_string2(str, len); #else /* SHIFT != 2 */ -#Pike_error Bad SHIFT +#error Bad SHIFT #endif /* SHIFT == 2 */ #endif /* SHIFT == 1 */ @@ -380,10 +380,10 @@ static ptrdiff_t calcC(struct cpp *this, WCHAR *data, ptrdiff_t len, fprintf(stderr, "Bad char %c (%d)\n", data[pos], data[pos]); #ifdef PIKE_DEBUG if(WC_ISIDCHAR(data[pos])) - cpp_error(this, "Syntax Pike_error in #if (should not happen)."); + cpp_error(this, "Syntax error in #if (should not happen)."); #endif - cpp_error(this, "Syntax Pike_error in #if."); + cpp_error(this, "Syntax error in #if."); } @@ -755,10 +755,10 @@ static ptrdiff_t calc(struct cpp *this, WCHAR *data, ptrdiff_t len, { cpp_error(this, a->string->str); }else{ - cpp_error(this, "Nonstandard Pike_error format."); + cpp_error(this, "Nonstandard error format."); } }else{ - cpp_error(this, "Nonstandard Pike_error format."); + cpp_error(this, "Nonstandard error format."); } FIND_EOL(); push_int(0); @@ -1523,7 +1523,7 @@ static ptrdiff_t lower_cpp(struct cpp *this, goto unknown_preprocessor_directive; } - case 'e': /* endif, else, elif, Pike_error */ + case 'e': /* endif, else, elif, error */ { static WCHAR endif_[] = { 'e', 'n', 'd', 'i', 'f' }; static WCHAR else_[] = { 'e', 'l', 's', 'e' }; @@ -1763,7 +1763,7 @@ static ptrdiff_t lower_cpp(struct cpp *this, { #ifdef PIKE_DEBUG if(Pike_sp[-1].type != PIKE_T_INT) - fatal("Internal Pike_error in CPP\n"); + fatal("Internal error in CPP\n"); #endif Pike_sp[-1].u.integer|=DEF_ARG_NOPOSTSPACE; } @@ -1864,12 +1864,12 @@ static ptrdiff_t lower_cpp(struct cpp *this, for(e=0;e<def->num_parts;e++) { -#if 1 +#ifdef PIKE_DEBUG if(partbase[e*2+1].type != PIKE_T_INT) - fatal("Cpp internal Pike_error, expected integer!\n"); + fatal("Cpp internal error, expected integer!\n"); if(partbase[e*2+2].type != PIKE_T_STRING) - fatal("Cpp internal Pike_error, expected string!\n"); + fatal("Cpp internal error, expected string!\n"); #endif def->parts[e].argument=partbase[e*2+1].u.integer; copy_shared_string(def->parts[e].postfix, @@ -1879,7 +1879,7 @@ static ptrdiff_t lower_cpp(struct cpp *this, #ifdef PIKE_DEBUG if(def->num_parts==1 && (def->parts[0].argument & DEF_ARG_MASK) > MAX_ARGS) - fatal("Internal Pike_error in define\n"); + fatal("Internal error in define\n"); #endif this->defines=hash_insert(this->defines, & def->link); diff --git a/src/program.c b/src/program.c index c808120bd99a6277e2c70979707d7782518c3afd..d2ba35149e0835b637c27413d908420d5223d9f2 100644 --- a/src/program.c +++ b/src/program.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: program.c,v 1.285 2000/12/02 01:36:51 hubbe Exp $"); +RCSID("$Id: program.c,v 1.286 2000/12/05 21:08:21 per Exp $"); #include "program.h" #include "object.h" #include "dynamic_buffer.h" @@ -2110,7 +2110,7 @@ int low_define_variable(struct pike_string *name, fatal("Attempting to add variable to fixed program\n"); if(Pike_compiler->compiler_pass==2) - fatal("Internal Pike_error: Not allowed to add more identifiers during second compiler pass.\n" + fatal("Internal error: Not allowed to add more identifiers during second compiler pass.\n" "Added identifier: \"%s\"\n", name->str); #endif @@ -2399,7 +2399,7 @@ PMOD_EXPORT int add_constant(struct pike_string *name, fatal("Attempting to add constant to fixed program\n"); if(Pike_compiler->compiler_pass==2) - fatal("Internal Pike_error: Not allowed to add more identifiers during second compiler pass.\n"); + fatal("Internal error: Not allowed to add more identifiers during second compiler pass.\n"); #endif copy_shared_string(dummy.name, name); @@ -2763,7 +2763,7 @@ make_a_new_def: #ifdef PIKE_DEBUG if(Pike_compiler->compiler_pass==2) - fatal("Internal Pike_error: Not allowed to add more identifiers during second compiler pass.\n"); + fatal("Internal error: Not allowed to add more identifiers during second compiler pass.\n"); #endif /* define a new function */ @@ -3293,7 +3293,7 @@ void my_yyerror(char *fmt,...) ATTRIBUTE((format(printf,1,2))) } struct program *compile(struct pike_string *prog, - struct object *handler,/* Pike_error handler */ + struct object *handler,/* error handler */ int major, int minor) { #ifdef PIKE_DEBUG @@ -3580,7 +3580,7 @@ struct program *pike_trampoline_program=0; static void apply_trampoline(INT32 args) { - Pike_error("Internal Pike_error: Trampoline magic failed!\n"); + Pike_error("Internal error: Trampoline magic failed!\n"); } static void init_trampoline(struct object *o) @@ -4177,7 +4177,7 @@ void yywarning(char *fmt, ...) ATTRIBUTE((format(printf,1,2))) /* If we have parse errors we might get erroneous warnings, * so don't print them. * This has the additional benefit of making it easier to - * visually locate the actual Pike_error message. + * visually locate the actual error message. */ if (Pike_compiler->num_parse_error) return; diff --git a/src/signal_handler.c b/src/signal_handler.c index ac137d627c327b369e82347d1546c525390f7c00..23adf986bc61a317dc9419415e733e105b1de079 100644 --- a/src/signal_handler.c +++ b/src/signal_handler.c @@ -25,7 +25,7 @@ #include "main.h" #include <signal.h> -RCSID("$Id: signal_handler.c,v 1.185 2000/12/01 08:09:54 hubbe Exp $"); +RCSID("$Id: signal_handler.c,v 1.186 2000/12/05 21:08:22 per Exp $"); #ifdef HAVE_PASSWD_H # include <passwd.h> @@ -1102,7 +1102,7 @@ static TH_RETURN_TYPE wait_thread(void *data) break; default: - fprintf(stderr,"Wait thread: waitpid returned Pike_error: %d\n",errno); + fprintf(stderr,"Wait thread: waitpid returned error: %d\n",errno); } } } @@ -2507,7 +2507,7 @@ void f_create_process(INT32 args) #ifdef USE_SIGCHILD - /* FIXME: Can anything of the following throw an Pike_error? */ + /* FIXME: Can anything of the following throw an error? */ if(!signal_evaluator_callback) { signal_evaluator_callback=add_to_callback(&evaluator_callbacks, @@ -2545,7 +2545,7 @@ void f_create_process(INT32 args) while(close(control_pipe[0]) < 0 && errno==EINTR); gnapp=1; } else { - /* Wait for exec or Pike_error */ + /* Wait for exec or error */ while (((e = read(control_pipe[0], buf, 3)) < 0) && (errno == EINTR)) ; /* Paranoia in case close() sets errno. */ @@ -2569,7 +2569,7 @@ void f_create_process(INT32 args) e ,olderrno); } - /* Wait for exec or Pike_error */ + /* Wait for exec or error */ while (((e = read(control_pipe[0], buf, 3)) < 0) && (errno == EINTR)) ; /* Paranoia in case close() sets errno. */ @@ -2796,7 +2796,7 @@ void f_create_process(INT32 args) if (setsid_request) if (setsid()==-1) PROCERROR(PROCE_SETSID,0); -/* fixme: else... what? Pike_error or ignore? */ +/* fixme: else... what? error or ignore? */ #endif #ifdef HAVE_SETGID diff --git a/src/smartlink.c b/src/smartlink.c index b67f4fd5165894b9f759e687981431571e963e92..b79fe29bbdd071d6f8713ac69f1aad895b77e2cf 100644 --- a/src/smartlink.c +++ b/src/smartlink.c @@ -1,5 +1,5 @@ /* - * $Id: smartlink.c,v 1.11 2000/12/01 08:09:55 hubbe Exp $ + * $Id: smartlink.c,v 1.12 2000/12/05 21:08:22 per Exp $ * * smartlink - A smarter linker. * Based on the /bin/sh script smartlink 1.23. @@ -87,7 +87,7 @@ int main(int argc, char **argv) if (!strcmp(argv[1], "-v")) { fprintf(stdout, - "$Id: smartlink.c,v 1.11 2000/12/01 08:09:55 hubbe Exp $\n" + "$Id: smartlink.c,v 1.12 2000/12/05 21:08:22 per Exp $\n" "Usage:\n" "\t%s binary [args]\n", argv[0]); @@ -295,7 +295,7 @@ int main(int argc, char **argv) fatal("Out of memory (7)!"); } #else -#Pike_error Unknown method +#error Unknown method #endif } diff --git a/src/stralloc.c b/src/stralloc.c index fa3ba5092c773e4d4c6de84ff75f570f57e68e79..11ce2d92bd07da7fb073f67c1b0a9ce0dc96a417 100644 --- a/src/stralloc.c +++ b/src/stralloc.c @@ -26,7 +26,7 @@ #define HUGE HUGE_VAL #endif /*!HUGE*/ -RCSID("$Id: stralloc.c,v 1.111 2000/12/01 20:36:41 grubba Exp $"); +RCSID("$Id: stralloc.c,v 1.112 2000/12/05 21:08:22 per Exp $"); #define BEGIN_HASH_SIZE 997 #define MAX_AVG_LINK_LENGTH 3 @@ -2347,12 +2347,12 @@ PMOD_EXPORT double STRTOD_PCHARP(PCHARP nptr, PCHARP *endptr) return num * sign; overflow: - /* Return an overflow Pike_error. */ + /* Return an overflow error. */ errno = ERANGE; return HUGE * sign; underflow: - /* Return an underflow Pike_error. */ + /* Return an underflow error. */ if (endptr != NULL) *endptr = nptr; errno = ERANGE; diff --git a/src/svalue.h b/src/svalue.h index c54e22f56cbb39a276a80a4a54cacfae3b164286..4b614b2be2f0f4ede33e71070ae40321f9f26a7f 100644 --- a/src/svalue.h +++ b/src/svalue.h @@ -5,7 +5,7 @@ \*/ /* - * $Id: svalue.h,v 1.71 2000/12/01 08:09:55 hubbe Exp $ + * $Id: svalue.h,v 1.72 2000/12/05 21:08:22 per Exp $ */ #ifndef SVALUE_H #define SVALUE_H @@ -263,7 +263,7 @@ do{ \ #ifdef PIKE_DEBUG extern void describe(void *); /* defined in gc.c */ -#define check_type(T) if(T > MAX_TYPE && T!=T_LVALUE && T!=T_SHORT_LVALUE && T!=T_VOID && T!=T_DELETED && T!=T_ARRAY_LVALUE) fatal("Type Pike_error: %d\n",T) +#define check_type(T) if(T > MAX_TYPE && T!=T_LVALUE && T!=T_SHORT_LVALUE && T!=T_VOID && T!=T_DELETED && T!=T_ARRAY_LVALUE) fatal("Type error: %d\n",T) #define check_svalue(S) debug_check_svalue(dmalloc_check_svalue(S,DMALLOC_LOCATION())) diff --git a/src/threads.c b/src/threads.c index dc052e9bd7c2e6815088fcb7c3845a9027a68b2d..c51deb3c171089f3b5cdad196e9849aebe817737 100644 --- a/src/threads.c +++ b/src/threads.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: threads.c,v 1.148 2000/12/01 12:39:46 mast Exp $"); +RCSID("$Id: threads.c,v 1.149 2000/12/05 21:08:23 per Exp $"); PMOD_EXPORT int num_threads = 1; PMOD_EXPORT int threads_disabled = 0; @@ -1297,7 +1297,7 @@ PMOD_EXPORT void th_farm(void (*fun)(void *), void *here) void low_th_init(void) { #ifdef SGI_SPROC_THREADS -#Pike_error /* Need to specify a filename */ +#error /* Need to specify a filename */ us_cookie = usinit(""); #endif /* SGI_SPROC_THREADS */ diff --git a/src/threads.h b/src/threads.h index 57a0d873efd0b06392199bb5eae952506d0a3985..d8f651f1dabf8e9bd11b7caa420b67078918266c 100644 --- a/src/threads.h +++ b/src/threads.h @@ -1,5 +1,5 @@ /* - * $Id: threads.h,v 1.107 2000/12/01 08:09:56 hubbe Exp $ + * $Id: threads.h,v 1.108 2000/12/05 21:08:23 per Exp $ */ #ifndef THREADS_H #define THREADS_H @@ -167,7 +167,7 @@ extern pthread_attr_t small_pattr; #define co_broadcast(X) pthread_cond_broadcast(X) #define co_destroy(X) pthread_cond_destroy(X) #else -#Pike_error No way to make cond-vars +#error No way to make cond-vars #endif /* HAVE_PTHREAD_COND_INIT */ #endif /* POSIX_THREADS */ @@ -538,7 +538,7 @@ extern int Pike_in_gc; thread_for_id(th_self()),Pike_interpreter.thread_id); \ } \ if ((Pike_in_gc > 50) && (Pike_in_gc < 300)) { \ - fprintf(stderr, __FILE__ ":" DEFINETOSTR(__LINE__) ": Fatal Pike_error:\n"); \ + fprintf(stderr, __FILE__ ":" DEFINETOSTR(__LINE__) ": Fatal error:\n"); \ debug_fatal("Threads allowed during garbage collection (%d).\n", \ Pike_in_gc); \ } \