diff --git a/.cvsignore b/.cvsignore index 95de48357304a1134c1f030cc1138e9f3692a03b..4888270d041104f688d683986188bb1e6e7776d7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -Pike-*.tar.gz +Pike-v* alpha alpha-gcc alpha-no-debug diff --git a/.gitignore b/.gitignore index 0e6b496a28e596a9dc5f30555651a574f4cce4f0..062f77203dff6eebd2f60a2ea34d00342523229c 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ _$* *.elc *.ln core -/Pike-*.tar.gz +/Pike-v* /alpha /alpha-gcc /alpha-no-debug diff --git a/NT/init_nt b/NT/init_nt index 24e0d5d55cac7c821ea5a5bcb8b978143bff80a7..bb9096d97d9a23059d4a3d32a03a106479425a38 100755 --- a/NT/init_nt +++ b/NT/init_nt @@ -4,8 +4,11 @@ REMOTE_METHOD=sprsh # Edit -NTHOST=10.0.4.10 -NTDRIVE='j:' +#NTHOST=10.0.4.10 +#NTDRIVE='j:' + +NTHOST=localhost +NTDRIVE='d:' # What dir on the UNIX machine is on $NTDRIVE ? # This variable MUST NOT end with a slash. diff --git a/NT/tools/lib.pike b/NT/tools/lib.pike index cdfc3fe89df5c40c9e4a60c183c18a5caa778922..d626368131396ade89a3973598cdd315e5dd0245 100644 --- a/NT/tools/lib.pike +++ b/NT/tools/lib.pike @@ -37,10 +37,14 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent) #endif { object o=f->pipe(Stdio.PROP_BIDIRECTIONAL | Stdio.PROP_IPC); - object proc=Process.create_process(({"wine", + cmd=({"wine", + "-winver","win95", "-debugmsg","fixme-all", - cmd*" "}), - (["stdout":o])); + "-debugmsg","trace+all", + "-debugmsg","+relay", + cmd*" "}); +// werror("WINE %O\n",cmd); + object proc=Process.create_process(cmd,(["stdout":o])); destruct(o); while(1) { diff --git a/NT/tools/rntcc b/NT/tools/rntcc index 76c5987c944b270042f7234da84b6da43583b6e8..89a5348952e6c2b417ce8cfe1eeb6b936a988cc0 100755 --- a/NT/tools/rntcc +++ b/NT/tools/rntcc @@ -105,7 +105,7 @@ int main(int argc, string *argv) ({"link",Getopt.HAS_ARG, ({"-l"}) }), ({"share",Getopt.MAY_HAVE_ARG, ({"-s"}) }), ({"ignore",Getopt.MAY_HAVE_ARG, ({"-t"}) }), - ({"ignore",Getopt.HAS_ARG, ({"-R","-L"}) }), + ({"ignore",Getopt.HAS_ARG, ({"-R","-L","-r"}) }), ({"warn",Getopt.MAY_HAVE_ARG, ({"-W"}) }), ({"define",Getopt.HAS_ARG, ({"-D"}) }), ({"undefine",Getopt.HAS_ARG, ({"-U"})}), diff --git a/NT/tools/sprshd b/NT/tools/sprshd index 9d9c500368e7c3ee87c8104d6b0ebf27e3be2171..7b02963d1709e6e4103da7a5e2234a51dc239d0d 100755 --- a/NT/tools/sprshd +++ b/NT/tools/sprshd @@ -2,6 +2,10 @@ inherit Stdio.Port; +#if !constant(Stdio.PROP_IPC) +#define NO_IPC +#endif + // Bugfix for some older versions of Pike.. string combine_path(string s, string ... rest) { @@ -69,6 +73,16 @@ void monitor(object(Stdio.File) io, object proc) } } +#ifdef WINE +void my_proxy(Stdio.File from, Stdio.File to) +{ + while(string s=from->read(128,1)) + if(to->write(s)!=strlen(s)) + return; + +} +#endif + void handle_incoming_connection(object(Stdio.File) io) { object p; @@ -81,10 +95,10 @@ void handle_incoming_connection(object(Stdio.File) io) } object pi=Stdio.File(); -#if constant(Stdio.PROP_IPC) - object p2=pi->pipe(Stdio.PROP_IPC); -#else +#ifdef NO_IPC object p2=pi->pipe(); +#else + object p2=pi->pipe(Stdio.PROP_IPC); #endif string dir=cmd[0]; cmd=cmd[1..]; @@ -144,19 +158,35 @@ void handle_incoming_connection(object(Stdio.File) io) } default: +#ifdef WINE + { + werror("Proxying.....\n"); + object p3=Stdio.File(); +#ifdef NO_IPC + object p4=p3->pipe(); +#else + object p4=p3->pipe(Stdio.PROP_IPC); +#endif + thread_create(my_proxy,io,p4); + io=p3; + } +#endif + mixed err=catch { p=Process.create_process(cmd, ([ +#ifndef WINE "stdin":io, "stdout":p2, "stderr":p2, +#endif "cwd":dir, ])); }; destruct(p2); if(!err) { -#if !constant(Stdio.PROP_IPC) +#ifdef NO_IPC thread_create(monitor,p2,p); #endif while(1) @@ -169,6 +199,7 @@ void handle_incoming_connection(object(Stdio.File) io) io->write(sprintf("%4c",0)); io->write(sprintf("%4c",p->wait())); }else{ + werror(master()->describe_backtrace(err)); destruct(p2); io->write(sprintf("%4c",0)); io->write(sprintf("%4c",69)); @@ -178,8 +209,30 @@ void handle_incoming_connection(object(Stdio.File) io) destruct(io); } +void handle_connections(string *hosts) +{ + while(1) + { + if(object io=accept()) + { + sscanf(io->query_address(),"%s ",string ip); + if(search(hosts, ip)==-1) + { + destruct(io); + continue; + } + thread_create(handle_incoming_connection,io); + }else{ + werror("Accept failed "+errno()+"\n"); + } + } +} + int main(int argc, string *argv) { +#ifdef WINE + werror("Running in WINE mode.\n"); +#endif if(argc<2) { werror("Usage: sprshd <port> <hosts to accept connections from>\n"); @@ -209,19 +262,13 @@ int main(int argc, string *argv) } write("Ready ("+version()+").\n"); - while(1) - { - if(object io=accept()) - { - sscanf(io->query_address(),"%s ",string ip); - if(search(hosts, ip)==-1) - { - destruct(io); - continue; - } - thread_create(handle_incoming_connection,io); - }else{ - werror("Accept failed "+errno()+"\n"); - } - } + +#ifdef WINE + thread_create(handle_connections,hosts); + werror("main returning...\n"); + return -1; +#else + handle_connection(hosts); + return 0; +#endif } diff --git a/src/configure.in b/src/configure.in index 5cc973986b479f696981000f3bf7fef5ccfe2fc9..a6d05177cd45e208da63791194971e2cb5c0ea97 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1,4 +1,4 @@ -AC_REVISION("$Id: configure.in,v 1.257 1998/12/20 09:22:06 hubbe Exp $") +AC_REVISION("$Id: configure.in,v 1.258 1999/01/01 01:03:29 hubbe Exp $") AC_INIT(interpret.c) AC_CONFIG_HEADER(machine.h) @@ -1517,33 +1517,33 @@ fi OLD_LIBOBJS="${LIBOBJS}" ######################################################################## -AC_MSG_CHECKING(stack direction) -AC_CACHE_VAL(pike_cv_hardware_stack_direction, -[ -AC_TRY_RUN([ -static int find_stack_direction(void *foo) -{ - if(!foo) { - return find_stack_direction((void *)&foo); - } - if (((void *)&foo) > foo) { - return 1; - } else { - return -1; - } -} - -int main() { exit( find_stack_direction(0) + 1); } -],pike_cv_hardware_stack_direction=down,pike_cv_hardware_stack_direction=up) -]) - -AC_MSG_RESULT($pike_cv_hardware_stack_direction) -if test "x$pike_cv_hardware_stack_direction" = "xup" ; then - AC_DEFINE(STACK_DIRECTION, 1) -else - AC_DEFINE(STACK_DIRECTION, -1) -fi - +dnl AC_MSG_CHECKING(stack direction) +dnl AC_CACHE_VAL(pike_cv_hardware_stack_direction, +dnl [ +dnl AC_TRY_RUN([ +dnl static int find_stack_direction(void *foo) +dnl { +dnl if(!foo) { +dnl return find_stack_direction((void *)&foo); +dnl } +dnl if (((void *)&foo) > foo) { +dnl return 1; +dnl } else { +dnl return -1; +dnl } +dnl } +dnl +dnl int main() { exit( find_stack_direction(0) + 1); } +dnl ],pike_cv_hardware_stack_direction=down,pike_cv_hardware_stack_direction=up) +dnl ]) +dnl +dnl AC_MSG_RESULT($pike_cv_hardware_stack_direction) +dnl if test "x$pike_cv_hardware_stack_direction" = "xup" ; then +dnl AC_DEFINE(STACK_DIRECTION, 1) +dnl else +dnl AC_DEFINE(STACK_DIRECTION, -1) +dnl fi +dnl ######################################################################## AC_MSG_CHECKING(byteorder) diff --git a/src/fdlib.c b/src/fdlib.c index 5f0c1f9bb803a9c7edcdee2567e8983676f56b15..5f310ee211e8a621386dcccd77a2c481811d5efd 100644 --- a/src/fdlib.c +++ b/src/fdlib.c @@ -3,7 +3,7 @@ #include "error.h" #include <math.h> -RCSID("$Id: fdlib.c,v 1.22 1998/07/16 19:12:11 hubbe Exp $"); +RCSID("$Id: fdlib.c,v 1.23 1999/01/01 01:03:30 hubbe Exp $"); #ifdef HAVE_WINSOCK_H @@ -219,6 +219,8 @@ int fd_pipe(int fds[2]) return -1; } + FDDEBUG(fprintf(stderr,"ReadHANDLE=%d WriteHANDLE=%d\n",files[0],files[1])); + SetHandleInformation(files[0],HANDLE_FLAG_INHERIT|HANDLE_FLAG_PROTECT_FROM_CLOSE,0); SetHandleInformation(files[1],HANDLE_FLAG_INHERIT|HANDLE_FLAG_PROTECT_FROM_CLOSE,0); mt_lock(&fd_mutex); @@ -659,6 +661,10 @@ FD fd_dup(FD from) { FD fd; HANDLE x,p=GetCurrentProcess(); +#ifdef DEBUG + if(fd_type[from]>=FD_NO_MORE_FREE) + fatal("fd_dup() on file which is not open!\n"); +#endif if(!DuplicateHandle(p,(HANDLE)da_handle[from],p,&x,NULL,0,DUPLICATE_SAME_ACCESS)) { errno=GetLastError(); diff --git a/src/modules/Perl/configure.in b/src/modules/Perl/configure.in index 080c2e072116b2833313e9ce8521d66817516801..0bf5621187588dc1d3e11d741699d95173ce2815 100644 --- a/src/modules/Perl/configure.in +++ b/src/modules/Perl/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.3 1998/12/21 23:18:04 hubbe Exp $ +# $Id: configure.in,v 1.4 1999/01/01 01:03:31 hubbe Exp $ AC_INIT(perlmod.c) AC_CONFIG_HEADER(perl_machine.h) @@ -61,6 +61,8 @@ if test "x$pike_cv_perlmod_have_perl" = xyes ; then AC_DEFINE(HAVE_PERL) AC_MSG_RESULT(yes) else + PERL_LDFLAGS='' + PERL_CCFLAGS='' AC_MSG_RESULT(no) fi diff --git a/src/modules/files/efuns.c b/src/modules/files/efuns.c index 9e0d027e9978a30d9a61cc898f0cc442e8492b41..f63cd0daa26a73f4c9500f903faf7d6fb87002c4 100644 --- a/src/modules/files/efuns.c +++ b/src/modules/files/efuns.c @@ -22,7 +22,7 @@ #include "file_machine.h" #include "file.h" -RCSID("$Id: efuns.c,v 1.61 1998/10/30 14:36:31 grubba Exp $"); +RCSID("$Id: efuns.c,v 1.62 1999/01/01 01:03:33 hubbe Exp $"); #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -443,6 +443,13 @@ void f_mkdir(INT32 args) i = mkdir(s, mode) != -1; THREADS_DISALLOW_UID(); #else + +#ifdef HAVE_LSTAT +#define LSTAT lstat +#else +#define LSTAT stat +#endif + /* Most OS's should have MKDIR_ARGS == 2 nowadays fortunately. */ i = mkdir(s) != -1; if (i) { @@ -454,7 +461,7 @@ void f_mkdir(INT32 args) struct stat statbuf2; int mask = umask(0); umask(mask); - i = lstat(s, &statbuf1) != -1; + i = LSTAT(s, &statbuf1) != -1; if (i) { i = ((statbuf1.st_mode & S_IFMT) == S_IFDIR); } @@ -463,7 +470,7 @@ void f_mkdir(INT32 args) i = chmod(s, mode) != -1; } if (i) { - i = lstat(s, &statbuf2) != -1; + i = LSTAT(s, &statbuf2) != -1; } if (i) { i = (statbuf2.st_mode == mode) && (statbuf1.st_ino == statbuf2.st_ino); diff --git a/src/modules/files/file.c b/src/modules/files/file.c index bff2e6d8e4fa9d8ad66e8ad50a00eec6f111e098..3f4d44da8de514338151bfcd4354b62cb6e54b28 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -5,7 +5,7 @@ \*/ #include "global.h" -RCSID("$Id: file.c,v 1.131 1998/12/17 02:06:46 mirar Exp $"); +RCSID("$Id: file.c,v 1.132 1999/01/01 01:03:34 hubbe Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -1440,7 +1440,7 @@ retry_connect: retries++; if(fd_connect(sv[1], (struct sockaddr *)&my_addr, sizeof(addr)) < 0) { - fprintf(stderr,"errno=%d (%d)\n",errno,EWOULDBLOCK); +/* fprintf(stderr,"errno=%d (%d)\n",errno,EWOULDBLOCK); */ if(errno != EWOULDBLOCK) { int tmp2; @@ -2060,7 +2060,7 @@ void file_proxy(INT32 args) if(from<0) { ERRNO=errno; - error("Failed to dup proxy fd.\n"); + error("Failed to dup proxy fd. (errno=%d)\n",errno); } to=fd_dup(FD); if(from<0) @@ -2092,6 +2092,8 @@ void create_proxy_pipe(struct object *o, int for_reading) push_object(n=clone_object(file_program,0)); push_int(fd_INTERPROCESSABLE); apply(n,"pipe",1); + if(sp[-1].type!=T_OBJECT) + error("Failed to create proxy pipe (errno=%d)!\n",get_file_storage(n)->my_errno); n2=sp[-1].u.object; /* Stack is now: pipe(read), pipe(write) */ if(for_reading) diff --git a/src/modules/spider/xml.c b/src/modules/spider/xml.c index 34a2608a1b46afb4baf8be5bade1a6118afe0d67..ce7b910a36c3c70c73069b915800c7c0106cbd10 100644 --- a/src/modules/spider/xml.c +++ b/src/modules/spider/xml.c @@ -38,6 +38,7 @@ struct xmlobj struct mapping *is_cdata; }; +#undef THIS #define THIS ((struct xmlobj *)(fp->current_storage)) @@ -640,7 +641,7 @@ static int low_parse_xml(struct xmldata *data, struct pike_string *end, int toplevel); -#define ERROR(desc) do { \ +#define XMLERROR(desc) do { \ struct svalue * save_sp=sp; \ push_text("error"); \ push_int(0); /* no name */ \ @@ -678,7 +679,7 @@ static int gobble(struct xmldata *data, char *s) POKE(X, PEEK(0)); \ READ(1); \ }else{ \ - ERROR("Name expected"); \ + XMLERROR("Name expected"); \ } \ while(isNameChar(PEEK(0))) \ { \ @@ -693,7 +694,7 @@ static int gobble(struct xmldata *data, char *s) POKE(X, PEEK(0)); \ READ(1); \ }else{ \ - ERROR("Nametoken expected"); \ + XMLERROR("Nametoken expected"); \ } \ while(isNameChar(PEEK(0))) \ { \ @@ -762,7 +763,7 @@ static int gobble(struct xmldata *data, char *s) } \ } \ if(PEEK(0)!=';') \ - ERROR("Missing ';' after character reference."); \ + XMLERROR("Missing ';' after character reference."); \ READ(1); \ POKE(X, num); \ }while(0) @@ -778,7 +779,7 @@ static int gobble(struct xmldata *data, char *s) /* Entity reference */ \ if(!THIS->entities) \ { \ - ERROR("XML->__entities is not a mapping"); \ + XMLERROR("XML->__entities is not a mapping"); \ f_aggregate_mapping(0); \ }else{ \ ref_push_mapping(THIS->entities); \ @@ -786,19 +787,19 @@ static int gobble(struct xmldata *data, char *s) SIMPLE_READNAME(); \ IF_XMLDEBUG(fprintf(stderr,"Found entity: %s\n",sp[-1].u.string->str)); \ if(PEEK(0)!=';') \ - ERROR("Missing ';' after entity reference."); \ + XMLERROR("Missing ';' after entity reference."); \ READ(1); \ /* lookup entry in mapping and parse it recursively */ \ /* Generate error if entity is not defined */ \ f_index(2); \ if(IS_ZERO(sp-1)) \ { \ - ERROR("No such entity."); \ + XMLERROR("No such entity."); \ pop_stack(); \ }else{ \ if(sp[-1].type!=T_STRING) \ { \ - ERROR("XML->__entities value is not a string!"); \ + XMLERROR("XML->__entities value is not a string!"); \ }else{ \ struct pike_string *s=sp[-1].u.string; \ struct xmldata my_tmp=*data; \ @@ -823,7 +824,7 @@ static int gobble(struct xmldata *data, char *s) READ(1); /* Assume '%' */ \ if(!THIS->entities) \ { \ - ERROR("XML->__entities is not a mapping"); \ + XMLERROR("XML->__entities is not a mapping"); \ f_aggregate_mapping(0); \ }else{ \ ref_push_mapping(THIS->entities); \ @@ -832,19 +833,19 @@ static int gobble(struct xmldata *data, char *s) SIMPLE_READNAME(); \ f_add(2); \ if(PEEK(0)!=';') \ - ERROR("Missing ';' after entity reference."); \ + XMLERROR("Missing ';' after entity reference."); \ READ(1); \ /* lookup entry in mapping and parse it recursively */ \ /* Generate error if entity is not defined */ \ f_index(2); \ if(IS_ZERO(sp-1)) \ { \ - ERROR("No such entity."); \ + XMLERROR("No such entity."); \ pop_stack(); \ }else{ \ if(sp[-1].type!=T_STRING) \ { \ - ERROR("XML->__entities value is not a string!"); \ + XMLERROR("XML->__entities value is not a string!"); \ }else{ \ struct pike_string *s=sp[-1].u.string; \ struct xmldata my_tmp=*data; \ @@ -877,7 +878,7 @@ static int gobble(struct xmldata *data, char *s) read_attvalue(data,&X,'\"',0); \ break; \ default: \ - ERROR("Unquoted attribute value."); \ + XMLERROR("Unquoted attribute value."); \ push_text(""); \ } \ }while(0) @@ -895,7 +896,7 @@ static int gobble(struct xmldata *data, char *s) read_pubid(data,&X,'\"'); \ break; \ default: \ - ERROR("Unquoted public id."); \ + XMLERROR("Unquoted public id."); \ } \ }while(0) @@ -912,7 +913,7 @@ static int gobble(struct xmldata *data, char *s) read_attvalue2(data,&X,'\"'); \ break; \ default: \ - ERROR("Unquoted attribute value."); \ + XMLERROR("Unquoted attribute value."); \ } \ }while(0) @@ -963,7 +964,7 @@ static void read_attvalue(struct xmldata *data, if(data->len<=0) { if(Y) - ERROR("End of file while looking for end of attribute value."); + XMLERROR("End of file while looking for end of attribute value."); break; } if(PEEK(0)==Y) @@ -1008,7 +1009,7 @@ static void read_pubid(struct xmldata *data, if(data->len<=0) { if(Y) - ERROR("End of file while looking for end of attribute value."); + XMLERROR("End of file while looking for end of attribute value."); break; } if(PEEK(0)==Y) @@ -1042,7 +1043,7 @@ static void read_attvalue2(struct xmldata *data, if(data->len<=0) { if(Y) - ERROR("End of file while looking for end of attribute value."); + XMLERROR("End of file while looking for end of attribute value."); break; } if(PEEK(0)==Y) @@ -1141,7 +1142,7 @@ static void simple_read_attributes(struct xmldata *data, SIMPLE_READNAME(); SKIPSPACE(); if(PEEK(0)!='=') - ERROR("Missing '=' in attribute."); + XMLERROR("Missing '=' in attribute."); READ(1); iscd=1; @@ -1185,7 +1186,7 @@ static int really_low_parse_dtd(struct xmldata *data) #ifdef VERBOSE_XMLDEBUG fprintf(stderr,"Non-space character on DTD top level: %c.",PEEK(0)); #endif - ERROR("Non-space character on DTD top level."); + XMLERROR("Non-space character on DTD top level."); while(data->len>0 && PEEK(0)!='<') READ(1); break; @@ -1215,7 +1216,7 @@ static int really_low_parse_dtd(struct xmldata *data) READ_COMMENT(); SYS(); }else{ - ERROR("Expected <!-- but got something else."); + XMLERROR("Expected <!-- but got something else."); } break; @@ -1268,7 +1269,7 @@ static int really_low_parse_dtd(struct xmldata *data) sp-1); } }else{ - ERROR("XML->__entities is not a mapping."); + XMLERROR("XML->__entities is not a mapping."); } SYS(); break; @@ -1315,7 +1316,7 @@ static int really_low_parse_dtd(struct xmldata *data) { if(!may_have_ndata) { - ERROR("This entity is not allowed to have an NDATA keyword."); + XMLERROR("This entity is not allowed to have an NDATA keyword."); } attributes++; @@ -1333,14 +1334,14 @@ static int really_low_parse_dtd(struct xmldata *data) default: not_system: /* FIXME, DTD's are IGNORED! */ - ERROR("Unexpected data in <!ENTITY"); + XMLERROR("Unexpected data in <!ENTITY"); while(data->len>0 && PEEK(0)!='>') READ(1); } SKIPSPACE(); if(PEEK(0)!='>') - ERROR("Missing '>' in ENTITY."); + XMLERROR("Missing '>' in ENTITY."); READ(1); break; @@ -1379,7 +1380,7 @@ static int really_low_parse_dtd(struct xmldata *data) struct svalue *save; if(data->len<=0) { - ERROR("End of file while parsing ATTLIST."); + XMLERROR("End of file while parsing ATTLIST."); break; } SKIPSPACE(); @@ -1467,7 +1468,7 @@ static int really_low_parse_dtd(struct xmldata *data) { SKIPSPACE(); if(PEEK(0)!='(') - ERROR("Expected '(' after NOTATION."); + XMLERROR("Expected '(' after NOTATION."); READ(1); SIMPLE_READNAME(); @@ -1480,7 +1481,7 @@ static int really_low_parse_dtd(struct xmldata *data) check_stack(1); } if(PEEK(0)!=')') - ERROR("Expected ')' after NOTATION enumeration."); + XMLERROR("Expected ')' after NOTATION enumeration."); READ(1); } break; @@ -1500,7 +1501,7 @@ static int really_low_parse_dtd(struct xmldata *data) check_stack(1); } if(PEEK(0)!=')') - ERROR("Expected ')' after enumeration."); + XMLERROR("Expected ')' after enumeration."); READ(1); break; } @@ -1559,7 +1560,7 @@ static int really_low_parse_dtd(struct xmldata *data) default: bad_defaultdecl: - ERROR("Bad default declaration."); + XMLERROR("Bad default declaration."); break; } break; @@ -1653,7 +1654,7 @@ static int really_low_parse_dtd(struct xmldata *data) READ(1); if(PEEK(0) != '>') - ERROR("Missing '>' in DTD"); + XMLERROR("Missing '>' in DTD"); READ(1); push_int(0); /* No attributes */ @@ -1663,7 +1664,7 @@ static int really_low_parse_dtd(struct xmldata *data) default: unknown_entry_in_dtd: - ERROR("Unknown entry in DTD."); + XMLERROR("Unknown entry in DTD."); /* Try to recover */ while(data->len>0 && PEEK(0)!='>') @@ -1699,7 +1700,7 @@ static int really_low_parse_dtd(struct xmldata *data) break; default: - ERROR("Unknown entry in DTD."); + XMLERROR("Unknown entry in DTD."); break; } @@ -1751,7 +1752,7 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, { if(!isSpace(PEEK(0))) { - ERROR("All data must be inside tags"); + XMLERROR("All data must be inside tags"); READ(1); } SKIPSPACE(); @@ -1804,7 +1805,7 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, SIMPLE_READ_ATTRIBUTES(0); if(PEEK(0) != '?' && PEEK(1)!='>') - ERROR("Missing ?> at end of <?xml."); + XMLERROR("Missing ?> at end of <?xml."); READ(2); push_int(0); /* No data */ @@ -1848,14 +1849,14 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, READ_COMMENT(); SYS(); }else{ - ERROR("Expected <!-- but got something else."); + XMLERROR("Expected <!-- but got something else."); } break; case 'A': /* ATTLIST? */ case 'E': /* ENTITY? ELEMENT? */ - ERROR("Invalid entry outside DTD."); + XMLERROR("Invalid entry outside DTD."); break; case '[': @@ -1893,7 +1894,7 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, } default: - ERROR("Invalid entry."); + XMLERROR("Invalid entry."); break; case 'D': /* DOCTYPE? */ @@ -1906,7 +1907,7 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, PEEK(8)!='E' || !isSpace(PEEK(9))) { - ERROR("Expected 'DOCTYPE', got something else."); + XMLERROR("Expected 'DOCTYPE', got something else."); }else{ READ(9); SKIPSPACE(); @@ -1929,7 +1930,7 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, SKIPSPACE(); f_aggregate_mapping(4); }else{ - ERROR("Expected PUBLIC, found something else."); + XMLERROR("Expected PUBLIC, found something else."); f_aggregate_mapping(0); } break; @@ -1946,7 +1947,7 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, SKIPSPACE(); f_aggregate_mapping(2); }else{ - ERROR("Expected SYSTEM, found something else."); + XMLERROR("Expected SYSTEM, found something else."); f_aggregate_mapping(0); } break; @@ -1963,14 +1964,14 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, fprintf(stderr,"FOO: %c%c%c%c\n",PEEK(0),PEEK(1),PEEK(2),PEEK(3)); #endif if(PEEK(0) != ']') - ERROR("Missing ] in DOCTYPE tag."); + XMLERROR("Missing ] in DOCTYPE tag."); READ(1); SKIPSPACE(); }else{ push_int(0); } if(PEEK(0)!='>') - ERROR("Missing '>' in DOCTYPE tag."); + XMLERROR("Missing '>' in DOCTYPE tag."); READ(1); SYS(); } @@ -1983,12 +1984,12 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, SIMPLE_READNAME(); SKIPSPACE(); if(PEEK(0)!='>') - ERROR("Missing > in end tag."); + XMLERROR("Missing > in end tag."); else READ(1); if(end!=sp[-1].u.string) { - ERROR("Unmatched end tag."); + XMLERROR("Unmatched end tag."); }else{ end=0; } @@ -2034,14 +2035,14 @@ static struct pike_string *very_low_parse_xml(struct xmldata *data, case '>': READ(1); if(low_parse_xml(data, sp[-2].u.string,0)) - ERROR("Unmatched tag."); + XMLERROR("Unmatched tag."); SYS(); break; case '/': READ(1); if(PEEK(0)!='>') - ERROR("Missing '>' in empty tag."); + XMLERROR("Missing '>' in empty tag."); READ(1); /* Self-contained tag */ free_string(sp[-3].u.string);