diff options
Diffstat (limited to 'dev-lang/xsb/files/xsb-3.0.1-sgml.patch')
-rw-r--r-- | dev-lang/xsb/files/xsb-3.0.1-sgml.patch | 267 |
1 files changed, 267 insertions, 0 deletions
diff --git a/dev-lang/xsb/files/xsb-3.0.1-sgml.patch b/dev-lang/xsb/files/xsb-3.0.1-sgml.patch new file mode 100644 index 000000000000..1ecad966f0c6 --- /dev/null +++ b/dev-lang/xsb/files/xsb-3.0.1-sgml.patch @@ -0,0 +1,267 @@ +diff -ur XSB.orig/packages/sgml/cc/fetch_file.c XSB/packages/sgml/cc/fetch_file.c +--- XSB.orig/packages/sgml/cc/fetch_file.c 2005-03-14 18:43:28.000000000 +1300 ++++ XSB/packages/sgml/cc/fetch_file.c 2007-01-26 21:48:07.000000000 +1300 +@@ -336,7 +336,7 @@ + + if( (strstr( *source, "Error 503")!= NULL) + || (strstr( *source, "503 Service Unavailable")!=NULL)){ +- strstr( *source, "503 Service Unavailable") ; ++ strcpy( *source, "503 Service Unavailable") ; + return FALSE; + } + +diff -ur XSB.orig/packages/sgml/cc/parser.c XSB/packages/sgml/cc/parser.c +--- XSB.orig/packages/sgml/cc/parser.c 2005-03-14 18:43:28.000000000 +1300 ++++ XSB/packages/sgml/cc/parser.c 2007-01-26 22:53:38.000000000 +1300 +@@ -593,7 +593,7 @@ + + for(el = xml_entities; *el; el++) + { +- process_entity_declaration(&p, *el); ++ process_entity_declaration(&p, (const ichar*)*el); + } + + break; +@@ -804,15 +804,15 @@ + m->parent = p->marked; + p->marked = m; + +- if ( istrcaseeq(kwd->name, "IGNORE") ) ++ if ( istrcaseeq(kwd->name, (const ichar*)"IGNORE") ) + m->type = MS_IGNORE; +- else if ( istrcaseeq(kwd->name, "INCLUDE") ) ++ else if ( istrcaseeq(kwd->name, (const ichar*)"INCLUDE") ) + m->type = MS_INCLUDE; +- else if ( istrcaseeq(kwd->name, "TEMP") ) ++ else if ( istrcaseeq(kwd->name, (const ichar*)"TEMP") ) + m->type = MS_INCLUDE; +- else if ( istrcaseeq(kwd->name, "CDATA") ) ++ else if ( istrcaseeq(kwd->name, (const ichar*)"CDATA") ) + m->type = MS_CDATA; +- else if ( istrcaseeq(kwd->name, "RCDATA") ) ++ else if ( istrcaseeq(kwd->name, (const ichar*)"RCDATA") ) + m->type = MS_RCDATA; + else + m->type = MS_INCLUDE; /* default */ +@@ -932,7 +932,7 @@ + if ( end ) + { decl = end; + +- if ( istrcaseeq(nm->name, "encoding") ) ++ if ( istrcaseeq(nm->name, (const ichar*)"encoding") ) + set_encoding(p, buf); + + continue; +@@ -970,9 +970,9 @@ + { + dtd *dtd = p->dtd; + +- if ( istrcaseeq(enc, "iso-8859-1") ) ++ if ( istrcaseeq(enc, (const ichar*)"iso-8859-1") ) + { dtd->encoding = ENC_ISO_LATIN1; +- } else if ( istrcaseeq(enc, "utf-8") ) ++ } else if ( istrcaseeq(enc, (const ichar*)"utf-8") ) + { dtd->encoding = ENC_UTF8; + } else + gripe(ERC_EXISTENCE, "character encoding", enc); +@@ -1545,7 +1545,7 @@ + if ( f[CF_MDC] == chr ) /* > */ + { + if ( p->on_decl ) +- (*p->on_decl)(p, ""); ++ (*p->on_decl)(p, (const ichar*)""); + p->state = S_PCDATA; + + } +@@ -2131,7 +2131,7 @@ + { locbuf oldloc; + + push_location(p, &oldloc); +- set_src_dtd_parser(p, IN_ENTITY, e->name->name); ++ set_src_dtd_parser(p, IN_ENTITY, (char*)e->name->name); + empty_icharbuf(p->buffer); /* dubious */ + for(s=text; *s; s++) + putchar_dtd_parser(p, *s); +@@ -2907,7 +2907,7 @@ + + if ( !empty ) + { empty = sgml_calloc(1, sizeof(*empty)); +- empty->name = dtd_add_symbol(dtd, "#EMPTY"); ++ empty->name = dtd_add_symbol(dtd, (const ichar*)"#EMPTY"); + empty->defined = TRUE; + } + +@@ -4380,7 +4380,7 @@ + if ( !(s = isee_identifier(dtd, decl, "#default")) ) + { return gripe(ERC_SYNTAX_ERROR, "Name expected", decl); + } +- id = dtd_add_symbol(dtd, "#DEFAULT"); ++ id = dtd_add_symbol(dtd, (const ichar*)"#DEFAULT"); + isdef = TRUE; + } + +@@ -4531,7 +4531,7 @@ + static ichar * + baseurl(dtd_parser *p) + { if ( p->location.type == IN_FILE && p->location.name ) +- { return istrdup(p->location.name); ++ { return istrdup((ichar*)p->location.name); + } + + return NULL; +@@ -4581,7 +4581,7 @@ + } + case ET_LITERAL: + { e->value = istrdup(val); +- e->length = strlen(e->value); ++ e->length = strlen((char*)e->value); + return decl; + } + default: +@@ -4652,7 +4652,7 @@ + + if ( !expand_pentities(p, eval, out, len) ) + return FALSE; +- l = strlen(out); /* could be better */ ++ l = strlen((char*)out); /* could be better */ + out += l; + len -= l; + +@@ -4794,7 +4794,7 @@ + { + if( e->exturl) + { +- file = e->exturl; ++ file = (char*)e->exturl; + + return file; + } +@@ -5932,7 +5932,7 @@ + a->def = AT_IMPLIED; + add_attribute(dtd, e, a); + +- if ( !e->undefined && !(dtd->dialect != DL_SGML && (istreq("xmlns", nm->name) || istrprefix("xmlns:", nm->name))) ) ++ if ( !e->undefined && !(dtd->dialect != DL_SGML && (istreq("xmlns", nm->name) || istrprefix((const ichar*)"xmlns:", nm->name))) ) + { gripe(ERC_NO_ATTRIBUTE, e->name->name, nm->name); + } + } +@@ -6444,7 +6444,7 @@ + { + int chr; + +- in = __utf8_get_char(in, &chr); ++ in = (const ichar*)__utf8_get_char((const char*)in, &chr); + if ( chr >= OUTPUT_CHARSET_SIZE ) + gripe(ERC_REPRESENTATION, "character"); + *out++ = chr; +diff -ur XSB.orig/packages/sgml/cc/sgml2pl.c XSB/packages/sgml/cc/sgml2pl.c +--- XSB.orig/packages/sgml/cc/sgml2pl.c 2005-03-12 03:57:38.000000000 +1300 ++++ XSB/packages/sgml/cc/sgml2pl.c 2007-01-26 22:42:46.000000000 +1300 +@@ -273,7 +273,7 @@ + { + c2p_functor( "dtd_struct", 2, tmp1); + c2p_int( (int) d, p2p_arg( tmp1, 1)); +- c2p_string( d->doctype, p2p_arg( tmp1, 2)); ++ c2p_string( (char*)d->doctype, p2p_arg( tmp1, 2)); + } + /* dtd_struct/1 if no doctype is specified */ + else +@@ -306,7 +306,7 @@ + return sgml2pl_error(ERR_TYPE, "atom", doctype); + + /*Create the dtd*/ +- if ( !(dtd=new_dtd(dt)) ) ++ if ( !(dtd=new_dtd((const ichar*)dt)) ) + return FALSE; + + dtd->references++; +@@ -474,7 +474,7 @@ + + if(is_var(doctype) && dtd->doctype) + { +- c2p_string( dtd->doctype, doctype); ++ c2p_string( (char*)dtd->doctype, doctype); + } + return TRUE; + } +@@ -625,7 +625,7 @@ + { + if( !(s=p2c_string(temp_term) )) + return FALSE; +- p->enforce_outer_element = dtd_add_symbol(p->dtd, s); ++ p->enforce_outer_element = dtd_add_symbol(p->dtd, (const ichar*)s); + + } + +@@ -1551,7 +1551,7 @@ + } + else + { +- c2p_string( nm->name, t); ++ c2p_string( (char*)nm->name, t); + } + } + +@@ -1577,12 +1577,12 @@ + { + switch(a->definition->type) + { case AT_CDATA: +- c2p_string( a->value.cdata, t); ++ c2p_string( (char*)a->value.cdata, t); + break; + case AT_NUMBER: + { + if ( a->value.text ) +- c2p_string( a->value.text, t); ++ c2p_string( (char*)a->value.text, t); + else + c2p_int( a->value.number, t); + break; +@@ -1611,7 +1611,7 @@ + head = p2p_car( tail); + tmp = p2p_cdr( tail); + tail = tmp; +- unify_listval(p, head, a->definition->type, e-val, val); ++ unify_listval(p, head, a->definition->type, e-val, (const char*)val); + } + + tmp = p2p_new(); +@@ -1623,7 +1623,7 @@ + head = p2p_car( tail); + tmp = p2p_cdr( tail); + tail = tmp; +- unify_listval(p, head, a->definition->type, e-val, val); ++ unify_listval(p, head, a->definition->type, e-val, (const char*)val); + + c2p_nil( tmp); + p2p_unify( tmp, tail); +@@ -1694,7 +1694,7 @@ + { + + c2p_functor( "entity", 1 , tmp2); +- c2p_string( e->name->name, p2p_arg( tmp2, 1)); ++ c2p_string( (char*)e->name->name, p2p_arg( tmp2, 1)); + p2p_unify( h, tmp2); + + } +@@ -1892,7 +1892,7 @@ + + } + else +- c2p_string ( e->name->name, t); ++ c2p_string ( (char*)e->name->name, t); + + return; + } +diff -ur XSB.orig/packages/sgml/cc/xmlns.c XSB/packages/sgml/cc/xmlns.c +--- XSB.orig/packages/sgml/cc/xmlns.c 2005-03-08 09:31:23.000000000 +1300 ++++ XSB/packages/sgml/cc/xmlns.c 2007-01-26 22:38:20.000000000 +1300 +@@ -156,7 +156,7 @@ + *local = s+1; + n = dtd_add_symbol(dtd, buf); + +- if ( istrprefix("xml", buf) ) /* XML reserved namespaces */ ++ if ( istrprefix((const ichar*)"xml", buf) ) /* XML reserved namespaces */ + { *url = n->name; + return TRUE; + } else if ( (ns = xmlns_find(p->environments, n)) ) |